Ignore:
Timestamp:
Dec 12, 2008, 5:39:38 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-12 Gavin Barraclough <[email protected]>

Reviewed by Geoff Garen.

Move slow-cases of JIT code generation over to the MacroAssembler interface.

  • assembler/MacroAssembler.h: (JSC::MacroAssembler::Label::Label): (JSC::MacroAssembler::jae32): (JSC::MacroAssembler::jg32): (JSC::MacroAssembler::jzPtr):
  • jit/JIT.cpp: (JSC::JIT::privateCompileSlowCases): (JSC::JIT::privateCompile): (JSC::JIT::emitGetVariableObjectRegister): (JSC::JIT::emitPutVariableObjectRegister):
  • jit/JIT.h: (JSC::SlowCaseEntry::SlowCaseEntry): (JSC::JIT::getSlowCase): (JSC::JIT::linkSlowCase):
  • jit/JITArithmetic.cpp: (JSC::JIT::compileBinaryArithOpSlowCase):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallInitializeCallFrame): (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase):
  • jit/JITInlineMethods.h: (JSC::JIT::emitJumpSlowCaseIfNotJSCell): (JSC::JIT::linkSlowCaseIfNotJSCell):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::compilePutByIdHotPath): (JSC::JIT::compileGetByIdSlowCase): (JSC::JIT::compilePutByIdSlowCase):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITPropertyAccess.cpp

    r39229 r39261  
    4747#if !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
    4848
    49 void JIT::compileGetByIdHotPath(int resultVReg, int baseVReg, Identifier* ident, unsigned i, unsigned propertyAccessInstructionIndex)
     49void JIT::compileGetByIdHotPath(int resultVReg, int baseVReg, Identifier* ident, unsigned i, unsigned)
    5050{
    5151    // As for put_by_id, get_by_id requires the offset of the Structure and the offset of the access to be repatched.
     
    5656    emitGetVirtualRegister(baseVReg, X86::eax, i);
    5757
    58 #ifdef NDEBUG
    59     UNUSED_PARAM(propertyAccessInstructionIndex);
    60 #endif
    61 
    62 #ifndef NDEBUG
    63     JmpDst coldPathBegin = __ label();
    64 #endif       
    6558    emitPutCTIArg(X86::eax, 0);
    6659    emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 4);
    67     JmpSrc call = emitCTICall(i, Interpreter::cti_op_get_by_id_generic);
    68     ASSERT(X86Assembler::getDifferenceBetweenLabels(coldPathBegin, call) == repatchOffsetGetByIdSlowCaseCall);
     60    emitCTICall(i, Interpreter::cti_op_get_by_id_generic);
    6961    emitPutVirtualRegister(resultVReg);
    70 
    71     // Track the location of the call; this will be used to recover repatch information.
    72     m_propertyAccessCompilationInfo[propertyAccessInstructionIndex].callReturnLocation = call;
    7362}
    7463
     
    7968}
    8069
    81 void JIT::compilePutByIdHotPath(int baseVReg, Identifier* ident, int valueVReg, unsigned i, unsigned propertyAccessInstructionIndex)
     70void JIT::compilePutByIdHotPath(int baseVReg, Identifier* ident, int valueVReg, unsigned i, unsigned)
    8271{
    8372    // In order to be able to repatch both the Structure, and the object offset, we store one pointer,
     
    9079    emitPutCTIArg(X86::eax, 0);
    9180    emitPutCTIArg(X86::edx, 8);
    92     JmpSrc call = emitCTICall(i, Interpreter::cti_op_put_by_id_generic);
    93 
    94     // Track the location of the call; this will be used to recover repatch information.
    95     m_propertyAccessCompilationInfo[propertyAccessInstructionIndex].callReturnLocation = call;
     81    emitCTICall(i, Interpreter::cti_op_put_by_id_generic);
    9682}
    9783
     
    137123    // the distance from the call to the head of the slow case.
    138124
    139     if (linkSlowCaseIfNotJSCell(iter, baseVReg))
    140         ++iter;
    141     __ link(iter->from, __ label());
     125    linkSlowCaseIfNotJSCell(iter, baseVReg);
     126    linkSlowCase(iter);
    142127
    143128#ifndef NDEBUG
     
    181166void JIT::compilePutByIdSlowCase(int baseVReg, Identifier* ident, int, unsigned i, Vector<SlowCaseEntry>::iterator& iter, unsigned propertyAccessInstructionIndex)
    182167{
    183     if (linkSlowCaseIfNotJSCell(iter, baseVReg))
    184         ++iter;
    185     __ link(iter->from, __ label());
     168    linkSlowCaseIfNotJSCell(iter, baseVReg);
     169    linkSlowCase(iter);
    186170
    187171    emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 4);
Note: See TracChangeset for help on using the changeset viewer.