Ignore:
Timestamp:
Nov 7, 2014, 1:58:43 PM (11 years ago)
Author:
[email protected]
Message:

Update scope related slow path code to use scope register added to opcodes
https://bugs.webkit.org/show_bug.cgi?id=138254

Reviewed by Mark Lam.

Updated slow paths for op_pop_scope, op_push_name_scope and op_push_with_scope.
Added scope register index parameter to the front of the relevant argument lists of the
slow functions. In the case of op_push_name_scope for x86 (32 bit), there aren't enough
registers to accomodate all the parameters. Therefore, added two new JSVALUE32_64 slow
paths called operationPushCatchScope() and operationPushFunctionNameScope() to eliminate
the last "type" argument.

  • assembler/MacroAssemblerCodeRef.h:

(JSC::FunctionPtr::FunctionPtr): Added a new template to take 6 arguments.

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::callOperation):
New variants of setupArgumentsWithExecState() and callOperation() to handle the new
combinations of argument types and counts.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
Use the new slow paths.

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:

Updates to set the scope result using the scope register index. Added operationPushCatchScope()
and operationPushFunctionNameScope().

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
Updated the scope slow paths to use the scope register index in the instruction to read and
write the register instead of using CallFrame::scope() and CallFrame::setScope().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r175512 r175762  
    717717        MacroAssembler::Call callOperation(V_JITOperation_ECICC, RegisterID, const Identifier*, RegisterID, RegisterID);
    718718        MacroAssembler::Call callOperation(J_JITOperation_EE, RegisterID);
    719         MacroAssembler::Call callOperation(V_JITOperation_EIdJZZ, const Identifier*, RegisterID, int32_t, int32_t);
     719#if USE(JSVALUE64)
     720        MacroAssembler::Call callOperation(V_JITOperation_EZIdJZZ, int, const Identifier*, RegisterID, int32_t, int32_t);
     721#else
     722        MacroAssembler::Call callOperation(V_JITOperation_EZIdJZ, int, const Identifier*, RegisterID, int32_t);
     723#endif
    720724        MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID);
    721725#if USE(JSVALUE64)
     
    736740        MacroAssembler::Call callOperation(V_JITOperation_EPc, Instruction*);
    737741        MacroAssembler::Call callOperation(V_JITOperation_EZ, int32_t);
     742        MacroAssembler::Call callOperation(V_JITOperation_EZJ, int, GPRReg);
    738743        MacroAssembler::Call callOperationWithCallFrameRollbackOnException(J_JITOperation_E);
    739744        MacroAssembler::Call callOperationWithCallFrameRollbackOnException(V_JITOperation_ECb, CodeBlock*);
     
    749754        MacroAssembler::Call callOperation(S_JITOperation_EJ, RegisterID, RegisterID);
    750755        MacroAssembler::Call callOperation(S_JITOperation_EJJ, RegisterID, RegisterID, RegisterID, RegisterID);
    751         MacroAssembler::Call callOperation(V_JITOperation_EIdJZZ, const Identifier*, RegisterID, RegisterID, int32_t, int32_t);
     756        MacroAssembler::Call callOperation(V_JITOperation_EZIdJZ, int, const Identifier*, RegisterID, RegisterID, int32_t);
    752757        MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID, RegisterID);
    753758        MacroAssembler::Call callOperation(V_JITOperation_EJJJ, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID);
    754759        MacroAssembler::Call callOperation(V_JITOperation_EJZ, RegisterID, RegisterID, int32_t);
    755760        MacroAssembler::Call callOperation(V_JITOperation_EJZJ, RegisterID, RegisterID, int32_t, RegisterID, RegisterID);
     761        MacroAssembler::Call callOperation(V_JITOperation_EZJ, int32_t, RegisterID, RegisterID);
    756762#endif
    757763
Note: See TracChangeset for help on using the changeset viewer.