Unzip initialization lists and constructors in JSCell hierarchy (4/7)

https://bugs.webkit.org/show_bug.cgi?id=67174

Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-01
Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Completed the fourth level of the refactoring to add finishCreation()
methods to all classes within the JSCell hierarchy with non-trivial
constructor bodies.

This primarily consists of pushing the calls to finishCreation() down
into the constructors of the subclasses of the second level of the hierarchy
as well as pulling the finishCreation() calls out into the class's corresponding
create() method if it has one.  Doing both simultaneously allows us to
maintain the invariant that the finishCreation() method chain is called exactly
once during the creation of an object, since calling it any other number of
times (0, 2, or more) will cause an assertion failure.

* API/JSCallbackConstructor.cpp:
(JSC::JSCallbackConstructor::JSCallbackConstructor):
(JSC::JSCallbackConstructor::finishCreation):
* API/JSCallbackConstructor.h:
* API/JSCallbackObject.h:
(JSC::JSCallbackObject::create):
* API/JSCallbackObjectFunctions.h:
(JSC::::JSCallbackObject):
(JSC::::finishCreation):
* JavaScriptCore.JSVALUE64only.exp:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::create):
* debugger/DebuggerActivation.h:
* runtime/Arguments.h:
(JSC::Arguments::create):
(JSC::Arguments::createNoParameters):
(JSC::Arguments::Arguments):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::ArrayPrototype):
(JSC::ArrayPrototype::finishCreation):
* runtime/ArrayPrototype.h:
* runtime/BooleanObject.cpp:
(JSC::BooleanObject::BooleanObject):
(JSC::BooleanObject::finishCreation):
* runtime/BooleanObject.h:
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
(JSC::DateInstance::finishCreation):
* runtime/DateInstance.h:
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorInstance.h:
(JSC::ErrorInstance::create):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
(JSC::ErrorPrototype::finishCreation):
* runtime/ErrorPrototype.h:
* runtime/ExceptionHelpers.cpp:
(JSC::InterruptedExecutionError::InterruptedExecutionError):
(JSC::InterruptedExecutionError::create):
(JSC::TerminatedExecutionError::TerminatedExecutionError):
(JSC::TerminatedExecutionError::create):
* runtime/Executable.cpp:
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):
(JSC::EvalExecutable::create):
(JSC::ProgramExecutable::create):
(JSC::FunctionExecutable::create):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
(JSC::InternalFunction::finishCreation):
* runtime/InternalFunction.h:
* runtime/JSActivation.cpp:
(JSC::JSActivation::JSActivation):
(JSC::JSActivation::finishCreation):
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:
(JSC::JSArray::create):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSByteArray.h:
(JSC::JSByteArray::create):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::finishCreation):
* runtime/JSFunction.h:
(JSC::JSFunction::create):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::finishCreation):
* runtime/JSNotAnObject.h:
(JSC::JSNotAnObject::JSNotAnObject):
(JSC::JSNotAnObject::create):
* runtime/JSONObject.cpp:
(JSC::JSONObject::JSONObject):
(JSC::JSONObject::finishCreation):
* runtime/JSONObject.h:
* runtime/JSObjectWithGlobalObject.cpp:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSObjectWithGlobalObject.h:
* runtime/JSStaticScopeObject.h:
(JSC::JSStaticScopeObject::create):
(JSC::JSStaticScopeObject::finishCreation):
(JSC::JSStaticScopeObject::JSStaticScopeObject):
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::JSVariableObject):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::JSWrapperObject):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
(JSC::MathObject::finishCreation):
* runtime/MathObject.h:
* runtime/NumberObject.cpp:
(JSC::NumberObject::NumberObject):
(JSC::NumberObject::finishCreation):
* runtime/NumberObject.h:
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::ObjectPrototype):
* runtime/ObjectPrototype.h:
(JSC::ObjectPrototype::create):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpMatchesArray::RegExpMatchesArray):
(JSC::RegExpMatchesArray::finishCreation):
* runtime/RegExpMatchesArray.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::RegExpObject):
(JSC::RegExpObject::finishCreation):
* runtime/RegExpObject.h:
* runtime/StrictEvalActivation.cpp:
(JSC::StrictEvalActivation::StrictEvalActivation):
* runtime/StrictEvalActivation.h:
(JSC::StrictEvalActivation::create):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
(JSC::StringObject::finishCreation):
* runtime/StringObject.h:

Source/JavaScriptGlue:

