Changeset 157614 in webkit
- Timestamp:
- Oct 17, 2013, 4:35:47 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
runtime/JSGlobalObject.cpp (modified) (1 diff)
-
runtime/JSONObject.cpp (modified) (1 diff)
-
runtime/JSONObject.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r157612 r157614 1 2013-10-17 Andreas Kling <akling@apple.com> 2 3 Pass VM instead of JSGlobalObject to JSONObject constructor. 4 <https://webkit.org/b/122999> 5 6 JSONObject was only use the JSGlobalObject to grab at the VM. 7 Dodge a few loads by passing the VM directly instead. 8 9 Reviewed by Geoffrey Garen. 10 11 * runtime/JSONObject.cpp: 12 (JSC::JSONObject::JSONObject): 13 (JSC::JSONObject::finishCreation): 14 * runtime/JSONObject.h: 15 (JSC::JSONObject::create): 16 1 17 2013-10-17 Geoffrey Garen <ggaren@apple.com> 2 18 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r157301 r157614 396 396 putDirectWithoutTransition(vm, vm.propertyNames->eval, m_evalFunction.get(), DontEnum); 397 397 398 putDirectWithoutTransition(vm, vm.propertyNames->JSON, JSONObject::create( exec, this, JSONObject::createStructure(vm, this, m_objectPrototype.get())), DontEnum);398 putDirectWithoutTransition(vm, vm.propertyNames->JSON, JSONObject::create(vm, JSONObject::createStructure(vm, this, m_objectPrototype.get())), DontEnum); 399 399 putDirectWithoutTransition(vm, vm.propertyNames->Math, MathObject::create(vm, this, MathObject::createStructure(vm, this, m_objectPrototype.get())), DontEnum); 400 400 -
trunk/Source/JavaScriptCore/runtime/JSONObject.cpp
r156785 r157614 55 55 namespace JSC { 56 56 57 JSONObject::JSONObject( JSGlobalObject* globalObject, Structure* structure)58 : JSNonFinalObject( globalObject->vm(), structure)59 { 60 } 61 62 void JSONObject::finishCreation( JSGlobalObject* globalObject)63 { 64 Base::finishCreation( globalObject->vm());57 JSONObject::JSONObject(VM& vm, Structure* structure) 58 : JSNonFinalObject(vm, structure) 59 { 60 } 61 62 void JSONObject::finishCreation(VM& vm) 63 { 64 Base::finishCreation(vm); 65 65 ASSERT(inherits(info())); 66 66 } -
trunk/Source/JavaScriptCore/runtime/JSONObject.h
r156785 r157614 37 37 typedef JSNonFinalObject Base; 38 38 39 static JSONObject* create( ExecState* exec, JSGlobalObject* globalObject, Structure* structure)39 static JSONObject* create(VM& vm, Structure* structure) 40 40 { 41 JSONObject* object = new (NotNull, allocateCell<JSONObject>( *exec->heap())) JSONObject(globalObject, structure);42 object->finishCreation( globalObject);41 JSONObject* object = new (NotNull, allocateCell<JSONObject>(vm.heap)) JSONObject(vm, structure); 42 object->finishCreation(vm); 43 43 return object; 44 44 } … … 52 52 53 53 protected: 54 void finishCreation( JSGlobalObject*);54 void finishCreation(VM&); 55 55 static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags; 56 56 57 57 private: 58 JSONObject( JSGlobalObject*, Structure*);58 JSONObject(VM&, Structure*); 59 59 static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); 60 60
Note:
See TracChangeset
for help on using the changeset viewer.