Changeset 156498 in webkit
- Timestamp:
- Sep 26, 2013 2:43:49 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r156497 r156498 1 2013-09-26 Andreas Kling <akling@apple.com> 2 3 Pass VM instead of ExecState to many finishCreation() functions. 4 <https://webkit.org/b/121975> 5 6 Reviewed by Sam Weinig. 7 8 Reduce unnecessary loads by passing the VM to object creation 9 functions that don't need the ExecState. 10 11 There are tons of opportunities in this area, I'm just scratching 12 the surface. 13 1 14 2013-09-26 Commit Queue <commit-queue@webkit.org> 2 15 -
trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp
r155711 r156498 60 60 } 61 61 62 void ArrayConstructor::finishCreation( ExecState* exec, ArrayPrototype* arrayPrototype)62 void ArrayConstructor::finishCreation(VM& vm, ArrayPrototype* arrayPrototype) 63 63 { 64 Base::finishCreation( exec->vm(), arrayPrototype->classInfo()->className);65 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);66 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);64 Base::finishCreation(vm, arrayPrototype->classInfo()->className); 65 putDirectWithoutTransition(vm, vm.propertyNames->prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly); 66 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete); 67 67 } 68 68 -
trunk/Source/JavaScriptCore/runtime/ArrayConstructor.h
r154373 r156498 36 36 static ArrayConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrayPrototype) 37 37 { 38 ArrayConstructor* constructor = new (NotNull, allocateCell<ArrayConstructor>(*exec->heap())) ArrayConstructor(globalObject, structure); 39 constructor->finishCreation(exec, arrayPrototype); 38 VM& vm = exec->vm(); 39 ArrayConstructor* constructor = new (NotNull, allocateCell<ArrayConstructor>(vm.heap)) ArrayConstructor(globalObject, structure); 40 constructor->finishCreation(vm, arrayPrototype); 40 41 return constructor; 41 42 } … … 49 50 50 51 protected: 51 void finishCreation( ExecState*, ArrayPrototype*);52 void finishCreation(VM&, ArrayPrototype*); 52 53 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; 53 54 -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp
r155143 r156498 37 37 } 38 38 39 void BooleanConstructor::finishCreation( ExecState* exec, BooleanPrototype* booleanPrototype)39 void BooleanConstructor::finishCreation(VM& vm, BooleanPrototype* booleanPrototype) 40 40 { 41 Base::finishCreation( exec->vm(), booleanPrototype->classInfo()->className);42 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);41 Base::finishCreation(vm, booleanPrototype->classInfo()->className); 42 putDirectWithoutTransition(vm, vm.propertyNames->prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly); 43 43 44 44 // no. of arguments for constructor 45 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);45 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum); 46 46 } 47 47 -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.h
r154038 r156498 34 34 static BooleanConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, BooleanPrototype* booleanPrototype) 35 35 { 36 BooleanConstructor* constructor = new (NotNull, allocateCell<BooleanConstructor>(*exec->heap())) BooleanConstructor(globalObject, structure); 37 constructor->finishCreation(exec, booleanPrototype); 36 VM& vm = exec->vm(); 37 BooleanConstructor* constructor = new (NotNull, allocateCell<BooleanConstructor>(vm.heap)) BooleanConstructor(globalObject, structure); 38 constructor->finishCreation(vm, booleanPrototype); 38 39 return constructor; 39 40 } … … 47 48 48 49 protected: 49 void finishCreation( ExecState*, BooleanPrototype*);50 void finishCreation(VM&, BooleanPrototype*); 50 51 51 52 private: -
trunk/Source/JavaScriptCore/runtime/BooleanPrototype.cpp
r155143 r156498 56 56 } 57 57 58 void BooleanPrototype::finishCreation( ExecState* exec, JSGlobalObject*)58 void BooleanPrototype::finishCreation(VM& vm, JSGlobalObject*) 59 59 { 60 Base::finishCreation( exec->vm());61 setInternalValue( exec->vm(), jsBoolean(false));60 Base::finishCreation(vm); 61 setInternalValue(vm, jsBoolean(false)); 62 62 63 63 ASSERT(inherits(info())); -
trunk/Source/JavaScriptCore/runtime/BooleanPrototype.h
r154373 r156498 32 32 static BooleanPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 33 33 { 34 BooleanPrototype* prototype = new (NotNull, allocateCell<BooleanPrototype>(*exec->heap())) BooleanPrototype(exec, structure); 35 prototype->finishCreation(exec, globalObject); 34 VM& vm = exec->vm(); 35 BooleanPrototype* prototype = new (NotNull, allocateCell<BooleanPrototype>(vm.heap)) BooleanPrototype(exec, structure); 36 prototype->finishCreation(vm, globalObject); 36 37 return prototype; 37 38 } … … 45 46 46 47 protected: 47 void finishCreation( ExecState*, JSGlobalObject*);48 void finishCreation(VM&, JSGlobalObject*); 48 49 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | BooleanObject::StructureFlags; 49 50 -
trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp
r155143 r156498 80 80 } 81 81 82 void DateConstructor::finishCreation( ExecState* exec, DatePrototype* datePrototype)83 { 84 Base::finishCreation( exec->vm(), datePrototype->classInfo()->className);85 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, datePrototype, DontEnum | DontDelete | ReadOnly);86 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete);82 void DateConstructor::finishCreation(VM& vm, DatePrototype* datePrototype) 83 { 84 Base::finishCreation(vm, datePrototype->classInfo()->className); 85 putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, DontEnum | DontDelete | ReadOnly); 86 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum | DontDelete); 87 87 } 88 88 -
trunk/Source/JavaScriptCore/runtime/DateConstructor.h
r154373 r156498 35 35 { 36 36 DateConstructor* constructor = new (NotNull, allocateCell<DateConstructor>(*exec->heap())) DateConstructor(globalObject, structure); 37 constructor->finishCreation(exec , datePrototype);37 constructor->finishCreation(exec->vm(), datePrototype); 38 38 return constructor; 39 39 } … … 47 47 48 48 protected: 49 void finishCreation( ExecState*, DatePrototype*);49 void finishCreation(VM&, DatePrototype*); 50 50 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; 51 51 -
trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp
r156240 r156498 507 507 } 508 508 509 void DatePrototype::finishCreation( ExecState* exec, JSGlobalObject*)510 { 511 Base::finishCreation( exec->vm());509 void DatePrototype::finishCreation(VM& vm, JSGlobalObject*) 510 { 511 Base::finishCreation(vm); 512 512 ASSERT(inherits(info())); 513 513 -
trunk/Source/JavaScriptCore/runtime/DatePrototype.h
r154373 r156498 37 37 static DatePrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 38 38 { 39 DatePrototype* prototype = new (NotNull, allocateCell<DatePrototype>(*exec->heap())) DatePrototype(exec, structure); 40 prototype->finishCreation(exec, globalObject); 39 VM& vm = exec->vm(); 40 DatePrototype* prototype = new (NotNull, allocateCell<DatePrototype>(vm.heap)) DatePrototype(exec, structure); 41 prototype->finishCreation(vm, globalObject); 41 42 return prototype; 42 43 } … … 51 52 52 53 protected: 53 void finishCreation( ExecState*, JSGlobalObject*);54 void finishCreation(VM&, JSGlobalObject*); 54 55 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | DateInstance::StructureFlags; 55 56 }; -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp
r155143 r156498 39 39 } 40 40 41 void ErrorConstructor::finishCreation( ExecState* exec, ErrorPrototype* errorPrototype)41 void ErrorConstructor::finishCreation(VM& vm, ErrorPrototype* errorPrototype) 42 42 { 43 Base::finishCreation( exec->vm(), errorPrototype->classInfo()->className);43 Base::finishCreation(vm, errorPrototype->classInfo()->className); 44 44 // ECMA 15.11.3.1 Error.prototype 45 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);46 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum);45 putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, DontEnum | DontDelete | ReadOnly); 46 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum); 47 47 } 48 48 -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.h
r154038 r156498 35 35 static ErrorConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ErrorPrototype* errorPrototype) 36 36 { 37 ErrorConstructor* constructor = new (NotNull, allocateCell<ErrorConstructor>(*exec->heap())) ErrorConstructor(globalObject, structure); 38 constructor->finishCreation(exec, errorPrototype); 37 VM& vm = exec->vm(); 38 ErrorConstructor* constructor = new (NotNull, allocateCell<ErrorConstructor>(vm.heap)) ErrorConstructor(globalObject, structure); 39 constructor->finishCreation(vm, errorPrototype); 39 40 return constructor; 40 41 } … … 48 49 49 50 protected: 50 void finishCreation( ExecState*, ErrorPrototype*);51 void finishCreation(VM&, ErrorPrototype*); 51 52 52 53 private: -
trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp
r155143 r156498 55 55 } 56 56 57 void ErrorPrototype::finishCreation( ExecState* exec, JSGlobalObject*)57 void ErrorPrototype::finishCreation(VM& vm, JSGlobalObject*) 58 58 { 59 Base::finishCreation( exec->vm(), "");59 Base::finishCreation(vm, ""); 60 60 ASSERT(inherits(info())); 61 putDirect( exec->vm(), exec->propertyNames().name, jsNontrivialString(exec, String(ASCIILiteral("Error"))), DontEnum);61 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Error"))), DontEnum); 62 62 } 63 63 -
trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h
r154373 r156498 34 34 static ErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 35 35 { 36 ErrorPrototype* prototype = new (NotNull, allocateCell<ErrorPrototype>(*exec->heap())) ErrorPrototype(exec, structure); 37 prototype->finishCreation(exec, globalObject); 36 VM& vm = exec->vm(); 37 ErrorPrototype* prototype = new (NotNull, allocateCell<ErrorPrototype>(vm.heap)) ErrorPrototype(exec, structure); 38 prototype->finishCreation(vm, globalObject); 38 39 return prototype; 39 40 } … … 48 49 protected: 49 50 ErrorPrototype(ExecState*, Structure*); 50 void finishCreation( ExecState*, JSGlobalObject*);51 void finishCreation(VM&, JSGlobalObject*); 51 52 52 53 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ErrorInstance::StructureFlags; -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp
r155143 r156498 45 45 } 46 46 47 void FunctionConstructor::finishCreation( ExecState* exec, FunctionPrototype* functionPrototype)47 void FunctionConstructor::finishCreation(VM& vm, FunctionPrototype* functionPrototype) 48 48 { 49 Base::finishCreation( exec->vm(), functionPrototype->classInfo()->className);50 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);49 Base::finishCreation(vm, functionPrototype->classInfo()->className); 50 putDirectWithoutTransition(vm, vm.propertyNames->prototype, functionPrototype, DontEnum | DontDelete | ReadOnly); 51 51 52 52 // Number of arguments for constructor 53 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);53 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum); 54 54 } 55 55 -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.h
r154038 r156498 38 38 static FunctionConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, FunctionPrototype* functionPrototype) 39 39 { 40 FunctionConstructor* constructor = new (NotNull, allocateCell<FunctionConstructor>(*exec->heap())) FunctionConstructor(globalObject, structure); 41 constructor->finishCreation(exec, functionPrototype); 40 VM& vm = exec->vm(); 41 FunctionConstructor* constructor = new (NotNull, allocateCell<FunctionConstructor>(vm.heap)) FunctionConstructor(globalObject, structure); 42 constructor->finishCreation(vm, functionPrototype); 42 43 return constructor; 43 44 } … … 52 53 private: 53 54 FunctionConstructor(JSGlobalObject*, Structure*); 54 void finishCreation( ExecState*, FunctionPrototype*);55 void finishCreation(VM&, FunctionPrototype*); 55 56 static ConstructType getConstructData(JSCell*, ConstructData&); 56 57 static CallType getCallData(JSCell*, CallData&); -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp
r155143 r156498 48 48 } 49 49 50 void FunctionPrototype::finishCreation( ExecState* exec, const String& name)51 { 52 Base::finishCreation( exec->vm(), name);53 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);50 void FunctionPrototype::finishCreation(VM& vm, const String& name) 51 { 52 Base::finishCreation(vm, name); 53 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum); 54 54 } 55 55 -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.h
r154038 r156498 32 32 static FunctionPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 33 33 { 34 FunctionPrototype* prototype = new (NotNull, allocateCell<FunctionPrototype>(*exec->heap())) FunctionPrototype(globalObject, structure); 35 prototype->finishCreation(exec, String()); 34 VM& vm = exec->vm(); 35 FunctionPrototype* prototype = new (NotNull, allocateCell<FunctionPrototype>(vm.heap)) FunctionPrototype(globalObject, structure); 36 prototype->finishCreation(vm, String()); 36 37 return prototype; 37 38 } … … 47 48 48 49 protected: 49 void finishCreation( ExecState*, const String& name);50 void finishCreation(VM&, const String& name); 50 51 51 52 private: -
trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h
r154038 r156498 47 47 static JSAPIValueWrapper* create(ExecState* exec, JSValue value) 48 48 { 49 JSAPIValueWrapper* wrapper = new (NotNull, allocateCell<JSAPIValueWrapper>(*exec->heap())) JSAPIValueWrapper(exec); 50 wrapper->finishCreation(exec, value); 49 VM& vm = exec->vm(); 50 JSAPIValueWrapper* wrapper = new (NotNull, allocateCell<JSAPIValueWrapper>(vm.heap)) JSAPIValueWrapper(exec); 51 wrapper->finishCreation(vm, value); 51 52 return wrapper; 52 53 } 53 54 54 55 protected: 55 void finishCreation( ExecState* exec, JSValue value)56 void finishCreation(VM& vm, JSValue value) 56 57 { 57 Base::finishCreation( exec->vm());58 m_value.set( exec->vm(), this, value);58 Base::finishCreation(vm); 59 m_value.set(vm, this, value); 59 60 ASSERT(!value.isCell()); 60 61 } -
trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
r156240 r156498 77 77 JSBoundFunction* JSBoundFunction::create(ExecState* exec, JSGlobalObject* globalObject, JSObject* targetFunction, JSValue boundThis, JSValue boundArgs, int length, const String& name) 78 78 { 79 VM& vm = exec->vm(); 79 80 ConstructData constructData; 80 81 ConstructType constructType = JSC::getConstructData(targetFunction, constructData); 81 82 bool canConstruct = constructType != ConstructTypeNone; 82 NativeExecutable* executable = exec->vm().getHostFunction(boundFunctionCall, canConstruct ? boundFunctionConstruct : callHostFunctionAsConstructor);83 JSBoundFunction* function = new (NotNull, allocateCell<JSBoundFunction>( *exec->heap())) JSBoundFunction(exec, globalObject, globalObject->boundFunctionStructure(), targetFunction, boundThis, boundArgs);83 NativeExecutable* executable = vm.getHostFunction(boundFunctionCall, canConstruct ? boundFunctionConstruct : callHostFunctionAsConstructor); 84 JSBoundFunction* function = new (NotNull, allocateCell<JSBoundFunction>(vm.heap)) JSBoundFunction(exec, globalObject, globalObject->boundFunctionStructure(), targetFunction, boundThis, boundArgs); 84 85 85 86 function->finishCreation(exec, executable, length, name); … … 107 108 void JSBoundFunction::finishCreation(ExecState* exec, NativeExecutable* executable, int length, const String& name) 108 109 { 109 Base::finishCreation(exec, executable, length, name); 110 VM& vm = exec->vm(); 111 Base::finishCreation(vm, executable, length, name); 110 112 ASSERT(inherits(info())); 111 113 112 putDirectAccessor(exec, exec->propertyNames().arguments, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);113 putDirectAccessor(exec, exec->propertyNames().caller, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);114 putDirectAccessor(exec, vm.propertyNames->arguments, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor); 115 putDirectAccessor(exec, vm.propertyNames->caller, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor); 114 116 } 115 117 -
trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
r155081 r156498 64 64 JSFunction* JSFunction::create(ExecState* exec, JSGlobalObject* globalObject, int length, const String& name, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor) 65 65 { 66 VM& vm = exec->vm(); 67 66 68 NativeExecutable* executable; 67 69 #if !ENABLE(JIT) … … 70 72 if (intrinsic != NoIntrinsic && exec->vm().canUseJIT()) { 71 73 ASSERT(nativeConstructor == callHostFunctionAsConstructor); 72 executable = exec->vm().getHostFunction(nativeFunction, intrinsic);74 executable = vm.getHostFunction(nativeFunction, intrinsic); 73 75 } else 74 76 #endif 75 executable = exec->vm().getHostFunction(nativeFunction, nativeConstructor);76 77 JSFunction* function = new (NotNull, allocateCell<JSFunction>( *exec->heap())) JSFunction(exec, globalObject, globalObject->functionStructure());77 executable = vm.getHostFunction(nativeFunction, nativeConstructor); 78 79 JSFunction* function = new (NotNull, allocateCell<JSFunction>(vm.heap)) JSFunction(exec, globalObject, globalObject->functionStructure()); 78 80 // Can't do this during initialization because getHostFunction might do a GC allocation. 79 function->finishCreation( exec, executable, length, name);81 function->finishCreation(vm, executable, length, name); 80 82 return function; 81 83 } … … 103 105 } 104 106 105 void JSFunction::finishCreation( ExecState* exec, NativeExecutable* executable, int length, const String& name)106 { 107 Base::finishCreation( exec->vm());107 void JSFunction::finishCreation(VM& vm, NativeExecutable* executable, int length, const String& name) 108 { 109 Base::finishCreation(vm); 108 110 ASSERT(inherits(info())); 109 m_executable.set( exec->vm(), this, executable);110 putDirect( exec->vm(), exec->vm().propertyNames->name, jsString(exec, name), DontDelete | ReadOnly | DontEnum);111 putDirect( exec->vm(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);111 m_executable.set(vm, this, executable); 112 putDirect(vm, vm.propertyNames->name, jsString(&vm, name), DontDelete | ReadOnly | DontEnum); 113 putDirect(vm, vm.propertyNames->length, jsNumber(length), DontDelete | ReadOnly | DontEnum); 112 114 } 113 115 -
trunk/Source/JavaScriptCore/runtime/JSFunction.h
r154422 r156498 166 166 JSFunction(VM&, FunctionExecutable*, JSScope*); 167 167 168 void finishCreation( ExecState*, NativeExecutable*, int length, const String& name);168 void finishCreation(VM&, NativeExecutable*, int length, const String& name); 169 169 using Base::finishCreation; 170 170 -
trunk/Source/JavaScriptCore/runtime/JSNameScope.h
r154038 r156498 39 39 static JSNameScope* create(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes) 40 40 { 41 JSNameScope* scopeObject = new (NotNull, allocateCell<JSNameScope>(*exec->heap())) JSNameScope(exec, exec->scope()); 42 scopeObject->finishCreation(exec, identifier, value, attributes); 41 VM& vm = exec->vm(); 42 JSNameScope* scopeObject = new (NotNull, allocateCell<JSNameScope>(vm.heap)) JSNameScope(exec, exec->scope()); 43 scopeObject->finishCreation(vm, identifier, value, attributes); 43 44 return scopeObject; 44 45 } … … 46 47 static JSNameScope* create(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes, JSScope* next) 47 48 { 48 JSNameScope* scopeObject = new (NotNull, allocateCell<JSNameScope>(*exec->heap())) JSNameScope(exec, next); 49 scopeObject->finishCreation(exec, identifier, value, attributes); 49 VM& vm = exec->vm(); 50 JSNameScope* scopeObject = new (NotNull, allocateCell<JSNameScope>(vm.heap)) JSNameScope(exec, next); 51 scopeObject->finishCreation(vm, identifier, value, attributes); 50 52 return scopeObject; 51 53 } … … 61 63 62 64 protected: 63 void finishCreation( ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes)65 void finishCreation(VM& vm, const Identifier& identifier, JSValue value, unsigned attributes) 64 66 { 65 Base::finishCreation( exec->vm());66 m_registerStore.set( exec->vm(), this, value);67 Base::finishCreation(vm); 68 m_registerStore.set(vm, this, value); 67 69 symbolTable()->add(identifier.impl(), SymbolTableEntry(-1, attributes)); 68 70 } -
trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp
r156240 r156498 68 68 JSPromiseConstructor* JSPromiseConstructor::create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSPromisePrototype* promisePrototype) 69 69 { 70 JSPromiseConstructor* constructor = new (NotNull, allocateCell<JSPromiseConstructor>(*exec->heap())) JSPromiseConstructor(globalObject, structure); 71 constructor->finishCreation(exec, promisePrototype); 70 VM& vm = exec->vm(); 71 JSPromiseConstructor* constructor = new (NotNull, allocateCell<JSPromiseConstructor>(vm.heap)) JSPromiseConstructor(globalObject, structure); 72 constructor->finishCreation(vm, promisePrototype); 72 73 return constructor; 73 74 } … … 83 84 } 84 85 85 void JSPromiseConstructor::finishCreation( ExecState* exec, JSPromisePrototype* promisePrototype)86 void JSPromiseConstructor::finishCreation(VM& vm, JSPromisePrototype* promisePrototype) 86 87 { 87 Base::finishCreation( exec->vm(), "Promise");88 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, promisePrototype, DontEnum | DontDelete | ReadOnly);89 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);88 Base::finishCreation(vm, "Promise"); 89 putDirectWithoutTransition(vm, vm.propertyNames->prototype, promisePrototype, DontEnum | DontDelete | ReadOnly); 90 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete); 90 91 } 91 92 -
trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.h
r154847 r156498 45 45 46 46 protected: 47 void finishCreation( ExecState*, JSPromisePrototype*);47 void finishCreation(VM&, JSPromisePrototype*); 48 48 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; 49 49 -
trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.cpp
r155143 r156498 64 64 JSPromisePrototype* JSPromisePrototype::create(ExecState* exec, JSGlobalObject*, Structure* structure) 65 65 { 66 JSPromisePrototype* object = new (NotNull, allocateCell<JSPromisePrototype>(*exec->heap())) JSPromisePrototype(exec, structure); 67 object->finishCreation(exec, structure); 66 VM& vm = exec->vm(); 67 JSPromisePrototype* object = new (NotNull, allocateCell<JSPromisePrototype>(vm.heap)) JSPromisePrototype(exec, structure); 68 object->finishCreation(vm, structure); 68 69 return object; 69 70 } … … 79 80 } 80 81 81 void JSPromisePrototype::finishCreation( ExecState* exec, Structure*)82 void JSPromisePrototype::finishCreation(VM& vm, Structure*) 82 83 { 83 Base::finishCreation( exec->vm());84 Base::finishCreation(vm); 84 85 } 85 86 -
trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.h
r154847 r156498 43 43 44 44 protected: 45 void finishCreation( ExecState*, Structure*);45 void finishCreation(VM&, Structure*); 46 46 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags; 47 47 -
trunk/Source/JavaScriptCore/runtime/JSPromiseResolverConstructor.cpp
r155143 r156498 43 43 JSPromiseResolverConstructor* JSPromiseResolverConstructor::create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSPromiseResolverPrototype* promisePrototype) 44 44 { 45 JSPromiseResolverConstructor* constructor = new (NotNull, allocateCell<JSPromiseResolverConstructor>(*exec->heap())) JSPromiseResolverConstructor(globalObject, structure); 46 constructor->finishCreation(exec, promisePrototype); 45 VM& vm = exec->vm(); 46 JSPromiseResolverConstructor* constructor = new (NotNull, allocateCell<JSPromiseResolverConstructor>(vm.heap)) JSPromiseResolverConstructor(globalObject, structure); 47 constructor->finishCreation(vm, promisePrototype); 47 48 return constructor; 48 49 } … … 58 59 } 59 60 60 void JSPromiseResolverConstructor::finishCreation( ExecState* exec, JSPromiseResolverPrototype* promiseResolverPrototype)61 void JSPromiseResolverConstructor::finishCreation(VM& vm, JSPromiseResolverPrototype* promiseResolverPrototype) 61 62 { 62 Base::finishCreation( exec->vm(), "PromiseResolver");63 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, promiseResolverPrototype, DontEnum | DontDelete | ReadOnly);63 Base::finishCreation(vm, "PromiseResolver"); 64 putDirectWithoutTransition(vm, vm.propertyNames->prototype, promiseResolverPrototype, DontEnum | DontDelete | ReadOnly); 64 65 } 65 66 -
trunk/Source/JavaScriptCore/runtime/JSPromiseResolverConstructor.h
r154847 r156498 45 45 46 46 protected: 47 void finishCreation( ExecState*, JSPromiseResolverPrototype*);47 void finishCreation(VM&, JSPromiseResolverPrototype*); 48 48 static const unsigned StructureFlags = InternalFunction::StructureFlags; 49 49 -
trunk/Source/JavaScriptCore/runtime/JSPromiseResolverPrototype.cpp
r155143 r156498 64 64 JSPromiseResolverPrototype* JSPromiseResolverPrototype::create(ExecState* exec, JSGlobalObject*, Structure* structure) 65 65 { 66 JSPromiseResolverPrototype* object = new (NotNull, allocateCell<JSPromiseResolverPrototype>(*exec->heap())) JSPromiseResolverPrototype(exec, structure); 67 object->finishCreation(exec, structure); 66 VM& vm = exec->vm(); 67 JSPromiseResolverPrototype* object = new (NotNull, allocateCell<JSPromiseResolverPrototype>(vm.heap)) JSPromiseResolverPrototype(exec, structure); 68 object->finishCreation(vm, structure); 68 69 return object; 69 70 } … … 79 80 } 80 81 81 void JSPromiseResolverPrototype::finishCreation( ExecState* exec, Structure*)82 void JSPromiseResolverPrototype::finishCreation(VM& vm, Structure*) 82 83 { 83 Base::finishCreation( exec->vm());84 Base::finishCreation(vm); 84 85 } 85 86 -
trunk/Source/JavaScriptCore/runtime/JSPromiseResolverPrototype.h
r154847 r156498 43 43 44 44 protected: 45 void finishCreation( ExecState*, Structure*);45 void finishCreation(VM&, Structure*); 46 46 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags; 47 47 -
trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
r156079 r156498 51 51 o->structure()->enumerationCache()->cachedPrototypeChain() != o->structure()->prototypeChain(exec)); 52 52 53 VM& vm = exec->vm(); 54 53 55 PropertyNameArray propertyNames(exec); 54 56 o->methodTable()->getPropertyNames(o, exec, propertyNames, ExcludeDontEnumProperties); … … 58 60 numCacheableSlots = propertyNames.numCacheableSlots(); 59 61 60 JSPropertyNameIterator* jsPropertyNameIterator = new (NotNull, allocateCell<JSPropertyNameIterator>( *exec->heap())) JSPropertyNameIterator(exec, propertyNames.data(), numCacheableSlots);61 jsPropertyNameIterator->finishCreation( exec, propertyNames.data(), o);62 JSPropertyNameIterator* jsPropertyNameIterator = new (NotNull, allocateCell<JSPropertyNameIterator>(vm.heap)) JSPropertyNameIterator(exec, propertyNames.data(), numCacheableSlots); 63 jsPropertyNameIterator->finishCreation(vm, propertyNames.data(), o); 62 64 63 65 if (o->structure()->isDictionary()) … … 78 80 } 79 81 80 jsPropertyNameIterator->setCachedPrototypeChain( exec->vm(), structureChain);81 jsPropertyNameIterator->setCachedStructure( exec->vm(), o->structure());82 o->structure()->setEnumerationCache( exec->vm(), jsPropertyNameIterator);82 jsPropertyNameIterator->setCachedPrototypeChain(vm, structureChain); 83 jsPropertyNameIterator->setCachedStructure(vm, o->structure()); 84 o->structure()->setEnumerationCache(vm, jsPropertyNameIterator); 83 85 return jsPropertyNameIterator; 84 86 } -
trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
r156079 r156498 78 78 79 79 protected: 80 void finishCreation( ExecState* exec, PropertyNameArrayData* propertyNameArrayData, JSObject* object)80 void finishCreation(VM& vm, PropertyNameArrayData* propertyNameArrayData, JSObject* object) 81 81 { 82 Base::finishCreation( exec->vm());82 Base::finishCreation(vm); 83 83 PropertyNameArrayData::PropertyNameVector& propertyNameVector = propertyNameArrayData->propertyNameVector(); 84 84 for (size_t i = 0; i < m_jsStringsSize; ++i) 85 m_jsStrings[i].set( exec->vm(), this, jsOwnedString(exec, propertyNameVector[i].string()));85 m_jsStrings[i].set(vm, this, jsOwnedString(&vm, propertyNameVector[i].string())); 86 86 m_cachedStructureInlineCapacity = object->structure()->inlineCapacity(); 87 87 } -
trunk/Source/JavaScriptCore/runtime/MapConstructor.cpp
r154861 r156498 38 38 const ClassInfo MapConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(MapConstructor) }; 39 39 40 void MapConstructor::finishCreation( ExecState* exec, MapPrototype* mapPrototype)40 void MapConstructor::finishCreation(VM& vm, MapPrototype* mapPrototype) 41 41 { 42 Base::finishCreation( exec->vm(), mapPrototype->classInfo()->className);43 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, mapPrototype, DontEnum | DontDelete | ReadOnly);44 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(0), ReadOnly | DontEnum | DontDelete);42 Base::finishCreation(vm, mapPrototype->classInfo()->className); 43 putDirectWithoutTransition(vm, vm.propertyNames->prototype, mapPrototype, DontEnum | DontDelete | ReadOnly); 44 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete); 45 45 } 46 46 -
trunk/Source/JavaScriptCore/runtime/MapConstructor.h
r154861 r156498 39 39 static MapConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, MapPrototype* mapPrototype) 40 40 { 41 MapConstructor* constructor = new (NotNull, allocateCell<MapConstructor>(*exec->heap())) MapConstructor(globalObject, structure); 42 constructor->finishCreation(exec, mapPrototype); 41 VM& vm = exec->vm(); 42 MapConstructor* constructor = new (NotNull, allocateCell<MapConstructor>(vm.heap)) MapConstructor(globalObject, structure); 43 constructor->finishCreation(vm, mapPrototype); 43 44 return constructor; 44 45 } … … 56 57 { 57 58 } 58 void finishCreation( ExecState*, MapPrototype*);59 void finishCreation(VM&, MapPrototype*); 59 60 static ConstructType getConstructData(JSCell*, ConstructData&); 60 61 static CallType getCallData(JSCell*, CallData&); -
trunk/Source/JavaScriptCore/runtime/NameConstructor.cpp
r156240 r156498 42 42 } 43 43 44 void NameConstructor::finishCreation( ExecState* exec, NamePrototype* prototype)44 void NameConstructor::finishCreation(VM& vm, NamePrototype* prototype) 45 45 { 46 Base::finishCreation( exec->vm(), prototype->classInfo()->className);47 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, prototype, DontEnum | DontDelete | ReadOnly);48 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum);46 Base::finishCreation(vm, prototype->classInfo()->className); 47 putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly); 48 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum); 49 49 } 50 50 -
trunk/Source/JavaScriptCore/runtime/NameConstructor.h
r154038 r156498 40 40 static NameConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NamePrototype* prototype) 41 41 { 42 NameConstructor* constructor = new (NotNull, allocateCell<NameConstructor>(*exec->heap())) NameConstructor(globalObject, structure); 43 constructor->finishCreation(exec, prototype); 42 VM& vm = exec->vm(); 43 NameConstructor* constructor = new (NotNull, allocateCell<NameConstructor>(vm.heap)) NameConstructor(globalObject, structure); 44 constructor->finishCreation(vm, prototype); 44 45 return constructor; 45 46 } … … 53 54 54 55 protected: 55 void finishCreation( ExecState*, NamePrototype*);56 void finishCreation(VM&, NamePrototype*); 56 57 57 58 private: -
trunk/Source/JavaScriptCore/runtime/NamePrototype.cpp
r154373 r156498 53 53 } 54 54 55 void NamePrototype::finishCreation( ExecState* exec)55 void NamePrototype::finishCreation(VM& vm) 56 56 { 57 Base::finishCreation( exec->vm());57 Base::finishCreation(vm); 58 58 ASSERT(inherits(info())); 59 59 } -
trunk/Source/JavaScriptCore/runtime/NamePrototype.h
r154373 r156498 37 37 static NamePrototype* create(ExecState* exec, Structure* structure) 38 38 { 39 NamePrototype* prototype = new (NotNull, allocateCell<NamePrototype>(*exec->heap())) NamePrototype(exec, structure); 40 prototype->finishCreation(exec); 39 VM& vm = exec->vm(); 40 NamePrototype* prototype = new (NotNull, allocateCell<NamePrototype>(vm.heap)) NamePrototype(exec, structure); 41 prototype->finishCreation(vm); 41 42 return prototype; 42 43 } … … 51 52 protected: 52 53 NamePrototype(ExecState*, Structure*); 53 void finishCreation( ExecState*);54 void finishCreation(VM&); 54 55 55 56 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NameInstance::StructureFlags; -
trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp
r148696 r156498 34 34 } 35 35 36 void NativeErrorPrototype::finishCreation( ExecState* exec, JSGlobalObject* globalObject, const WTF::String& nameAndMessage, NativeErrorConstructor* constructor)36 void NativeErrorPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, const WTF::String& nameAndMessage, NativeErrorConstructor* constructor) 37 37 { 38 Base::finishCreation( exec, globalObject);39 putDirect( exec->vm(), exec->propertyNames().name, jsString(exec, nameAndMessage), DontEnum);40 putDirect( exec->vm(), exec->propertyNames().message, jsEmptyString(exec), DontEnum);41 putDirect( exec->vm(), exec->propertyNames().constructor, constructor, DontEnum);38 Base::finishCreation(vm, globalObject); 39 putDirect(vm, vm.propertyNames->name, jsString(&vm, nameAndMessage), DontEnum); 40 putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), DontEnum); 41 putDirect(vm, vm.propertyNames->constructor, constructor, DontEnum); 42 42 } 43 43 -
trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h
r127191 r156498 36 36 static NativeErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const String& name, NativeErrorConstructor* constructor) 37 37 { 38 NativeErrorPrototype* prototype = new (NotNull, allocateCell<NativeErrorPrototype>(*exec->heap())) NativeErrorPrototype(exec, structure); 39 prototype->finishCreation(exec, globalObject, name, constructor); 38 VM& vm = exec->vm(); 39 NativeErrorPrototype* prototype = new (NotNull, allocateCell<NativeErrorPrototype>(vm.heap)) NativeErrorPrototype(exec, structure); 40 prototype->finishCreation(vm, globalObject, name, constructor); 40 41 return prototype; 41 42 } 42 43 43 44 protected: 44 void finishCreation( ExecState*, JSGlobalObject*, const String& nameAndMessage, NativeErrorConstructor*);45 void finishCreation(VM&, JSGlobalObject*, const String& nameAndMessage, NativeErrorConstructor*); 45 46 }; 46 47 -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp
r156240 r156498 61 61 } 62 62 63 void NumberConstructor::finishCreation( ExecState* exec, NumberPrototype* numberPrototype)63 void NumberConstructor::finishCreation(VM& vm, NumberPrototype* numberPrototype) 64 64 { 65 Base::finishCreation( exec->vm(), NumberPrototype::info()->className);65 Base::finishCreation(vm, NumberPrototype::info()->className); 66 66 ASSERT(inherits(info())); 67 67 68 68 // Number.Prototype 69 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);69 putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberPrototype, DontEnum | DontDelete | ReadOnly); 70 70 71 71 // no. of arguments for constructor 72 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);72 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete); 73 73 } 74 74 -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.h
r154373 r156498 34 34 static NumberConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NumberPrototype* numberPrototype) 35 35 { 36 NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(*exec->heap())) NumberConstructor(globalObject, structure); 37 constructor->finishCreation(exec, numberPrototype); 36 VM& vm = exec->vm(); 37 NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(vm.heap)) NumberConstructor(globalObject, structure); 38 constructor->finishCreation(vm, numberPrototype); 38 39 return constructor; 39 40 } … … 54 55 55 56 protected: 56 void finishCreation( ExecState*, NumberPrototype*);57 void finishCreation(VM&, NumberPrototype*); 57 58 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags; 58 59 -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp
r155143 r156498 76 76 } 77 77 78 void NumberPrototype::finishCreation( ExecState* exec, JSGlobalObject*)79 { 80 Base::finishCreation( exec->vm());81 setInternalValue( exec->vm(), jsNumber(0));78 void NumberPrototype::finishCreation(VM& vm, JSGlobalObject*) 79 { 80 Base::finishCreation(vm); 81 setInternalValue(vm, jsNumber(0)); 82 82 83 83 ASSERT(inherits(info())); -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.h
r154373 r156498 32 32 static NumberPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) 33 33 { 34 NumberPrototype* prototype = new (NotNull, allocateCell<NumberPrototype>(*exec->heap())) NumberPrototype(exec, structure); 35 prototype->finishCreation(exec, globalObject); 34 VM& vm = exec->vm(); 35 NumberPrototype* prototype = new (NotNull, allocateCell<NumberPrototype>(vm.heap)) NumberPrototype(exec, structure); 36 prototype->finishCreation(vm, globalObject); 36 37 return prototype; 37 38 } … … 45 46 46 47 protected: 47 void finishCreation( ExecState*, JSGlobalObject*);48 void finishCreation(VM&, JSGlobalObject*); 48 49 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NumberObject::StructureFlags; 49 50 -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r156240 r156498 86 86 } 87 87 88 void ObjectConstructor::finishCreation( ExecState* exec, ObjectPrototype* objectPrototype)89 { 90 Base::finishCreation( exec->vm(), Identifier(exec, "Object").string());88 void ObjectConstructor::finishCreation(VM& vm, ObjectPrototype* objectPrototype) 89 { 90 Base::finishCreation(vm, Identifier(&vm, "Object").string()); 91 91 // ECMA 15.2.3.1 92 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);92 putDirectWithoutTransition(vm, vm.propertyNames->prototype, objectPrototype, DontEnum | DontDelete | ReadOnly); 93 93 // no. of arguments for constructor 94 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);94 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete); 95 95 } 96 96 -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h
r154373 r156498 36 36 static ObjectConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ObjectPrototype* objectPrototype) 37 37 { 38 ObjectConstructor* constructor = new (NotNull, allocateCell<ObjectConstructor>(*exec->heap())) ObjectConstructor(globalObject, structure); 39 constructor->finishCreation(exec, objectPrototype); 38 VM& vm = exec->vm(); 39 ObjectConstructor* constructor = new (NotNull, allocateCell<ObjectConstructor>(vm.heap)) ObjectConstructor(globalObject, structure); 40 constructor->finishCreation(vm, objectPrototype); 40 41 return constructor; 41 42 } … … 51 52 52 53 protected: 53 void finishCreation( ExecState*, ObjectPrototype*);54 void finishCreation(VM& vm, ObjectPrototype*); 54 55 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; 55 56 -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp
r154797 r156498 90 90 } 91 91 92 void RegExpConstructor::finishCreation( ExecState* exec, RegExpPrototype* regExpPrototype)93 { 94 Base::finishCreation( exec->vm(), Identifier(exec, "RegExp").string());92 void RegExpConstructor::finishCreation(VM& vm, RegExpPrototype* regExpPrototype) 93 { 94 Base::finishCreation(vm, Identifier(&vm, "RegExp").string()); 95 95 ASSERT(inherits(info())); 96 96 97 97 // ECMA 15.10.5.1 RegExp.prototype 98 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);98 putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly); 99 99 100 100 // no. of arguments for constructor 101 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(2), ReadOnly | DontDelete | DontEnum);101 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontDelete | DontEnum); 102 102 } 103 103 -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h
r154373 r156498 39 39 static RegExpConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExpPrototype* regExpPrototype) 40 40 { 41 RegExpConstructor* constructor = new (NotNull, allocateCell<RegExpConstructor>(*exec->heap())) RegExpConstructor(globalObject, structure, regExpPrototype); 42 constructor->finishCreation(exec, regExpPrototype); 41 VM& vm = exec->vm(); 42 RegExpConstructor* constructor = new (NotNull, allocateCell<RegExpConstructor>(vm.heap)) RegExpConstructor(globalObject, structure, regExpPrototype); 43 constructor->finishCreation(vm, regExpPrototype); 43 44 return constructor; 44 45 } … … 72 73 73 74 protected: 74 void finishCreation( ExecState*, RegExpPrototype*);75 void finishCreation(VM&, RegExpPrototype*); 75 76 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | Base::StructureFlags; 76 77 -
trunk/Source/JavaScriptCore/runtime/SetConstructor.cpp
r156240 r156498 39 39 const ClassInfo SetConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(SetConstructor) }; 40 40 41 void SetConstructor::finishCreation( ExecState* exec, SetPrototype* setPrototype)41 void SetConstructor::finishCreation(VM& vm, SetPrototype* setPrototype) 42 42 { 43 Base::finishCreation( exec->vm(), setPrototype->classInfo()->className);44 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, setPrototype, DontEnum | DontDelete | ReadOnly);45 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(0), ReadOnly | DontEnum | DontDelete);43 Base::finishCreation(vm, setPrototype->classInfo()->className); 44 putDirectWithoutTransition(vm, vm.propertyNames->prototype, setPrototype, DontEnum | DontDelete | ReadOnly); 45 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete); 46 46 } 47 47 -
trunk/Source/JavaScriptCore/runtime/SetConstructor.h
r154916 r156498 39 39 static SetConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, SetPrototype* setPrototype) 40 40 { 41 SetConstructor* constructor = new (NotNull, allocateCell<SetConstructor>(*exec->heap())) SetConstructor(globalObject, structure); 42 constructor->finishCreation(exec, setPrototype); 41 VM& vm = exec->vm(); 42 SetConstructor* constructor = new (NotNull, allocateCell<SetConstructor>(vm.heap)) SetConstructor(globalObject, structure); 43 constructor->finishCreation(vm, setPrototype); 43 44 return constructor; 44 45 } … … 56 57 { 57 58 } 58 void finishCreation( ExecState*, SetPrototype*);59 void finishCreation(VM&, SetPrototype*); 59 60 static ConstructType getConstructData(JSCell*, ConstructData&); 60 61 static CallType getCallData(JSCell*, CallData&); -
trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp
r156240 r156498 54 54 } 55 55 56 void StringConstructor::finishCreation( ExecState* exec, StringPrototype* stringPrototype)56 void StringConstructor::finishCreation(VM& vm, StringPrototype* stringPrototype) 57 57 { 58 Base::finishCreation( exec->vm(), stringPrototype->classInfo()->className);59 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);60 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);58 Base::finishCreation(vm, stringPrototype->classInfo()->className); 59 putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, ReadOnly | DontEnum | DontDelete); 60 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete); 61 61 } 62 62 -
trunk/Source/JavaScriptCore/runtime/StringConstructor.h
r154373 r156498 34 34 static StringConstructor* create(ExecState* exec, JSGlobalObject* globalObject , Structure* structure, StringPrototype* stringPrototype) 35 35 { 36 StringConstructor* constructor = new (NotNull, allocateCell<StringConstructor>(*exec->heap())) StringConstructor(globalObject, structure); 37 constructor->finishCreation(exec, stringPrototype); 36 VM& vm = exec->vm(); 37 StringConstructor* constructor = new (NotNull, allocateCell<StringConstructor>(vm.heap)) StringConstructor(globalObject, structure); 38 constructor->finishCreation(vm, stringPrototype); 38 39 return constructor; 39 40 } … … 51 52 private: 52 53 StringConstructor(JSGlobalObject*, Structure*); 53 void finishCreation( ExecState*, StringPrototype*);54 void finishCreation(VM&, StringPrototype*); 54 55 static ConstructType getConstructData(JSCell*, ConstructData&); 55 56 static CallType getCallData(JSCell*, CallData&); -
trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp
r155473 r156498 37 37 const ClassInfo WeakMapConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(WeakMapConstructor) }; 38 38 39 void WeakMapConstructor::finishCreation( ExecState* exec, WeakMapPrototype* prototype)39 void WeakMapConstructor::finishCreation(VM& vm, WeakMapPrototype* prototype) 40 40 { 41 Base::finishCreation( exec->vm(), prototype->classInfo()->className);42 putDirectWithoutTransition( exec->vm(), exec->propertyNames().prototype, prototype, DontEnum | DontDelete | ReadOnly);43 putDirectWithoutTransition( exec->vm(), exec->propertyNames().length, jsNumber(0), ReadOnly | DontEnum | DontDelete);41 Base::finishCreation(vm, prototype->classInfo()->className); 42 putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly); 43 putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete); 44 44 } 45 45 -
trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.h
r155473 r156498 39 39 static WeakMapConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, WeakMapPrototype* prototype) 40 40 { 41 WeakMapConstructor* constructor = new (NotNull, allocateCell<WeakMapConstructor>(*exec->heap())) WeakMapConstructor(globalObject, structure); 42 constructor->finishCreation(exec, prototype); 41 VM& vm = exec->vm(); 42 WeakMapConstructor* constructor = new (NotNull, allocateCell<WeakMapConstructor>(vm.heap)) WeakMapConstructor(globalObject, structure); 43 constructor->finishCreation(vm, prototype); 43 44 return constructor; 44 45 } … … 56 57 { 57 58 } 58 void finishCreation( ExecState*, WeakMapPrototype*);59 void finishCreation(VM&, WeakMapPrototype*); 59 60 static ConstructType getConstructData(JSCell*, ConstructData&); 60 61 static CallType getCallData(JSCell*, CallData&);
Note: See TracChangeset
for help on using the changeset viewer.