Ignore:
Timestamp:
Nov 8, 2011, 4:43:15 PM (14 years ago)
Author:
[email protected]
Message:

Fix OSR entry points to calculate offsets correctly WRT to branch compaction.
https://bugs.webkit.org/show_bug.cgi?id=71864

Reviewed by Filip Pizlo.

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::offsetOf):

  • We use this to return the offsets into the code of the entry points.
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileEntry):
(JSC::DFG::JITCompiler::compileBody):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):

  • Move the construction of the speculative JIT outside of compileBody, such that it is still available to link the OSR entry points at the point we are linking.
  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::noticeOSREntry):

  • Pass the label of the block & linkbuffer into noticeOSREntry.
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::linkOSREntries):

  • Moved call to noticeOSREntry until we we linking.
  • dfg/DFGSpeculativeJIT.h:
  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::privateCompile):

  • Moved calculation of entries until we we linking.
  • jit/JIT.h:
    • Removed some members.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/LinkBuffer.h

    r99622 r99633  
    167167        call.m_label = applyOffset(call.m_label);
    168168        return MacroAssembler::getLinkerCallReturnOffset(call);
     169    }
     170
     171    uint32_t offsetOf(Label label)
     172    {
     173        return applyOffset(label.m_label).m_offset;
    169174    }
    170175
Note: See TracChangeset for help on using the changeset viewer.