Changeset 167842 in webkit
- Timestamp:
- Apr 25, 2014 11:00:43 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r167832 r167842 1 2014-04-25 Andreas Kling <akling@apple.com> 2 3 Inline (C++) GetByVal with numeric indices more aggressively. 4 <https://webkit.org/b/132218> 5 6 We were already inlining the string indexed GetByVal path pretty well, 7 while the path for numeric indices got neglected. No more! 8 9 ~9.5% improvement on Dromaeo/dom-traverse.html on my MBP: 10 11 Before: 199.50 runs/s 12 After: 218.58 runs/s 13 14 Reviewed by Phil Pizlo. 15 16 * dfg/DFGOperations.cpp: 17 * runtime/JSCJSValueInlines.h: 18 (JSC::JSValue::get): 19 20 ALWAYS_INLINE all the things. 21 22 * runtime/JSObject.h: 23 (JSC::JSObject::getPropertySlot): 24 25 Avoid fetching the Structure more than once. We have the same 26 optimization in the string-indexed code path. 27 1 28 2014-04-25 Oliver Hunt <oliver@apple.com> 2 29 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r167548 r167842 260 260 } 261 261 262 static inlineEncodedJSValue getByVal(ExecState* exec, JSCell* base, uint32_t index)262 static ALWAYS_INLINE EncodedJSValue getByVal(ExecState* exec, JSCell* base, uint32_t index) 263 263 { 264 264 VM& vm = exec->vm(); -
trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h
r167405 r167842 684 684 } 685 685 686 inlineJSValue JSValue::get(ExecState* exec, unsigned propertyName) const686 ALWAYS_INLINE JSValue JSValue::get(ExecState* exec, unsigned propertyName) const 687 687 { 688 688 PropertySlot slot(asValue()); … … 690 690 } 691 691 692 inlineJSValue JSValue::get(ExecState* exec, unsigned propertyName, PropertySlot& slot) const692 ALWAYS_INLINE JSValue JSValue::get(ExecState* exec, unsigned propertyName, PropertySlot& slot) const 693 693 { 694 694 // If this is a primitive, we'll need to synthesize the prototype - -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r167313 r167842 1258 1258 ALWAYS_INLINE bool JSObject::getPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) 1259 1259 { 1260 VM& vm = exec->vm(); 1260 1261 JSObject* object = this; 1261 1262 while (true) { 1262 if (object->methodTable(exec->vm())->getOwnPropertySlotByIndex(object, exec, propertyName, slot)) 1263 Structure& structure = *object->structure(vm); 1264 if (structure.classInfo()->methodTable.getOwnPropertySlotByIndex(object, exec, propertyName, slot)) 1263 1265 return true; 1264 JSValue prototype = object->prototype();1266 JSValue prototype = structure.storedPrototype(); 1265 1267 if (!prototype.isObject()) 1266 1268 return false;
Note: See TracChangeset
for help on using the changeset viewer.