Ignore:
Timestamp:
Sep 1, 2011, 4:49:23 PM (14 years ago)
Author:
[email protected]
Message:

Unzip initialization lists and constructors in JSCell hierarchy (4/7)
https://bugs.webkit.org/show_bug.cgi?id=67174

Patch by Mark Hahnenberg <[email protected]> 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):

(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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/JavaScriptCore.exp

    r93918 r94364  
    111111__ZN3JSC10Identifier5equalEPKN3WTF10StringImplEPKc
    112112__ZN3JSC10Identifier8toUInt32ERKNS_7UStringERb
     113__ZN3JSC10JSFunction14finishCreationEPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_18FunctionExecutableEPNS_14ScopeChainNodeE
     114__ZN3JSC10JSFunction14finishCreationEPNS_9ExecStateEPNS_14JSGlobalObjectEiRKNS_10IdentifierEPNS_14ExecutableBaseE
    113115__ZN3JSC10JSFunction4nameEPNS_9ExecStateE
     116__ZN3JSC10JSFunction6createEPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEiRKNS_10IdentifierEPFPvS2_E
    114117__ZN3JSC10JSFunction6s_infoE
     118__ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE
    115119__ZN3JSC10throwErrorEPNS_9ExecStateENS_7JSValueE
    116120__ZN3JSC10throwErrorEPNS_9ExecStateEPNS_8JSObjectE
    117121__ZN3JSC11JSByteArray13s_defaultInfoE
    118122__ZN3JSC11JSByteArray15createStructureERNS_12JSGlobalDataENS_7JSValueEPKNS_9ClassInfoE
    119 __ZN3JSC11JSByteArray6createEPNS_9ExecStateEPNS_9StructureEPN3WTF9ByteArrayE
     123__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEPNS_9StructureEPN3WTF9ByteArrayE
    120124__ZN3JSC11ParserArena5resetEv
    121125__ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE
     
    134138__ZN3JSC12JSGlobalData14sharedInstanceEv
    135139__ZN3JSC12JSGlobalData15dumpRegExpTraceEv
     140__ZN3JSC12JSGlobalData15getHostFunctionEPFPvPNS_9ExecStateEE
    136141__ZN3JSC12JSGlobalData22clearBuiltinStructuresEv
    137142#ifndef NDEBUG
     
    197202__ZN3JSC17constructFunctionEPNS_9ExecStateEPNS_14JSGlobalObjectERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi
    198203__ZN3JSC17createSyntaxErrorEPNS_9ExecStateERKNS_7UStringE
    199 __ZN3JSC18DebuggerActivationC1ERNS_12JSGlobalDataEPNS_8JSObjectE
     204__ZN3JSC18DebuggerActivation6createERNS_12JSGlobalDataEPNS_8JSObjectE
    200205__ZN3JSC18PropertyDescriptor11setWritableEb
    201206__ZN3JSC18PropertyDescriptor12setUndefinedEv
     
    220225__ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
    221226__ZN3JSC24DynamicGlobalObjectScopeC1ERNS_12JSGlobalDataEPNS_14JSGlobalObjectE
     227__ZN3JSC24JSObjectWithGlobalObject14finishCreationERNS_12JSGlobalDataEPNS_14JSGlobalObjectE
     228__ZN3JSC24JSObjectWithGlobalObjectC2ERNS_12JSGlobalDataEPNS_9StructureE
    222229__ZN3JSC24JSObjectWithGlobalObjectC2EPNS_14JSGlobalObjectEPNS_9StructureE
    223 __ZN3JSC24JSObjectWithGlobalObjectC2ERNS_12JSGlobalDataEPNS_14JSGlobalObjectEPNS_9StructureE
    224230__ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE
    225231__ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE
     
    270276__ZN3JSC6RegExp6createERNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE
    271277__ZN3JSC7JSArray13visitChildrenERNS_11SlotVisitorE
     278__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataE
     279__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataERKNS_7ArgListE
    272280__ZN3JSC7JSArray15setSubclassDataEPv
    273281__ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
     282__ZN3JSC7JSArray6createERNS_12JSGlobalDataEPNS_9StructureERKNS_7ArgListE
     283__ZN3JSC7JSArray6createERNS_12JSGlobalDataEPNS_9StructureE
    274284__ZN3JSC7JSArray6s_infoE
    275285__ZN3JSC7JSArray9setLengthEj
    276286__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE
    277 __ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureERKNS_7ArgListE
    278287__ZN3JSC7JSArrayC2ERNS_12JSGlobalDataEPNS_9StructureE
    279288__ZN3JSC7JSArrayD2Ev
Note: See TracChangeset for help on using the changeset viewer.