Completed the fourth level of the refactoring to add finishCreation()
methods to all classes within the JSCell hierarchy with non-trivial
constructor bodies.

This primarily consists of pushing the calls to finishCreation() down
into the constructors of the subclasses of the second level of the hierarchy
as well as pulling the finishCreation() calls out into the class's corresponding
create() method if it has one.  Doing both simultaneously allows us to
maintain the invariant that the finishCreation() method chain is called exactly
once during the creation of an object, since calling it any other number of
times (0, 2, or more) will cause an assertion failure.

* UserObjectImp.cpp:
(UserObjectImp::UserObjectImp):
* UserObjectImp.h:
(UserObjectImp::create):

Source/WebCore:

No new tests.

Completed the fourth level of the refactoring to add finishCreation()
methods to all classes within the JSCell hierarchy with non-trivial
constructor bodies.

This primarily consists of pushing the calls to finishCreation() down
into the constructors of the subclasses of the second level of the hierarchy
as well as pulling the finishCreation() calls out into the class's corresponding
create() method if it has one.  Doing both simultaneously allows us to
maintain the invariant that the finishCreation() method chain is called exactly
once during the creation of an object, since calling it any other number of
times (0, 2, or more) will cause an assertion failure.

* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::JSDOMWindowShell):
(WebCore::JSDOMWindowShell::create):
* bindings/js/JSDOMWindowShell.h:
* bindings/js/JSDOMWrapper.h:
(WebCore::JSDOMWrapper::JSDOMWrapper):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createWindowShell):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObjPrototype::JSTestObjPrototype):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
(JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::RuntimeArray):
(JSC::RuntimeArray::finishCreation):
* bridge/runtime_array.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::RuntimeObject):
(JSC::Bindings::RuntimeObject::finishCreation):
* bridge/runtime_object.h:

Source/WebKit2:

Completed the fourth level of the refactoring to add finishCreation()
methods to all classes within the JSCell hierarchy with non-trivial
constructor bodies.

