Ignore:
Timestamp:
Apr 8, 2009, 4:08:28 PM (16 years ago)
Author:
[email protected]
Message:

Improve function.apply performance

Reviewed by Geoff Garen.

Jump through a few hoops to improve performance of function.apply in the general case.

In the case of zero or one arguments, or if there are only two arguments and the
second is an array literal we treat function.apply as function.call.

Otherwise we use the new opcodes op_load_varargs and op_call_varargs to do the .apply call
without re-entering the virtual machine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSArray.h

    r41168 r42337  
    7777
    7878        void fillArgList(ExecState*, ArgList&);
     79        void copyToRegisters(ExecState*, Register*, uint32_t);
    7980
    8081        static PassRefPtr<Structure> createStructure(JSValuePtr prototype)
Note: See TracChangeset for help on using the changeset viewer.