Changeset 94644 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Sep 7, 2011, 12:01:29 AM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 71 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackConstructor.cpp
r94627 r94644 44 44 , m_callback(callback) 45 45 { 46 finishCreation(globalObject, jsClass); 46 47 } 47 48 -
trunk/Source/JavaScriptCore/API/JSCallbackConstructor.h
r94627 r94644 38 38 static JSCallbackConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, JSObjectCallAsConstructorCallback callback) 39 39 { 40 JSCallbackConstructor* constructor = new (allocateCell<JSCallbackConstructor>(*exec->heap())) JSCallbackConstructor(globalObject, structure, classRef, callback); 41 constructor->finishCreation(globalObject, classRef); 42 return constructor; 40 return new (allocateCell<JSCallbackConstructor>(*exec->heap())) JSCallbackConstructor(globalObject, structure, classRef, callback); 43 41 } 44 42 -
trunk/Source/JavaScriptCore/API/JSCallbackFunction.cpp
r94627 r94644 44 44 45 45 JSCallbackFunction::JSCallbackFunction(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const Identifier& name) 46 : InternalFunction( globalObject, globalObject->callbackFunctionStructure())46 : InternalFunction(&exec->globalData(), globalObject, globalObject->callbackFunctionStructure(), name) 47 47 , m_callback(callback) 48 48 { 49 finishCreation(exec->globalData(), globalObject, name);50 }51 52 void JSCallbackFunction::finishCreation(JSGlobalData& globalData, JSGlobalObject* globalObject, const Identifier& name)53 {54 Base::finishCreation(globalData, globalObject, name);55 49 ASSERT(inherits(&s_info)); 56 50 } -
trunk/Source/JavaScriptCore/API/JSCallbackFunction.h
r94627 r94644 35 35 protected: 36 36 JSCallbackFunction(ExecState*, JSGlobalObject*, JSObjectCallAsFunctionCallback, const Identifier& name); 37 void finishCreation(JSGlobalData&, JSGlobalObject*, const Identifier& name);38 37 39 38 public: -
trunk/Source/JavaScriptCore/ChangeLog
r94640 r94644 1 2011-09-07 Sheriff Bot <[email protected]> 2 3 Unreviewed, rolling out r94627 and r94632. 4 http://trac.webkit.org/changeset/94627 5 http://trac.webkit.org/changeset/94632 6 https://bugs.webkit.org/show_bug.cgi?id=67698 7 8 It broke tests on GTK and Qt (Requested by Ossy on #webkit). 9 10 * API/JSCallbackConstructor.cpp: 11 (JSC::JSCallbackConstructor::JSCallbackConstructor): 12 * API/JSCallbackConstructor.h: 13 (JSC::JSCallbackConstructor::create): 14 * API/JSCallbackFunction.cpp: 15 (JSC::JSCallbackFunction::JSCallbackFunction): 16 * API/JSCallbackFunction.h: 17 * JavaScriptCore.exp: 18 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 19 * debugger/DebuggerActivation.cpp: 20 (JSC::DebuggerActivation::create): 21 * debugger/DebuggerActivation.h: 22 * jsc.cpp: 23 (GlobalObject::constructorBody): 24 (GlobalObject::GlobalObject): 25 * runtime/ArrayConstructor.cpp: 26 (JSC::ArrayConstructor::ArrayConstructor): 27 * runtime/ArrayConstructor.h: 28 * runtime/ArrayPrototype.cpp: 29 (JSC::ArrayPrototype::ArrayPrototype): 30 * runtime/ArrayPrototype.h: 31 (JSC::ArrayPrototype::create): 32 * runtime/BooleanConstructor.cpp: 33 (JSC::BooleanConstructor::BooleanConstructor): 34 * runtime/BooleanConstructor.h: 35 * runtime/BooleanObject.cpp: 36 (JSC::BooleanObject::BooleanObject): 37 * runtime/BooleanObject.h: 38 (JSC::BooleanObject::create): 39 * runtime/BooleanPrototype.cpp: 40 (JSC::BooleanPrototype::BooleanPrototype): 41 * runtime/BooleanPrototype.h: 42 * runtime/DateConstructor.cpp: 43 (JSC::DateConstructor::DateConstructor): 44 * runtime/DateConstructor.h: 45 * runtime/DateInstance.cpp: 46 (JSC::DateInstance::DateInstance): 47 * runtime/DateInstance.h: 48 (JSC::DateInstance::create): 49 * runtime/DatePrototype.cpp: 50 (JSC::DatePrototype::DatePrototype): 51 * runtime/DatePrototype.h: 52 * runtime/Error.cpp: 53 (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction): 54 * runtime/ErrorConstructor.cpp: 55 (JSC::ErrorConstructor::ErrorConstructor): 56 * runtime/ErrorConstructor.h: 57 (JSC::ErrorConstructor::create): 58 * runtime/ErrorPrototype.cpp: 59 (JSC::ErrorPrototype::ErrorPrototype): 60 * runtime/ErrorPrototype.h: 61 (JSC::ErrorPrototype::create): 62 * runtime/FunctionConstructor.cpp: 63 (JSC::FunctionConstructor::FunctionConstructor): 64 * runtime/FunctionConstructor.h: 65 * runtime/FunctionPrototype.cpp: 66 (JSC::FunctionPrototype::FunctionPrototype): 67 * runtime/FunctionPrototype.h: 68 * runtime/InternalFunction.cpp: 69 (JSC::InternalFunction::InternalFunction): 70 * runtime/InternalFunction.h: 71 * runtime/JSActivation.cpp: 72 (JSC::JSActivation::JSActivation): 73 * runtime/JSActivation.h: 74 (JSC::JSActivation::create): 75 * runtime/JSGlobalObject.h: 76 (JSC::JSGlobalObject::create): 77 (JSC::JSGlobalObject::JSGlobalObject): 78 * runtime/JSONObject.cpp: 79 (JSC::JSONObject::JSONObject): 80 * runtime/JSONObject.h: 81 (JSC::JSONObject::create): 82 * runtime/JSStaticScopeObject.h: 83 (JSC::JSStaticScopeObject::create): 84 (JSC::JSStaticScopeObject::JSStaticScopeObject): 85 * runtime/JSString.cpp: 86 (JSC::StringObject::create): 87 * runtime/MathObject.cpp: 88 (JSC::MathObject::MathObject): 89 * runtime/MathObject.h: 90 (JSC::MathObject::create): 91 * runtime/NativeErrorConstructor.cpp: 92 (JSC::NativeErrorConstructor::NativeErrorConstructor): 93 * runtime/NativeErrorConstructor.h: 94 (JSC::NativeErrorConstructor::constructorBody): 95 * runtime/NativeErrorPrototype.cpp: 96 (JSC::NativeErrorPrototype::NativeErrorPrototype): 97 (JSC::NativeErrorPrototype::constructorBody): 98 * runtime/NativeErrorPrototype.h: 99 * runtime/NumberConstructor.cpp: 100 (JSC::NumberConstructor::NumberConstructor): 101 * runtime/NumberConstructor.h: 102 * runtime/NumberObject.cpp: 103 (JSC::NumberObject::NumberObject): 104 * runtime/NumberObject.h: 105 (JSC::NumberObject::create): 106 * runtime/NumberPrototype.cpp: 107 (JSC::NumberPrototype::NumberPrototype): 108 * runtime/NumberPrototype.h: 109 * runtime/ObjectConstructor.cpp: 110 (JSC::ObjectConstructor::ObjectConstructor): 111 * runtime/ObjectConstructor.h: 112 * runtime/RegExpConstructor.cpp: 113 (JSC::RegExpConstructor::RegExpConstructor): 114 (JSC::RegExpMatchesArray::RegExpMatchesArray): 115 * runtime/RegExpConstructor.h: 116 * runtime/RegExpMatchesArray.h: 117 (JSC::RegExpMatchesArray::create): 118 * runtime/RegExpObject.cpp: 119 (JSC::RegExpObject::RegExpObject): 120 * runtime/RegExpObject.h: 121 (JSC::RegExpObject::create): 122 * runtime/RegExpPrototype.cpp: 123 (JSC::RegExpPrototype::RegExpPrototype): 124 * runtime/StringConstructor.cpp: 125 (JSC::StringConstructor::StringConstructor): 126 * runtime/StringConstructor.h: 127 * runtime/StringObject.cpp: 128 (JSC::StringObject::StringObject): 129 * runtime/StringObject.h: 130 (JSC::StringObject::create): 131 * runtime/StringObjectThatMasqueradesAsUndefined.h: 132 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): 133 * runtime/StringPrototype.cpp: 134 (JSC::StringPrototype::StringPrototype): 135 * runtime/StringPrototype.h: 136 1 137 2011-09-06 Xianzhu Wang <[email protected]> 2 138 -
trunk/Source/JavaScriptCore/JavaScriptCore.exp
r94632 r94644 124 124 __ZN3JSC11createErrorEPNS_9ExecStateERKNS_7UStringE 125 125 __ZN3JSC11regExpFlagsERKNS_7UStringE 126 __ZN3JSC12DateInstance14finishCreationERNS_12JSGlobalDataEd127 126 __ZN3JSC12DateInstance6s_infoE 128 __ZN3JSC12DateInstanceC1EPNS_9ExecStateEPNS_9StructureE 127 __ZN3JSC12DateInstanceC1EPNS_9ExecStateEPNS_9StructureEd 129 128 __ZN3JSC12JSGlobalData10ClientDataD2Ev 130 129 __ZN3JSC12JSGlobalData11jsArrayVPtrE … … 140 139 __ZN3JSC12JSGlobalData6createENS_15ThreadStackTypeENS_8HeapSizeE 141 140 __ZN3JSC12JSGlobalDataD1Ev 142 __ZN3JSC12RegExpObject14finishCreationEPNS_14JSGlobalObjectE143 141 __ZN3JSC12RegExpObject6s_infoE 144 142 __ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEPNS_9StructureEPNS_6RegExpE … … 147 145 __ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh 148 146 __ZN3JSC12StringObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE 149 __ZN3JSC12StringObject14finishCreationERNS_12JSGlobalDataEPNS_8JSStringE150 147 __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE 151 148 __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE … … 154 151 __ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE 155 152 __ZN3JSC12StringObject6s_infoE 156 __ZN3JSC12StringObjectC2ERNS_12JSGlobalDataEPNS_9StructureE 153 __ZN3JSC12StringObjectC2ERNS_12JSGlobalDataEPNS_9StructureEPNS_8JSStringE 157 154 __ZN3JSC13SamplingFlags4stopEv 158 155 __ZN3JSC13SamplingFlags5startEv … … 185 182 __ZN3JSC15createTypeErrorEPNS_9ExecStateERKNS_7UStringE 186 183 __ZN3JSC16InternalFunction12vtableAnchorEv 187 __ZN3JSC16InternalFunction14finishCreationERNS_12JSGlobalDataEPNS_14JSGlobalObjectERKNS_10IdentifierE188 184 __ZN3JSC16InternalFunction4nameEPNS_9ExecStateE 189 185 __ZN3JSC16InternalFunction6s_infoE 190 __ZN3JSC16InternalFunctionC2EPNS_1 4JSGlobalObjectEPNS_9StructureE186 __ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEPNS_14JSGlobalObjectEPNS_9StructureERKNS_10IdentifierE 191 187 __ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE 192 188 __ZN3JSC16JSVariableObject14symbolTableGetERKNS_10IdentifierERNS_18PropertyDescriptorE … … 200 196 __ZN3JSC17constructFunctionEPNS_9ExecStateEPNS_14JSGlobalObjectERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi 201 197 __ZN3JSC17createSyntaxErrorEPNS_9ExecStateERKNS_7UStringE 202 __ZN3JSC18DebuggerActivation14finishCreationERNS_12JSGlobalDataEPNS_8JSObjectE 203 __ZN3JSC18DebuggerActivationC1ERNS_12JSGlobalDataE 198 __ZN3JSC18DebuggerActivation6createERNS_12JSGlobalDataEPNS_8JSObjectE 204 199 __ZN3JSC18PropertyDescriptor11setWritableEb 205 200 __ZN3JSC18PropertyDescriptor12setUndefinedEv -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r94627 r94644 4 4 ??0CString@WTF@@QAE@PBDI@Z 5 5 ??0Collator@WTF@@QAE@PBD@Z 6 ??0DateInstance@JSC@@IAE@PAVExecState@1@PAVStructure@1@ @Z6 ??0DateInstance@JSC@@IAE@PAVExecState@1@PAVStructure@1@N@Z 7 7 ??0DefaultGCActivityCallback@JSC@@QAE@PAVHeap@1@@Z 8 8 ??0DropAllLocks@JSLock@JSC@@QAE@W4JSLockBehavior@2@@Z 9 ??0DynamicGlobalObjectScope@JSC@@QAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@@Z 10 ??0InternalFunction@JSC@@IAE@PAVJSGlobal Object@1@PAVStructure@1@@Z9 ??0DynamicGlobalObjectScope@JSC@@QAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@@Z 10 ??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@PAVJSGlobalObject@1@PAVStructure@1@ABVIdentifier@1@@Z 11 11 ??0JSArray@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z 12 12 ??0JSByteArray@JSC@@AAE@PAVExecState@1@PAVStructure@1@PAVByteArray@WTF@@@Z … … 20 20 ??0RegExpObject@JSC@@IAE@PAVJSGlobalObject@1@PAVStructure@1@PAVRegExp@1@@Z 21 21 ??0SHA1@WTF@@QAE@XZ 22 ??0StringObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@ @Z22 ??0StringObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@PAVJSString@1@@Z 23 23 ??0Structure@JSC@@AAE@AAVJSGlobalData@1@VJSValue@1@ABVTypeInfo@1@IPBUClassInfo@1@@Z 24 24 ??0ThreadCondition@WTF@@QAE@XZ … … 176 176 ?fillGetterPropertySlot@JSObject@JSC@@QAEXAAVPropertySlot@2@PAV?$WriteBarrierBase@W4Unknown@JSC@@@2@@Z 177 177 ?finalize@WeakHandleOwner@JSC@@UAEXV?$Handle@W4Unknown@JSC@@@2@PAX@Z 178 ?finishCreation@DateInstance@JSC@@IAEXAAVJSGlobalData@2@N@Z179 ?finishCreation@InternalFunction@JSC@@IAEXAAVJSGlobalData@2@PAVJSGlobalObject@2@ABVIdentifier@2@@Z180 178 ?finishCreation@JSArray@JSC@@IAEXAAVJSGlobalData@2@@Z 181 179 ?finishCreation@JSArray@JSC@@IAEXAAVJSGlobalData@2@ABVArgList@2@@Z 182 180 ?finishCreation@JSFunction@JSC@@IAEXPAVExecState@2@PAVJSGlobalObject@2@HABVIdentifier@2@PAVExecutableBase@2@@Z 183 181 ?finishCreation@JSObjectWithGlobalObject@JSC@@IAEXAAVJSGlobalData@2@PAVJSGlobalObject@2@@Z 184 ?finishCreation@RegExpObject@JSC@@IAEXPAVJSGlobalObject@2@@Z185 ?finishCreation@StringObject@JSC@@IAEXAAVJSGlobalData@2@PAVJSString@2@@Z186 182 ?focus@Profile@JSC@@QAEXPBVProfileNode@2@@Z 187 183 ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@H@Z -
trunk/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
r94627 r94644 34 34 : JSNonFinalObject(globalData, globalData.debuggerActivationStructure.get()) 35 35 { 36 } 37 38 DebuggerActivation* DebuggerActivation::create(JSGlobalData& globalData, JSObject* object) 39 { 40 DebuggerActivation* activation = new (allocateCell<DebuggerActivation>(globalData.heap)) DebuggerActivation(globalData); 41 activation->finishCreation(globalData, object); 42 return activation; 36 43 } 37 44 -
trunk/Source/JavaScriptCore/debugger/DebuggerActivation.h
r94627 r94644 35 35 typedef JSNonFinalObject Base; 36 36 37 static DebuggerActivation* create(JSGlobalData& globalData, JSObject* object) 38 { 39 DebuggerActivation* activation = new (allocateCell<DebuggerActivation>(globalData.heap)) DebuggerActivation(globalData); 40 activation->finishCreation(globalData, object); 41 return activation; 42 } 43 37 static DebuggerActivation* create(JSGlobalData&, JSObject*); 44 38 virtual void visitChildren(SlotVisitor&); 45 39 virtual UString className() const; -
trunk/Source/JavaScriptCore/jsc.cpp
r94627 r94644 158 158 159 159 protected: 160 void finishCreation(JSGlobalData& globalData,const Vector<UString>& arguments)160 void constructorBody(const Vector<UString>& arguments) 161 161 { 162 Base::finishCreation(globalData, this);163 162 putDirectFunction(globalExec(), JSFunction::create(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "debug"), functionDebug)); 164 163 putDirectFunction(globalExec(), JSFunction::create(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "print"), functionPrint)); … … 192 191 : JSGlobalObject(globalData, structure) 193 192 { 194 finishCreation(globalData,arguments);193 constructorBody(arguments); 195 194 } 196 195 -
trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp
r94627 r94644 53 53 54 54 ArrayConstructor::ArrayConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrayPrototype) 55 : InternalFunction( globalObject, structure)55 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, arrayPrototype->classInfo()->className)) 56 56 { 57 finishCreation(exec, globalObject, arrayPrototype);58 }59 60 void ArrayConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, ArrayPrototype* arrayPrototype)61 {62 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, arrayPrototype->classInfo()->className));63 57 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly); 64 58 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete); -
trunk/Source/JavaScriptCore/runtime/ArrayConstructor.h
r94627 r94644 45 45 46 46 protected: 47 void finishCreation(ExecState*, JSGlobalObject*, ArrayPrototype*);48 47 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; 49 48 -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r94627 r94644 118 118 : JSArray(globalObject->globalData(), structure) 119 119 { 120 finishCreation(globalObject); 120 121 } 121 122 -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.h
r94627 r94644 36 36 static ArrayPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 37 37 { 38 ArrayPrototype* prototype = new (allocateCell<ArrayPrototype>(*exec->heap())) ArrayPrototype(globalObject, structure); 39 prototype->finishCreation(globalObject); 40 return prototype; 38 return new (allocateCell<ArrayPrototype>(*exec->heap())) ArrayPrototype(globalObject, structure); 41 39 } 42 40 -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp
r94627 r94644 30 30 31 31 BooleanConstructor::BooleanConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, BooleanPrototype* booleanPrototype) 32 : InternalFunction( globalObject, structure)32 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, booleanPrototype->classInfo()->className)) 33 33 { 34 finishCreation(exec, globalObject, booleanPrototype);35 }36 37 void BooleanConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, BooleanPrototype* booleanPrototype)38 {39 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, booleanPrototype->classInfo()->className));40 34 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly); 41 35 -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.h
r94627 r94644 37 37 } 38 38 39 protected:40 void finishCreation(ExecState*, JSGlobalObject*, BooleanPrototype*);41 42 39 private: 43 40 BooleanConstructor(ExecState*, JSGlobalObject*, Structure*, BooleanPrototype*); -
trunk/Source/JavaScriptCore/runtime/BooleanObject.cpp
r94627 r94644 31 31 : JSWrapperObject(globalData, structure) 32 32 { 33 finishCreation(globalData); 33 34 } 34 35 -
trunk/Source/JavaScriptCore/runtime/BooleanObject.h
r94627 r94644 36 36 static BooleanObject* create(JSGlobalData& globalData, Structure* structure) 37 37 { 38 BooleanObject* boolean = new (allocateCell<BooleanObject>(globalData.heap)) BooleanObject(globalData, structure); 39 boolean->finishCreation(globalData); 40 return boolean; 38 return new (allocateCell<BooleanObject>(globalData.heap)) BooleanObject(globalData, structure); 41 39 } 42 40 -
trunk/Source/JavaScriptCore/runtime/BooleanPrototype.cpp
r94627 r94644 53 53 : BooleanObject(exec->globalData(), structure) 54 54 { 55 finishCreation(exec, globalObject);56 }57 58 void BooleanPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)59 {60 Base::finishCreation(exec->globalData());61 55 setInternalValue(exec->globalData(), jsBoolean(false)); 62 56 -
trunk/Source/JavaScriptCore/runtime/BooleanPrototype.h
r94627 r94644 43 43 44 44 protected: 45 void finishCreation(ExecState*, JSGlobalObject*);46 45 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | BooleanObject::StructureFlags; 47 46 static const unsigned AnonymousSlotCount = BooleanObject::AnonymousSlotCount + 1; -
trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp
r94627 r94644 75 75 76 76 DateConstructor::DateConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, DatePrototype* datePrototype) 77 : InternalFunction(globalObject, structure) 78 { 79 finishCreation(exec, globalObject, datePrototype); 80 } 81 82 void DateConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, DatePrototype* datePrototype) 83 { 84 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, datePrototype->classInfo()->className)); 77 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, datePrototype->classInfo()->className)) 78 { 85 79 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, datePrototype, DontEnum | DontDelete | ReadOnly); 86 80 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete); -
trunk/Source/JavaScriptCore/runtime/DateConstructor.h
r94627 r94644 45 45 46 46 protected: 47 void finishCreation(ExecState*, JSGlobalObject*, DatePrototype*);48 47 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; 49 48 -
trunk/Source/JavaScriptCore/runtime/DateInstance.cpp
r94627 r94644 38 38 : JSWrapperObject(exec->globalData(), structure) 39 39 { 40 finishCreation(exec->globalData()); 41 } 42 43 DateInstance::DateInstance(ExecState* exec, Structure* structure, double time) 44 : JSWrapperObject(exec->globalData(), structure) 45 { 46 finishCreation(exec->globalData(), time); 40 47 } 41 48 -
trunk/Source/JavaScriptCore/runtime/DateInstance.h
r94627 r94644 32 32 class DateInstance : public JSWrapperObject { 33 33 protected: 34 DateInstance(ExecState*, Structure*, double); 34 35 DateInstance(ExecState*, Structure*); 35 36 void finishCreation(JSGlobalData&); … … 41 42 static DateInstance* create(ExecState* exec, Structure* structure, double date) 42 43 { 43 DateInstance* instance = new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure); 44 instance->finishCreation(exec->globalData(), date); 45 return instance; 44 return new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure, date); 46 45 } 47 48 46 static DateInstance* create(ExecState* exec, Structure* structure) 49 47 { 50 DateInstance* instance = new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure); 51 instance->finishCreation(exec->globalData()); 52 return instance; 48 return new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure); 53 49 } 54 50 55 51 double internalNumber() const { return internalValue().uncheckedGetNumber(); } 56 52 -
trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp
r94627 r94644 433 433 : DateInstance(exec, structure) 434 434 { 435 finishCreation(exec, globalObject);436 }437 438 void DatePrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)439 {440 Base::finishCreation(exec->globalData(), jsNaN());441 435 ASSERT(inherits(&s_info)); 442 436 -
trunk/Source/JavaScriptCore/runtime/DatePrototype.h
r94627 r94644 50 50 51 51 protected: 52 void finishCreation(ExecState*, JSGlobalObject*);53 52 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | DateInstance::StructureFlags; 54 53 -
trunk/Source/JavaScriptCore/runtime/Error.cpp
r94627 r94644 169 169 private: 170 170 StrictModeTypeErrorFunction(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& message) 171 : InternalFunction( globalObject, structure)171 : InternalFunction(&exec->globalData(), globalObject, structure, exec->globalData().propertyNames->emptyIdentifier) 172 172 , m_message(message) 173 173 { 174 finishCreation(exec->globalData(), globalObject, exec->globalData().propertyNames->emptyIdentifier);175 174 } 176 175 -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp
r94627 r94644 31 31 32 32 ErrorConstructor::ErrorConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ErrorPrototype* errorPrototype) 33 : InternalFunction( globalObject, structure)33 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, errorPrototype->classInfo()->className)) 34 34 { 35 finishCreation(exec, globalObject, errorPrototype);36 }37 38 void ErrorConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, ErrorPrototype* errorPrototype)39 {40 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, errorPrototype->classInfo()->className));41 35 // ECMA 15.11.3.1 Error.prototype 42 36 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, errorPrototype, DontEnum | DontDelete | ReadOnly); -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.h
r94627 r94644 37 37 return new (allocateCell<ErrorConstructor>(*exec->heap())) ErrorConstructor(exec, globalObject, structure, errPrototype); 38 38 } 39 40 protected:41 void finishCreation(ExecState*, JSGlobalObject*, ErrorPrototype*);42 39 43 40 private: -
trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp
r94627 r94644 51 51 ASSERT_CLASS_FITS_IN_CELL(ErrorPrototype); 52 52 53 ErrorPrototype::ErrorPrototype(ExecState* exec, Structure* structure)53 ErrorPrototype::ErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 54 54 : ErrorInstance(exec->globalData(), structure) 55 55 { 56 finishCreation(exec, globalObject); 56 57 } 57 58 -
trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h
r94627 r94644 34 34 static ErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 35 35 { 36 ErrorPrototype* prototype = new (allocateCell<ErrorPrototype>(*exec->heap())) ErrorPrototype(exec, structure); 37 prototype->finishCreation(exec, globalObject); 38 return prototype; 36 return new (allocateCell<ErrorPrototype>(*exec->heap())) ErrorPrototype(exec, globalObject, structure); 39 37 } 40 38 … … 47 45 48 46 protected: 49 ErrorPrototype(ExecState*, Structure*);47 ErrorPrototype(ExecState*, JSGlobalObject*, Structure*); 50 48 void finishCreation(ExecState*, JSGlobalObject*); 51 49 -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp
r94627 r94644 39 39 40 40 FunctionConstructor::FunctionConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, FunctionPrototype* functionPrototype) 41 : InternalFunction( globalObject, structure)41 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, functionPrototype->classInfo()->className)) 42 42 { 43 finishCreation(exec, globalObject, functionPrototype);44 }45 46 void FunctionConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, FunctionPrototype* functionPrototype)47 {48 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, functionPrototype->classInfo()->className));49 43 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, functionPrototype, DontEnum | DontDelete | ReadOnly); 50 44 -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.h
r94627 r94644 39 39 private: 40 40 FunctionConstructor(ExecState*, JSGlobalObject*, Structure*, FunctionPrototype*); 41 void finishCreation(ExecState*, JSGlobalObject*, FunctionPrototype*);42 41 virtual ConstructType getConstructData(ConstructData&); 43 42 virtual CallType getCallData(CallData&); -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp
r94627 r94644 39 39 40 40 FunctionPrototype::FunctionPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 41 : InternalFunction( globalObject, structure)41 : InternalFunction(&exec->globalData(), globalObject, structure, exec->propertyNames().nullIdentifier) 42 42 { 43 finishCreation(exec, globalObject, exec->propertyNames().nullIdentifier);44 }45 46 void FunctionPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name)47 {48 Base::finishCreation(exec->globalData(), globalObject, name);49 43 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum); 50 44 } -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.h
r94627 r94644 42 42 } 43 43 44 protected:45 void finishCreation(ExecState*, JSGlobalObject*, const Identifier& name);46 47 44 private: 48 45 FunctionPrototype(ExecState*, JSGlobalObject*, Structure*); -
trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp
r94627 r94644 42 42 } 43 43 44 InternalFunction::InternalFunction(JSGlobal Object* globalObject, Structure* structure)44 InternalFunction::InternalFunction(JSGlobalData* globalData, JSGlobalObject* globalObject, Structure* structure, const Identifier& name) 45 45 : JSObjectWithGlobalObject(globalObject, structure) 46 46 { 47 finishCreation(*globalData, globalObject, name); 47 48 } 48 49 -
trunk/Source/JavaScriptCore/runtime/InternalFunction.h
r94627 r94644 53 53 InternalFunction(VPtrStealingHackType); 54 54 55 InternalFunction(JSGlobal Object*, Structure*);55 InternalFunction(JSGlobalData*, JSGlobalObject*, Structure*, const Identifier&); 56 56 57 57 void finishCreation(JSGlobalData&, JSGlobalObject*, const Identifier& name); -
trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
r94627 r94644 47 47 , m_argumentsRegister(functionExecutable->generatedBytecode().argumentsRegister()) 48 48 { 49 finishCreation(callFrame); 49 50 } 50 51 -
trunk/Source/JavaScriptCore/runtime/JSActivation.h
r94627 r94644 49 49 static JSActivation* create(JSGlobalData& globalData, CallFrame* callFrame, FunctionExecutable* funcExec) 50 50 { 51 JSActivation* activation = new (allocateCell<JSActivation>(globalData.heap)) JSActivation(callFrame, funcExec); 52 activation->finishCreation(callFrame); 53 return activation; 51 return new (allocateCell<JSActivation>(globalData.heap)) JSActivation(callFrame, funcExec); 54 52 } 55 53 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r94627 r94644 147 147 static JSGlobalObject* create(JSGlobalData& globalData, Structure* structure) 148 148 { 149 JSGlobalObject* globalObject = new (allocateCell<JSGlobalObject>(globalData.heap)) JSGlobalObject(globalData, structure); 150 globalObject->finishCreation(globalData, globalObject); 151 return globalObject; 149 return new (allocateCell<JSGlobalObject>(globalData.heap)) JSGlobalObject(globalData, structure); 152 150 } 153 151 … … 162 160 , m_evalEnabled(true) 163 161 { 162 finishCreation(globalData, this); 163 } 164 165 JSGlobalObject(JSGlobalData& globalData, Structure* structure, JSObject* thisValue) 166 : JSVariableObject(globalData, structure, &m_symbolTable, 0) 167 , m_registerArraySize(0) 168 , m_globalScopeChain() 169 , m_weakRandom(static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0))) 170 , m_evalEnabled(true) 171 { 172 finishCreation(globalData, thisValue); 164 173 } 165 174 -
trunk/Source/JavaScriptCore/runtime/JSONObject.cpp
r94627 r94644 57 57 : JSObjectWithGlobalObject(globalObject, structure) 58 58 { 59 finishCreation(globalObject); 59 60 } 60 61 -
trunk/Source/JavaScriptCore/runtime/JSONObject.h
r94627 r94644 39 39 static JSONObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 40 40 { 41 JSONObject* object = new (allocateCell<JSONObject>(*exec->heap())) JSONObject(globalObject, structure); 42 object->finishCreation(globalObject); 43 return object; 41 return new (allocateCell<JSONObject>(*exec->heap())) JSONObject(globalObject, structure); 44 42 } 45 43 -
trunk/Source/JavaScriptCore/runtime/JSStaticScopeObject.h
r94627 r94644 37 37 static JSStaticScopeObject* create(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes) 38 38 { 39 JSStaticScopeObject* scopeObject = new (allocateCell<JSStaticScopeObject>(*exec->heap())) JSStaticScopeObject(exec); 40 scopeObject->finishCreation(exec, identifier, value, attributes); 41 return scopeObject; 39 return new (allocateCell<JSStaticScopeObject>(*exec->heap())) JSStaticScopeObject(exec, identifier, value, attributes); 42 40 } 43 41 … … 62 60 63 61 private: 64 JSStaticScopeObject(ExecState* exec )62 JSStaticScopeObject(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes) 65 63 : JSVariableObject(exec->globalData(), exec->globalData().staticScopeStructure.get(), &m_symbolTable, reinterpret_cast<Register*>(&m_registerStore + 1)) 66 64 { 65 finishCreation(exec, identifier, value, attributes); 67 66 } 68 67 -
trunk/Source/JavaScriptCore/runtime/JSString.cpp
r94627 r94644 299 299 inline StringObject* StringObject::create(ExecState* exec, JSGlobalObject* globalObject, JSString* string) 300 300 { 301 StringObject* object = new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), globalObject->stringObjectStructure()); 302 object->finishCreation(exec->globalData(), string); 303 return object; 301 return new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), globalObject->stringObjectStructure(), string); 304 302 } 305 303 -
trunk/Source/JavaScriptCore/runtime/MathObject.cpp
r94627 r94644 85 85 */ 86 86 87 MathObject::MathObject( JSGlobalObject* globalObject, Structure* structure)87 MathObject::MathObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 88 88 : JSObjectWithGlobalObject(globalObject, structure) 89 89 { 90 finishCreation(exec, globalObject); 90 91 } 91 92 -
trunk/Source/JavaScriptCore/runtime/MathObject.h
r94627 r94644 28 28 class MathObject : public JSObjectWithGlobalObject { 29 29 private: 30 MathObject( JSGlobalObject*, Structure*);30 MathObject(ExecState*, JSGlobalObject*, Structure*); 31 31 32 32 public: … … 35 35 static MathObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 36 36 { 37 MathObject* object = new (allocateCell<MathObject>(*exec->heap())) MathObject(globalObject, structure); 38 object->finishCreation(exec, globalObject); 39 return object; 37 return new (allocateCell<MathObject>(*exec->heap())) MathObject(exec, globalObject, structure); 40 38 } 41 39 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r94627 r94644 34 34 35 35 NativeErrorConstructor::NativeErrorConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, Structure* prototypeStructure, const UString& name) 36 : InternalFunction( globalObject, structure)36 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, name)) 37 37 { 38 finishCreation(exec, globalObject, prototypeStructure, name);38 constructorBody(exec, globalObject, prototypeStructure, name); 39 39 } 40 40 -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h
r94627 r94644 50 50 51 51 protected: 52 void finishCreation(ExecState* exec, JSGlobalObject* globalObject, Structure* prototypeStructure, const UString& name)52 void constructorBody(ExecState* exec, JSGlobalObject* globalObject, Structure* prototypeStructure, const UString& name) 53 53 { 54 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, name));55 54 ASSERT(inherits(&s_info)); 56 55 -
trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp
r94627 r94644 31 31 ASSERT_CLASS_FITS_IN_CELL(NativeErrorPrototype); 32 32 33 NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& name AndMessage, NativeErrorConstructor* constructor)34 : ErrorPrototype(exec, structure)33 NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& name, NativeErrorConstructor* constructor) 34 : ErrorPrototype(exec, globalObject, structure) 35 35 { 36 finishCreation(exec, globalObject, nameAndMessage, constructor);36 constructorBody(exec, name, constructor); 37 37 } 38 38 39 inline void NativeErrorPrototype:: finishCreation(ExecState* exec, JSGlobalObject* globalObject, const UString& nameAndMessage, NativeErrorConstructor* constructor)39 inline void NativeErrorPrototype::constructorBody(ExecState* exec, const UString& name, NativeErrorConstructor* constructor) 40 40 { 41 Base::finishCreation(exec, globalObject); 42 putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, nameAndMessage), DontEnum); 43 putDirect(exec->globalData(), exec->propertyNames().message, jsString(exec, nameAndMessage), DontEnum); 41 putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, name), DontEnum); 42 putDirect(exec->globalData(), exec->propertyNames().message, jsEmptyString(exec), DontEnum); 44 43 putDirect(exec->globalData(), exec->propertyNames().constructor, constructor, DontEnum); 45 44 } -
trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h
r94627 r94644 40 40 41 41 protected: 42 void finishCreation(ExecState*, JSGlobalObject*, const UString& nameAndMessage, NativeErrorConstructor*);42 void constructorBody(ExecState*, const UString& name, NativeErrorConstructor*); 43 43 }; 44 44 -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp
r94627 r94644 56 56 57 57 NumberConstructor::NumberConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NumberPrototype* numberPrototype) 58 : InternalFunction( globalObject, structure)58 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, numberPrototype->s_info.className)) 59 59 { 60 finishCreation(exec, globalObject, numberPrototype);61 }62 63 void NumberConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, NumberPrototype* numberPrototype)64 {65 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, numberPrototype->s_info.className));66 60 ASSERT(inherits(&s_info)); 67 61 -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.h
r94627 r94644 51 51 52 52 protected: 53 void finishCreation(ExecState*, JSGlobalObject*, NumberPrototype*);54 53 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags; 55 54 -
trunk/Source/JavaScriptCore/runtime/NumberObject.cpp
r94627 r94644 35 35 : JSWrapperObject(globalData, structure) 36 36 { 37 finishCreation(globalData); 37 38 } 38 39 -
trunk/Source/JavaScriptCore/runtime/NumberObject.h
r94627 r94644 36 36 static NumberObject* create(JSGlobalData& globalData, Structure* structure) 37 37 { 38 NumberObject* number = new (allocateCell<NumberObject>(globalData.heap)) NumberObject(globalData, structure); 39 number->finishCreation(globalData); 40 return number; 38 return new (allocateCell<NumberObject>(globalData.heap)) NumberObject(globalData, structure); 41 39 } 42 40 -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp
r94640 r94644 73 73 : NumberObject(exec->globalData(), structure) 74 74 { 75 finishCreation(exec, globalObject);76 }77 78 void NumberPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)79 {80 Base::finishCreation(exec->globalData());81 75 setInternalValue(exec->globalData(), jsNumber(0)); 82 76 -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.h
r94627 r94644 43 43 44 44 protected: 45 void finishCreation(ExecState*, JSGlobalObject*);46 45 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NumberObject::StructureFlags; 47 46 static const unsigned AnonymousSlotCount = NumberObject::AnonymousSlotCount + 1; -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r94627 r94644 77 77 78 78 ObjectConstructor::ObjectConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ObjectPrototype* objectPrototype) 79 : InternalFunction(globalObject, structure) 80 { 81 finishCreation(exec, globalObject, objectPrototype); 82 } 83 84 void ObjectConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, ObjectPrototype* objectPrototype) 85 { 86 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, "Object")); 79 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, "Object")) 80 { 87 81 // ECMA 15.2.3.1 88 82 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, objectPrototype, DontEnum | DontDelete | ReadOnly); -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h
r94627 r94644 48 48 49 49 protected: 50 void finishCreation(ExecState*, JSGlobalObject*, ObjectPrototype*);51 50 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; 52 51 -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp
r94627 r94644 97 97 98 98 RegExpConstructor::RegExpConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExpPrototype* regExpPrototype) 99 : InternalFunction( globalObject, structure)99 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, "RegExp")) 100 100 , d(adoptPtr(new RegExpConstructorPrivate)) 101 101 { 102 finishCreation(exec, globalObject, regExpPrototype);103 }104 105 void RegExpConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, RegExpPrototype* regExpPrototype)106 {107 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, "RegExp"));108 102 ASSERT(inherits(&s_info)); 109 103 … … 115 109 } 116 110 117 RegExpMatchesArray::RegExpMatchesArray(ExecState* exec )111 RegExpMatchesArray::RegExpMatchesArray(ExecState* exec, RegExpConstructorPrivate* data) 118 112 : JSArray(exec->globalData(), exec->lexicalGlobalObject()->regExpMatchesArrayStructure()) 119 113 { 114 finishCreation(exec->globalData(), data); 120 115 } 121 116 -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h
r94627 r94644 91 91 92 92 protected: 93 void finishCreation(ExecState*, JSGlobalObject*, RegExpPrototype*);94 93 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags; 95 94 -
trunk/Source/JavaScriptCore/runtime/RegExpMatchesArray.h
r94627 r94644 27 27 class RegExpMatchesArray : public JSArray { 28 28 private: 29 RegExpMatchesArray(ExecState* );29 RegExpMatchesArray(ExecState*, RegExpConstructorPrivate*); 30 30 31 31 public: … … 34 34 static RegExpMatchesArray* create(ExecState* exec, RegExpConstructorPrivate* ctorPrivate) 35 35 { 36 RegExpMatchesArray* regExp = new (allocateCell<RegExpMatchesArray>(*exec->heap())) RegExpMatchesArray(exec); 37 regExp->finishCreation(exec->globalData(), ctorPrivate); 38 return regExp; 36 return new (allocateCell<RegExpMatchesArray>(*exec->heap())) RegExpMatchesArray(exec, ctorPrivate); 39 37 } 40 38 virtual ~RegExpMatchesArray(); -
trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
r94627 r94644 67 67 , d(adoptPtr(new RegExpObjectData(globalObject->globalData(), this, regExp))) 68 68 { 69 finishCreation(globalObject); 69 70 } 70 71 -
trunk/Source/JavaScriptCore/runtime/RegExpObject.h
r94627 r94644 33 33 static RegExpObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp) 34 34 { 35 RegExpObject* object = new (allocateCell<RegExpObject>(*exec->heap())) RegExpObject(globalObject, structure, regExp); 36 object->finishCreation(globalObject); 37 return object; 35 return new (allocateCell<RegExpObject>(*exec->heap())) RegExpObject(globalObject, structure, regExp); 38 36 } 39 37 40 38 static RegExpObject* create(JSGlobalData& globalData, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp) 41 39 { 42 RegExpObject* object = new (allocateCell<RegExpObject>(globalData.heap)) RegExpObject(globalObject, structure, regExp); 43 object->finishCreation(globalObject); 44 return object; 40 return new (allocateCell<RegExpObject>(globalData.heap)) RegExpObject(globalObject, structure, regExp); 45 41 } 46 42 -
trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp
r94627 r94644 66 66 : RegExpObject(globalObject, structure, regExp) 67 67 { 68 finishCreation(globalObject);69 68 } 70 69 -
trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp
r94627 r94644 49 49 50 50 StringConstructor::StringConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, StringPrototype* stringPrototype) 51 : InternalFunction( globalObject, structure)51 : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, stringPrototype->classInfo()->className)) 52 52 { 53 finishCreation(exec, globalObject, stringPrototype);54 }55 56 void StringConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, StringPrototype* stringPrototype)57 {58 Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, stringPrototype->classInfo()->className));59 53 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, stringPrototype, ReadOnly | DontEnum | DontDelete); 60 54 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete); -
trunk/Source/JavaScriptCore/runtime/StringConstructor.h
r94627 r94644 45 45 46 46 protected: 47 void finishCreation(ExecState*, JSGlobalObject*, StringPrototype*);48 47 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; 49 48 -
trunk/Source/JavaScriptCore/runtime/StringObject.cpp
r94627 r94644 30 30 const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0 }; 31 31 32 StringObject::StringObject(JSGlobalData& globalData, Structure* structure )32 StringObject::StringObject(JSGlobalData& globalData, Structure* structure, JSString* string) 33 33 : JSWrapperObject(globalData, structure) 34 34 { 35 finishCreation(globalData, string); 35 36 } 36 37 -
trunk/Source/JavaScriptCore/runtime/StringObject.h
r94627 r94644 34 34 { 35 35 JSString* string = jsEmptyString(exec); 36 StringObject* object = new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), structure); 37 object->finishCreation(exec->globalData(), string); 38 return object; 36 return new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), structure, string); 39 37 } 40 38 static StringObject* create(ExecState* exec, Structure* structure, const UString& str) 41 39 { 42 40 JSString* string = jsString(exec, str); 43 StringObject* object = new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), structure); 44 object->finishCreation(exec->globalData(), string); 45 return object; 41 return new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), structure, string); 46 42 } 47 43 static StringObject* create(ExecState*, JSGlobalObject*, JSString*); … … 67 63 void finishCreation(JSGlobalData&, JSString*); 68 64 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | JSWrapperObject::StructureFlags; 69 StringObject(JSGlobalData&, Structure* );65 StringObject(JSGlobalData&, Structure*, JSString*); 70 66 }; 71 67 -
trunk/Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
r94627 r94644 42 42 private: 43 43 StringObjectThatMasqueradesAsUndefined(ExecState* exec, Structure* structure, JSString* string) 44 : StringObject(exec->globalData(), structure )44 : StringObject(exec->globalData(), structure, string) 45 45 { 46 finishCreation(exec->globalData(), string);47 46 } 48 47 -
trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp
r94627 r94644 132 132 133 133 // ECMA 15.5.4 134 StringPrototype::StringPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSString* nameAndMessage) 135 : StringObject(exec->globalData(), structure) 136 { 137 finishCreation(exec, globalObject, nameAndMessage); 138 } 139 140 void StringPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject, JSString* nameAndMessage) 141 { 142 Base::finishCreation(exec->globalData(), nameAndMessage); 134 StringPrototype::StringPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSString* string) 135 : StringObject(exec->globalData(), structure, string) 136 { 143 137 ASSERT(inherits(&s_info)); 144 138 -
trunk/Source/JavaScriptCore/runtime/StringPrototype.h
r94627 r94644 51 51 52 52 protected: 53 void finishCreation(ExecState*, JSGlobalObject*, JSString*);54 53 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | StringObject::StructureFlags; 55 54
Note:
See TracChangeset
for help on using the changeset viewer.