Ignore:
Timestamp:
Mar 27, 2009, 8:50:39 PM (16 years ago)
Author:
[email protected]
Message:

Improve performance of Function.prototype.call
<https://bugs.webkit.org/show_bug.cgi?id=24907>

Reviewed by Gavin Barraclough

Optimistically assume that expression.call(..) is going to be a call to
Function.prototype.call, and handle it specially to attempt to reduce the
degree of VM reentrancy.

When everything goes right this removes the vm reentry improving .call()
by around a factor of 10.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r41999 r42065  
    26672667        NEXT_INSTRUCTION();
    26682668    }
     2669    DEFINE_OPCODE(op_jneq_ptr) {
     2670        /* jneq_ptr src(r) ptr(jsCell) target(offset)
     2671         
     2672           Jumps to offset target from the current instruction, if the value r is equal
     2673           to ptr, using pointer equality.
     2674         */
     2675        int src = (++vPC)->u.operand;
     2676        JSValuePtr ptr = JSValuePtr((++vPC)->u.jsCell);
     2677        int target = (++vPC)->u.operand;
     2678        JSValuePtr srcValue = callFrame[src].jsValue(callFrame);
     2679        if (srcValue != ptr) {
     2680            vPC += target;
     2681            NEXT_INSTRUCTION();
     2682        }
     2683
     2684        ++vPC;
     2685        NEXT_INSTRUCTION();
     2686    }
    26692687    DEFINE_OPCODE(op_loop_if_less) {
    26702688        /* loop_if_less src1(r) src2(r) target(offset)
Note: See TracChangeset for help on using the changeset viewer.