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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r43331 r43559  
    8282        // require explicit reference counting.
    8383        RegisterID* registerFor(const Identifier&);
     84       
     85        bool willResolveToArguments(const Identifier&);
     86        RegisterID* uncheckedRegisterForArguments();
    8487
    8588        // Behaves as registerFor does, but ignores dynamic scope as
     
    427430        RegisterID* emitThrowExpressionTooDeepException();
    428431
     432        void createArgumentsIfNecessary();
     433
    429434        bool m_shouldEmitDebugHooks;
    430435        bool m_shouldEmitProfileHooks;
Note: See TracChangeset for help on using the changeset viewer.