Ignore:
Timestamp:
Feb 10, 2009, 12:43:32 AM (16 years ago)
Author:
[email protected]
Message:

2009-02-09 Gavin Barraclough <[email protected]>

Reviewed by Oliver Hunt.

Provide a class type for a generated block of JIT code.
Also changes the return address -> bytecode index map to
track the return addess as an unsigned offset into the code
instead of a ptrdiff_t in terms of voids - the latter is
equal to the actual offset / sizeof(void*), making it a
potentially lossy representation.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::PatchBuffer::returnAddressOffset):
  • assembler/X86Assembler.h: (JSC::X86Assembler::getCallReturnOffset):
  • bytecode/CodeBlock.h: (JSC::CallReturnOffsetToBytecodeIndex::CallReturnOffsetToBytecodeIndex): (JSC::getCallReturnOffset): (JSC::CodeBlock::getBytecodeIndex): (JSC::CodeBlock::jitCode): (JSC::CodeBlock::callReturnIndexVector):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::execute): (JSC::Interpreter::cti_vm_dontLazyLinkCall): (JSC::Interpreter::cti_vm_lazyLinkCall):
  • jit/JIT.cpp: (JSC::JIT::privateCompile):
  • jit/JIT.h: (JSC::):
  • jit/JITCall.cpp: (JSC::JIT::linkCall):
  • jit/JITCode.h: Added. (JSC::): (JSC::JITCode::JITCode): (JSC::JITCode::operator bool): (JSC::JITCode::addressForCall): (JSC::JITCode::offsetOf): (JSC::JITCode::execute):
File:
1 edited

Legend:

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

    r40396 r40813  
    866866        if (!codeBlock->jitCode())
    867867            JIT::compile(scopeChain->globalData, codeBlock);
    868         result = JIT::execute(codeBlock->jitCode(), &m_registerFile, newCallFrame, scopeChain->globalData, exception);
     868        result = codeBlock->jitCode().execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
    869869#else
    870870        result = privateExecute(Normal, &m_registerFile, newCallFrame, exception);
     
    932932        if (!codeBlock->jitCode())
    933933            JIT::compile(scopeChain->globalData, codeBlock);
    934         result = JIT::execute(codeBlock->jitCode(), &m_registerFile, newCallFrame, scopeChain->globalData, exception);
     934        result = codeBlock->jitCode().execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
    935935#else
    936936        result = privateExecute(Normal, &m_registerFile, newCallFrame, exception);
     
    10241024        if (!codeBlock->jitCode())
    10251025            JIT::compile(scopeChain->globalData, codeBlock);
    1026         result = JIT::execute(codeBlock->jitCode(), &m_registerFile, newCallFrame, scopeChain->globalData, exception);
     1026        result = codeBlock->jitCode().execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
    10271027#else
    10281028        result = privateExecute(Normal, &m_registerFile, newCallFrame, exception);
     
    48304830    ctiPatchCallByReturnAddress(ARG_returnAddress2, ARG_globalData->interpreter->m_ctiVirtualCallLink);
    48314831
    4832     return codeBlock->jitCode();
     4832    return codeBlock->jitCode().addressForCall();
    48334833}
    48344834
     
    48454845    JIT::linkCall(callee, codeBlock, codeBlock->jitCode(), callLinkInfo, ARG_int3);
    48464846
    4847     return codeBlock->jitCode();
     4847    return codeBlock->jitCode().addressForCall();
    48484848}
    48494849
Note: See TracChangeset for help on using the changeset viewer.