Changeset 43559 in webkit for trunk/JavaScriptCore/bytecode


Ignore:
Timestamp:
May 12, 2009, 1:58:56 AM (16 years ago)
Author:
[email protected]
Message:

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.

Location:
trunk/JavaScriptCore/bytecode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/CodeBlock.cpp

    r43401 r43559  
    498498            break;
    499499        }
     500        case op_init_arguments: {
     501            printf("[%4d] init_arguments\n", location);
     502            break;
     503        }
    500504        case op_convert_this: {
    501505            int r0 = (++it)->u.operand;
  • trunk/JavaScriptCore/bytecode/Opcode.h

    r43401 r43559  
    4141        macro(op_enter, 1) \
    4242        macro(op_enter_with_activation, 2) \
     43        macro(op_init_arguments, 1) \
    4344        macro(op_create_arguments, 1) \
    4445        macro(op_convert_this, 2) \
Note: See TracChangeset for help on using the changeset viewer.