Changeset 59205 in webkit for trunk/JavaScriptCore/jit/JIT.cpp


Ignore:
Timestamp:
May 11, 2010, 9:30:35 PM (15 years ago)
Author:
[email protected]
Message:

Slight simplification to the calling convention: read RegisterFile::end()
from an absolute address, instead of from a pointer to the RegisterFile
on the stack.

Reviewed by Gavin Barraclough.

SunSpider reports no change.

This should free us to remove the RegisterFile argument from the stack.

  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

File:
1 edited

Legend:

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

    r59064 r59205  
    466466    emitPutToCallFrameHeader(regT2, RegisterFile::ReturnPC);
    467467
    468     Jump slowRegisterFileCheck;
    469     Label afterRegisterFileCheck;
     468    Jump registerFileCheck;
    470469    if (m_codeBlock->codeType() == FunctionCode) {
    471470        // In the case of a fast linked call, we do not set this up in the caller.
    472471        emitPutImmediateToCallFrameHeader(m_codeBlock, RegisterFile::CodeBlock);
    473472
    474         peek(regT0, OBJECT_OFFSETOF(JITStackFrame, registerFile) / sizeof (void*));
    475473        addPtr(Imm32(m_codeBlock->m_numCalleeRegisters * sizeof(Register)), callFrameRegister, regT1);
    476 
    477         slowRegisterFileCheck = branchPtr(Above, regT1, Address(regT0, OBJECT_OFFSETOF(RegisterFile, m_end)));
    478         afterRegisterFileCheck = label();
    479     }
     474        registerFileCheck = branchPtr(Below, AbsoluteAddress(&m_globalData->interpreter->registerFile().
     475        m_end), regT1);
     476    }
     477
     478    Label functionBody = label();
    480479
    481480    privateCompileMainPass();
     
    484483
    485484    if (m_codeBlock->codeType() == FunctionCode) {
    486         slowRegisterFileCheck.link(this);
     485        registerFileCheck.link(this);
    487486        m_bytecodeIndex = 0;
    488487        JITStubCall(this, cti_register_file_check).call();
     
    490489        m_bytecodeIndex = (unsigned)-1; // Reset this, in order to guard its use with ASSERTs.
    491490#endif
    492         jump(afterRegisterFileCheck);
     491        jump(functionBody);
    493492    }
    494493
Note: See TracChangeset for help on using the changeset viewer.