Inline (C++) GetByVal with numeric indices more aggressively.
<https://webkit.org/b/132218>
We were already inlining the string indexed GetByVal path pretty well,
while the path for numeric indices got neglected. No more!
~9.5% improvement on Dromaeo/dom-traverse.html on my MBP:
Before: 199.50 runs/s
After: 218.58 runs/s
Reviewed by Phil Pizlo.
* dfg/DFGOperations.cpp:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::get):
ALWAYS_INLINE all the things.
* runtime/JSObject.h:
(JSC::JSObject::getPropertySlot):
Avoid fetching the Structure more than once. We have the same
optimization in the string-indexed code path.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp
index ffacf73..86996a3 100644
--- a/Source/JavaScriptCore/dfg/DFGOperations.cpp
+++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp
@@ -259,7 +259,7 @@
return JSValue::encode(jsAddSlowCase(exec, op1, op2));
}
-static inline EncodedJSValue getByVal(ExecState* exec, JSCell* base, uint32_t index)
+static ALWAYS_INLINE EncodedJSValue getByVal(ExecState* exec, JSCell* base, uint32_t index)
{
VM& vm = exec->vm();
NativeCallFrameTracer tracer(&vm, exec);