This primarily consists of pushing the calls to finishCreation() down
into the constructors of the subclasses of the second level of the hierarchy
as well as pulling the finishCreation() calls out into the class's corresponding
create() method if it has one.  Doing both simultaneously allows us to
maintain the invariant that the finishCreation() method chain is called exactly
once during the creation of an object, since calling it any other number of
times (0, 2, or more) will cause an assertion failure.

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::JSNPObject):
(WebKit::JSNPObject::finishCreation):
* WebProcess/Plugins/Netscape/JSNPObject.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 225c580b
......@@ -43,6 +43,12 @@ JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, Struc
, m_class(jsClass)
, m_callback(callback)
{
finishCreation(globalObject, jsClass);
}
void JSCallbackConstructor::finishCreation(JSGlobalObject* globalObject, JSClassRef jsClass)
{
Base::finishCreation(globalObject->globalData(), globalObject);
ASSERT(inherits(&s_info));
if (m_class)
JSClassRetain(jsClass);
......
......@@ -52,6 +52,7 @@ public:
protected:
JSCallbackConstructor(JSGlobalObject*, Structure*, JSClassRef, JSObjectCallAsConstructorCallback);
void finishCreation(JSGlobalObject*, JSClassRef);
static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags;
private:
......
......@@ -124,16 +124,21 @@ protected:
// functionality here.
void* operator new(size_t, void* ptr) { return ptr; }
void finishCreation(ExecState*, JSGlobalObject*);
void finishCreation();
public:
typedef Parent Base;
static JSCallbackObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, void* data)
{
return new (allocateCell<JSCallbackObject>(*exec->heap())) JSCallbackObject(exec, globalObject, structure, classRef, data);
JSCallbackObject* callbackObject = new (allocateCell<JSCallbackObject>(*exec->heap())) JSCallbackObject(exec, globalObject, structure, classRef, data);
return callbackObject;
}
static JSCallbackObject* create(JSGlobalData& globalData, JSClassRef classRef, Structure* structure)
{
return new (allocateCell<JSCallbackObject>(globalData.heap)) JSCallbackObject(globalData, classRef, structure);
JSCallbackObject* callbackObject = new (allocateCell<JSCallbackObject>(globalData.heap)) JSCallbackObject(globalData, classRef, structure);
return callbackObject;
}
void setPrivate(void* data);
......
......@@ -54,8 +54,7 @@ JSCallbackObject<Parent>::JSCallbackObject(ExecState* exec, JSGlobalObject* glob
: Parent(globalObject, structure)
, m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass)))
{
ASSERT(Parent::inherits(&s_info));
init(exec);
finishCreation(exec, globalObject);
}
// Global object constructor.
......@@ -64,6 +63,21 @@ template <class Parent>
JSCallbackObject<Parent>::JSCallbackObject(JSGlobalData& globalData, JSClassRef jsClass, Structure* structure)
: Parent(globalData, structure)
, m_callbackObjectData(adoptPtr(new JSCallbackObjectData(0, jsClass)))
{
finishCreation();
}
template <class Parent>
void JSCallbackObject<Parent>::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
{
Base::finishCreation(globalObject->globalData(), globalObject);
ASSERT(Parent::inherits(&s_info));
init(exec);
}
// This is just for Global object, so we can assume that Base::finishCreation is JSGlobalObject::constructorBody.
template <class Parent>
void JSCallbackObject<Parent>::finishCreation()
{
ASSERT(Parent::inherits(&s_info));
ASSERT(Parent::isGlobalObject());
......
2011-09-01 Mark Hahnenberg <mhahnenberg@apple.com>
Unzip initialization lists and constructors in JSCell hierarchy (4/7)
https://bugs.webkit.org/show_bug.cgi?id=67174
Reviewed by Oliver Hunt.
Completed the fourth level of the refactoring to add finishCreation()
methods to all classes within the JSCell hierarchy with non-trivial
constructor bodies.
This primarily consists of pushing the calls to finishCreation() down
into the constructors of the subclasses of the second level of the hierarchy
as well as pulling the finishCreation() calls out into the class's corresponding
create() method if it has one. Doing both simultaneously allows us to
maintain the invariant that the finishCreation() method chain is called exactly
once during the creation of an object, since calling it any other number of
times (0, 2, or more) will cause an assertion failure.
* API/JSCallbackConstructor.cpp:
(JSC::JSCallbackConstructor::JSCallbackConstructor):
(JSC::JSCallbackConstructor::finishCreation):
* API/JSCallbackConstructor.h:
* API/JSCallbackObject.h:
(JSC::JSCallbackObject::create):
* API/JSCallbackObjectFunctions.h:
(JSC::::JSCallbackObject):
(JSC::::finishCreation):
* JavaScriptCore.JSVALUE64only.exp:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::create):
* debugger/DebuggerActivation.h:
* runtime/Arguments.h:
(JSC::Arguments::create):
(JSC::Arguments::createNoParameters):
(JSC::Arguments::Arguments):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::ArrayPrototype):
(JSC::ArrayPrototype::finishCreation):
* runtime/ArrayPrototype.h:
* runtime/BooleanObject.cpp:
(JSC::BooleanObject::BooleanObject):
(JSC::BooleanObject::finishCreation):
* runtime/BooleanObject.h:
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
(JSC::DateInstance::finishCreation):
* runtime/DateInstance.h:
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorInstance.h:
(JSC::ErrorInstance::create):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
(JSC::ErrorPrototype::finishCreation):
* runtime/ErrorPrototype.h:
* runtime/ExceptionHelpers.cpp:
(JSC::InterruptedExecutionError::InterruptedExecutionError):
(JSC::InterruptedExecutionError::create):
(JSC::TerminatedExecutionError::TerminatedExecutionError):
(JSC::TerminatedExecutionError::create):
* runtime/Executable.cpp:
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):
(JSC::EvalExecutable::create):
(JSC::ProgramExecutable::create):
(JSC::FunctionExecutable::create):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
(JSC::InternalFunction::finishCreation):
* runtime/InternalFunction.h:
* runtime/JSActivation.cpp:
(JSC::JSActivation::JSActivation):
(JSC::JSActivation::finishCreation):
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:
(JSC::JSArray::create):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSByteArray.h:
(JSC::JSByteArray::create):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::finishCreation):
* runtime/JSFunction.h:
(JSC::JSFunction::create):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::finishCreation):
* runtime/JSNotAnObject.h:
(JSC::JSNotAnObject::JSNotAnObject):
(JSC::JSNotAnObject::create):
* runtime/JSONObject.cpp:
(JSC::JSONObject::JSONObject):
(JSC::JSONObject::finishCreation):
* runtime/JSONObject.h:
* runtime/JSObjectWithGlobalObject.cpp:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSObjectWithGlobalObject.h:
* runtime/JSStaticScopeObject.h:
(JSC::JSStaticScopeObject::create):
(JSC::JSStaticScopeObject::finishCreation):
(JSC::JSStaticScopeObject::JSStaticScopeObject):
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::JSVariableObject):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::JSWrapperObject):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
(JSC::MathObject::finishCreation):
* runtime/MathObject.h:
* runtime/NumberObject.cpp:
(JSC::NumberObject::NumberObject):
(JSC::NumberObject::finishCreation):
* runtime/NumberObject.h:
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::ObjectPrototype):
* runtime/ObjectPrototype.h:
(JSC::ObjectPrototype::create):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpMatchesArray::RegExpMatchesArray):
(JSC::RegExpMatchesArray::finishCreation):
* runtime/RegExpMatchesArray.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::RegExpObject):
(JSC::RegExpObject::finishCreation):
* runtime/RegExpObject.h:
* runtime/StrictEvalActivation.cpp:
(JSC::StrictEvalActivation::StrictEvalActivation):
* runtime/StrictEvalActivation.h:
(JSC::StrictEvalActivation::create):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
(JSC::StringObject::finishCreation):
* runtime/StringObject.h:
2011-09-01 Daniel Bates <dbates@rim.com>
QNX GCC distribution doesn't support vasprintf()
......
__ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEiRKNS_10IdentifierEPFPvS2_E
......@@ -110,13 +110,17 @@ __ZN3JSC10Identifier4fromEPNS_9ExecStateEi
__ZN3JSC10Identifier4fromEPNS_9ExecStateEj
__ZN3JSC10Identifier5equalEPKN3WTF10StringImplEPKc
__ZN3JSC10Identifier8toUInt32ERKNS_7UStringERb
__ZN3JSC10JSFunction14finishCreationEPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_18FunctionExecutableEPNS_14ScopeChainNodeE
__ZN3JSC10JSFunction14finishCreationEPNS_9ExecStateEPNS_14JSGlobalObjectEiRKNS_10IdentifierEPNS_14ExecutableBaseE
__ZN3JSC10JSFunction4nameEPNS_9ExecStateE
__ZN3JSC10JSFunction6createEPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEiRKNS_10IdentifierEPFPvS2_E
__ZN3JSC10JSFunction6s_infoE
__ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE
__ZN3JSC10throwErrorEPNS_9ExecStateENS_7JSValueE
__ZN3JSC10throwErrorEPNS_9ExecStateEPNS_8JSObjectE
__ZN3JSC11JSByteArray13s_defaultInfoE
__ZN3JSC11JSByteArray15createStructureERNS_12JSGlobalDataENS_7JSValueEPKNS_9ClassInfoE
__ZN3JSC11JSByteArray6createEPNS_9ExecStateEPNS_9StructureEPN3WTF9ByteArrayE
__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEPNS_9StructureEPN3WTF9ByteArrayE
__ZN3JSC11ParserArena5resetEv
__ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE
__ZN3JSC11createErrorEPNS_9ExecStateERKNS_7UStringE
......@@ -133,6 +137,7 @@ __ZN3JSC12JSGlobalData14dumpSampleDataEPNS_9ExecStateE
__ZN3JSC12JSGlobalData14resetDateCacheEv
__ZN3JSC12JSGlobalData14sharedInstanceEv
__ZN3JSC12JSGlobalData15dumpRegExpTraceEv
__ZN3JSC12JSGlobalData15getHostFunctionEPFPvPNS_9ExecStateEE
__ZN3JSC12JSGlobalData22clearBuiltinStructuresEv
#ifndef NDEBUG
__ZN3JSC12JSGlobalData23releaseExecutableMemoryEv
......@@ -196,7 +201,7 @@ __ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb
__ZN3JSC17PropertyNameArray3addEPN3WTF10StringImplE
__ZN3JSC17constructFunctionEPNS_9ExecStateEPNS_14JSGlobalObjectERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi
__ZN3JSC17createSyntaxErrorEPNS_9ExecStateERKNS_7UStringE
__ZN3JSC18DebuggerActivationC1ERNS_12JSGlobalDataEPNS_8JSObjectE
__ZN3JSC18DebuggerActivation6createERNS_12JSGlobalDataEPNS_8JSObjectE
__ZN3JSC18PropertyDescriptor11setWritableEb
__ZN3JSC18PropertyDescriptor12setUndefinedEv
__ZN3JSC18PropertyDescriptor13setDescriptorENS_7JSValueEj
......@@ -219,8 +224,9 @@ __ZN3JSC23AbstractSamplingCounter4dumpEv
__ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateE
__ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
__ZN3JSC24DynamicGlobalObjectScopeC1ERNS_12JSGlobalDataEPNS_14JSGlobalObjectE
__ZN3JSC24JSObjectWithGlobalObject14finishCreationERNS_12JSGlobalDataEPNS_14JSGlobalObjectE
__ZN3JSC24JSObjectWithGlobalObjectC2ERNS_12JSGlobalDataEPNS_9StructureE
__ZN3JSC24JSObjectWithGlobalObjectC2EPNS_14JSGlobalObjectEPNS_9StructureE
__ZN3JSC24JSObjectWithGlobalObjectC2ERNS_12JSGlobalDataEPNS_14JSGlobalObjectEPNS_9StructureE
__ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE
__ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE
__ZN3JSC35createInterruptedExecutionExceptionEPNS_12JSGlobalDataE
......@@ -269,12 +275,15 @@ __ZN3JSC6JSLockC1EPNS_9ExecStateE
__ZN3JSC6RegExpD1Ev
__ZN3JSC6RegExp6createERNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE
__ZN3JSC7JSArray13visitChildrenERNS_11SlotVisitorE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataERKNS_7ArgListE
__ZN3JSC7JSArray15setSubclassDataEPv
__ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC7JSArray6createERNS_12JSGlobalDataEPNS_9StructureERKNS_7ArgListE
__ZN3JSC7JSArray6createERNS_12JSGlobalDataEPNS_9StructureE
__ZN3JSC7JSArray6s_infoE
__ZN3JSC7JSArray9setLengthEj
__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE
__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureERKNS_7ArgListE
__ZN3JSC7JSArrayC2ERNS_12JSGlobalDataEPNS_9StructureE
__ZN3JSC7JSArrayD2Ev
__ZN3JSC7JSValue13isValidCalleeEv
......
......@@ -9,11 +9,11 @@ EXPORTS
??0DynamicGlobalObjectScope@JSC@@QAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@@Z
??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@PAVJSGlobalObject@1@PAVStructure@1@ABVIdentifier@1@@Z
??0JSArray@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z
??0JSArray@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@ABVArgList@1@@Z
??0JSFunction@JSC@@AAE@PAVExecState@1@PAVJSGlobalObject@1@PAVStructure@1@HABVIdentifier@1@P6I_J0@Z@Z
??0JSByteArray@JSC@@AAE@PAVExecState@1@PAVStructure@1@PAVByteArray@WTF@@@Z
??0JSFunction@JSC@@AAE@PAVExecState@1@PAVJSGlobalObject@1@PAVStructure@1@@Z
??0JSLock@JSC@@QAE@PAVExecState@1@@Z
??0JSObjectWithGlobalObject@JSC@@IAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@PAVStructure@1@@Z
??0JSObjectWithGlobalObject@JSC@@IAE@PAVJSGlobalObject@1@PAVStructure@1@@Z
??0JSObjectWithGlobalObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z
??0MD5@WTF@@QAE@XZ
??0Mutex@WTF@@QAE@XZ
??0RefCountedLeakCounter@WTF@@QAE@PBD@Z
......@@ -95,7 +95,9 @@ EXPORTS
?convertUTF16ToUTF8@Unicode@WTF@@YA?AW4ConversionResult@12@PAPB_WPB_WPAPADPAD_N@Z
?convertUTF8ToUTF16@Unicode@WTF@@YA?AW4ConversionResult@12@PAPBDPBDPAPA_WPA_W_N@Z
?create@ByteArray@WTF@@SA?AV?$PassRefPtr@VByteArray@WTF@@@2@I@Z
?create@JSByteArray@JSC@@SAPAV12@PAVExecState@2@PAVStructure@2@PAVByteArray@WTF@@@Z
?create@JSArray@JSC@@SAPAV12@AAVJSGlobalData@2@PAVStructure@2@@Z
?create@JSArray@JSC@@SAPAV12@AAVJSGlobalData@2@PAVStructure@2@ABVArgList@2@@Z
?create@JSFunction@JSC@@SAPAV12@PAVExecState@2@PAVJSGlobalObject@2@PAVStructure@2@HABVIdentifier@2@P6I_J0@Z@Z
?create@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@W4ThreadStackType@2@W4HeapSize@2@@Z
?create@OpaqueJSString@@SA?AV?$PassRefPtr@UOpaqueJSString@@@WTF@@ABVUString@JSC@@@Z
?create@RegExp@JSC@@SAPAV12@AAVJSGlobalData@2@ABVUString@2@W4RegExpFlags@2@@Z
......@@ -168,6 +170,10 @@ EXPORTS
?fastZeroedMalloc@WTF@@YAPAXI@Z
?fillGetterPropertySlot@JSObject@JSC@@QAEXAAVPropertySlot@2@PAV?$WriteBarrierBase@W4Unknown@JSC@@@2@@Z
?finalize@WeakHandleOwner@JSC@@UAEXV?$Handle@W4Unknown@JSC@@@2@PAX@Z
?finishCreation@JSArray@JSC@@IAEXAAVJSGlobalData@2@@Z
?finishCreation@JSArray@JSC@@IAEXAAVJSGlobalData@2@ABVArgList@2@@Z
?finishCreation@JSFunction@JSC@@IAEXPAVExecState@2@PAVJSGlobalObject@2@HABVIdentifier@2@PAVExecutableBase@2@@Z
?finishCreation@JSObjectWithGlobalObject@JSC@@IAEXAAVJSGlobalData@2@PAVJSGlobalObject@2@@Z
?focus@Profile@JSC@@QAEXPBVProfileNode@2@@Z
?from@Identifier@JSC@@SA?AV12@PAVExecState@2@H@Z
?from@Identifier@JSC@@SA?AV12@PAVExecState@2@I@Z
......@@ -177,6 +183,7 @@ EXPORTS
?get@Structure@JSC@@QAEIAAVJSGlobalData@2@PAVStringImpl@WTF@@AAIAAPAVJSCell@2@@Z
?getCallData@JSCell@JSC@@UAE?AW4CallType@2@AATCallData@2@@Z
?getConstructData@JSCell@JSC@@UAE?AW4ConstructType@2@AATConstructData@2@@Z
?getHostFunction@JSGlobalData@JSC@@QAEPAVNativeExecutable@2@P6I_JPAVExecState@2@@Z@Z
?getJSNumber@JSCell@JSC@@UAE?AVJSValue@2@XZ
?getObject@JSCell@JSC@@QAEPAVJSObject@2@XZ
?getOwnPropertyDescriptor@JSGlobalObject@JSC@@UAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@@Z
......
......@@ -30,10 +30,16 @@
namespace JSC {
DebuggerActivation::DebuggerActivation(JSGlobalData& globalData, JSObject* activation)
DebuggerActivation::DebuggerActivation(JSGlobalData& globalData)
: JSNonFinalObject(globalData, globalData.debuggerActivationStructure.get())
{
finishCreation(globalData, activation);
}
DebuggerActivation* DebuggerActivation::create(JSGlobalData& globalData, JSObject* object)
{
DebuggerActivation* activation = new (allocateCell<DebuggerActivation>(globalData.heap)) DebuggerActivation(globalData);
activation->finishCreation(globalData, object);
return activation;
}
void DebuggerActivation::finishCreation(JSGlobalData& globalData, JSObject* activation)
......
......@@ -34,12 +34,7 @@ namespace JSC {
public:
typedef JSNonFinalObject Base;
static DebuggerActivation* create(JSGlobalData& globalData, JSObject* object)
{
DebuggerActivation* activation = new (allocateCell<DebuggerActivation>(globalData.heap)) DebuggerActivation(globalData, object);
return activation;
}
static DebuggerActivation* create(JSGlobalData&, JSObject*);
virtual void visitChildren(SlotVisitor&);
virtual UString className() const;
virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
......@@ -64,7 +59,7 @@ namespace JSC {
void finishCreation(JSGlobalData&, JSObject* activation);
private:
DebuggerActivation(JSGlobalData&, JSObject*);
DebuggerActivation(JSGlobalData&);
WriteBarrier<JSActivation> m_activation;
};
......
......@@ -64,12 +64,14 @@ namespace JSC {
static Arguments* create(JSGlobalData& globalData, CallFrame* callFrame)
{
Arguments* arguments = new (allocateCell<Arguments>(globalData.heap)) Arguments(callFrame);
arguments->finishCreation(callFrame);
return arguments;
}
static Arguments* createNoParameters(JSGlobalData& globalData, CallFrame* callFrame)
{
Arguments* arguments = new (allocateCell<Arguments>(globalData.heap)) Arguments(callFrame, NoParameters);
arguments->finishCreation(callFrame, NoParameters);
return arguments;
}
......@@ -166,14 +168,12 @@ namespace JSC {
: JSNonFinalObject(callFrame->globalData(), callFrame->lexicalGlobalObject()->argumentsStructure())
, d(adoptPtr(new ArgumentsData))
{
finishCreation(callFrame);
}
inline Arguments::Arguments(CallFrame* callFrame, NoParametersType)
: JSNonFinalObject(callFrame->globalData(), callFrame->lexicalGlobalObject()->argumentsStructure())
, d(adoptPtr(new ArgumentsData))
{
finishCreation(callFrame, NoParameters);
}
inline void Arguments::finishCreation(CallFrame* callFrame)
......
......@@ -117,6 +117,12 @@ const ClassInfo ArrayPrototype::s_info = {"Array", &JSArray::s_info, 0, ExecStat
ArrayPrototype::ArrayPrototype(JSGlobalObject* globalObject, Structure* structure)
: JSArray(globalObject->globalData(), structure)
{
finishCreation(globalObject);
}
void ArrayPrototype::finishCreation(JSGlobalObject* globalObject)
{
Base::finishCreation(globalObject->globalData());
ASSERT(inherits(&s_info));
putAnonymousValue(globalObject->globalData(), 0, globalObject);
}
......
......@@ -49,6 +49,8 @@ namespace JSC {
}
protected:
void finishCreation(JSGlobalObject*);
static const unsigned AnonymousSlotCount = JSArray::AnonymousSlotCount + 1;
};
......
......@@ -30,6 +30,12 @@ const ClassInfo BooleanObject::s_info = { "Boolean", &JSWrapperObject::s_info, 0
BooleanObject::BooleanObject(JSGlobalData& globalData, Structure* structure)
: JSWrapperObject(globalData, structure)
{
finishCreation(globalData);
}
void BooleanObject::finishCreation(JSGlobalData& globalData)
{
Base::finishCreation(globalData);
ASSERT(inherits(&s_info));
}
......
......@@ -28,6 +28,7 @@ namespace JSC {
class BooleanObject : public JSWrapperObject {
protected:
BooleanObject(JSGlobalData&, Structure*);
void finishCreation(JSGlobalData&);
public:
typedef JSWrapperObject Base;
......
......@@ -37,15 +37,27 @@ const ClassInfo DateInstance::s_info = {"Date", &JSWrapperObject::s_info, 0, 0};
DateInstance::DateInstance(ExecState* exec, Structure* structure)
: JSWrapperObject(exec->globalData(), structure)
{
ASSERT(inherits(&s_info));
setInternalValue(exec->globalData(), jsNaN());
finishCreation(exec->globalData());
}
DateInstance::DateInstance(ExecState* exec, Structure* structure, double time)
: JSWrapperObject(exec->globalData(), structure)
{
finishCreation(exec->globalData(), time);
}
void DateInstance::finishCreation(JSGlobalData& globalData)
{
Base::finishCreation(globalData);
ASSERT(inherits(&s_info));
setInternalValue(globalData, jsNaN());
}
void DateInstance::finishCreation(JSGlobalData& globalData, double time)
{
Base::finishCreation(globalData);
ASSERT(inherits(&s_info));
setInternalValue(exec->globalData(), jsNumber(timeClip(time)));
setInternalValue(globalData, jsNumber(timeClip(time)));
}
const GregorianDateTime* DateInstance::calculateGregorianDateTime(ExecState* exec) const
......
......@@ -33,6 +33,8 @@ namespace JSC {
protected:
DateInstance(ExecState*, Structure*, double);
DateInstance(ExecState*, Structure*);
void finishCreation(JSGlobalData&);
void finishCreation(JSGlobalData&, double);
public:
typedef JSWrapperObject Base;
......
......@@ -29,26 +29,6 @@ ErrorInstance::ErrorInstance(JSGlobalData& globalData, Structure* structure)
: JSNonFinalObject(globalData, structure)
, m_appendSourceToMessage(false)
{
finishCreation(globalData, UString("", 0));
}
ErrorInstance::ErrorInstance(JSGlobalData& globalData, Structure* structure, const UString& message)
: JSNonFinalObject(globalData, structure)
, m_appendSourceToMessage(false)
{
finishCreation(globalData, message);
}
ErrorInstance* ErrorInstance::create(JSGlobalData& globalData, Structure* structure, const UString& message)
{
return new (allocateCell<ErrorInstance>(globalData.heap)) ErrorInstance(globalData, structure, message);
}
ErrorInstance* ErrorInstance::create(ExecState* exec, Structure* structure, JSValue message)
{
if (message.isUndefined())
return new (allocateCell<ErrorInstance>(*exec->heap())) ErrorInstance(exec->globalData(), structure);
return create(exec->globalData(), structure, message.toString(exec));
}
} // namespace JSC
......@@ -36,9 +36,21 @@ namespace JSC {
return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
static ErrorInstance* create(JSGlobalData&, Structure*, const UString&);
static ErrorInstance* create(ExecState*, Structure*, JSValue message);
static ErrorInstance* create(JSGlobalData& globalData, Structure* structure, const UString& message)
{
ErrorInstance* instance = new (allocateCell<ErrorInstance>(globalData.heap)) ErrorInstance(globalData, structure);
instance->finishCreation(globalData, message);
return instance;
}
static ErrorInstance* create(ExecState* exec, Structure* structure, JSValue message)
{
if (message.isUndefined()) {
ErrorInstance* instance = new (allocateCell<ErrorInstance>(*exec->heap())) ErrorInstance(exec->globalData(), structure);
instance->finishCreation(exec->globalData(), UString("", 0));
return instance;
}
return create(exec->globalData(), structure, message.toString(exec));
}
bool appendSourceToMessage() { return m_appendSourceToMessage; }
void setAppendSourceToMessage() { m_appendSourceToMessage = true; }
......@@ -48,7 +60,6 @@ namespace JSC {
protected:
explicit ErrorInstance(JSGlobalData&, Structure*);
explicit ErrorInstance(JSGlobalData&, Structure*, const UString&);
void finishCreation(JSGlobalData& globalData, const UString& message)
{
......
......@@ -53,11 +53,12 @@ ASSERT_CLASS_FITS_IN_CELL(ErrorPrototype);
ErrorPrototype::ErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
: ErrorInstance(exec->globalData(), structure)
{
constructorBody(exec, globalObject);
finishCreation(exec, globalObject);
}
void ErrorPrototype::constructorBody(ExecState* exec, JSGlobalObject* globalObject)
void ErrorPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
{
Base::finishCreation(exec->globalData(), "");
ASSERT(inherits(&s_info));
putDirect(exec->globalData(), exec->propertyNames().name, jsNontrivialString(exec, "Error"), DontEnum);
putAnonymousValue(globalObject->globalData(), 0, globalObject);
......
......@@ -45,7 +45,7 @@ namespace JSC {
protected:
ErrorPrototype(ExecState*, JSGlobalObject*, Structure*);
void constructorBody(ExecState*, JSGlobalObject*);
void finishCreation(ExecState*, JSGlobalObject*);
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ErrorInstance::StructureFlags;
static const unsigned AnonymousSlotCount = ErrorInstance::AnonymousSlotCount + 1;
......
......@@ -46,7 +46,6 @@ private:
InterruptedExecutionError(JSGlobalData& globalData)
: JSNonFinalObject(globalData, globalData.interruptedExecutionErrorStructure.get())
{
finishCreation(globalData);
}
public:
......@@ -54,7 +53,9 @@ public:
static InterruptedExecutionError* create(JSGlobalData& globalData)
{
return new (allocateCell<InterruptedExecutionError>(globalData.heap)) InterruptedExecutionError(globalData);
InterruptedExecutionError* error = new (allocateCell<InterruptedExecutionError>(globalData.heap)) InterruptedExecutionError(globalData);
error->finishCreation(globalData);
return error;
}
virtual ComplType exceptionType() const { return Interrupted; }
......@@ -72,7 +73,6 @@ private:
TerminatedExecutionError(JSGlobalData& globalData)
: JSNonFinalObject(globalData, globalData.terminatedExecutionErrorStructure.get())
{
finishCreation(globalData);
}
public:
......@@ -80,7 +80,9 @@ public:
static TerminatedExecutionError* create(JSGlobalData& globalData)
{
return new (allocateCell<TerminatedExecutionError>(globalData.heap)) TerminatedExecutionError(globalData);
TerminatedExecutionError* error = new (allocateCell<TerminatedExecutionError>(globalData.heap)) TerminatedExecutionError(globalData);
error->finishCreation(globalData);
return error;
}
virtual ComplType exceptionType() const { return Terminated; }
......
......@@ -127,7 +127,6 @@ const ClassInfo EvalExecutable::s_info = { "EvalExecutable", &ScriptExecutable::
EvalExecutable::EvalExecutable(ExecState* exec, const SourceCode& source, bool inStrictContext)
: ScriptExecutable(exec->globalData().evalExecutableStructure.get(), exec, source, inStrictContext)
{
finishCreation(exec->globalData());
}