• oliver@apple.com's avatar
    Improve function.apply performance · 65e286e6
    oliver@apple.com authored
    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.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    65e286e6
JSArray.cpp 35.9 KB