Improve function call forwarding performance
Reviewed by Gavin Barraclough
Make creation of the Arguments object occur lazily, so it
is not necessarily created for every function that references
it. Then add logic to Function.apply to allow it to avoid
allocating the Arguments object at all. Helps a lot with
the function forwarding/binding logic in jQuery, Prototype,
and numerous other JS libraries.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/bytecode/CodeBlock.cpp b/JavaScriptCore/bytecode/CodeBlock.cpp
index 9cc6ca5..965dca4 100644
--- a/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -497,6 +497,10 @@
printf("[%4d] create_arguments\n", location);
break;
}
+ case op_init_arguments: {
+ printf("[%4d] init_arguments\n", location);
+ break;
+ }
case op_convert_this: {
int r0 = (++it)->u.operand;
printf("[%4d] convert_this %s\n", location, registerName(r0).c_str());