Ignore:
Timestamp:
Apr 24, 2012, 5:06:04 PM (13 years ago)
Author:
[email protected]
Message:

Add explicit patchableBranchPtrWithPatch/patchableJump methods
https://bugs.webkit.org/show_bug.cgi?id=84498

Reviewed by Filip Pizlo.

Don't rely on inUninterruptedSequence to distinguish which jumps we need to be able to repatch.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::PatchableJump::PatchableJump):
(PatchableJump):
(JSC::AbstractMacroAssembler::PatchableJump::operator Jump&):
(AbstractMacroAssembler):
(JSC::AbstractMacroAssembler::AbstractMacroAssembler):

  • Added PatchableJump type, removed inUninterruptedSequence.
  • assembler/LinkBuffer.h:

(LinkBuffer):
(JSC::LinkBuffer::locationOf):

  • Only allow the location to be taken of patchable branches
  • assembler/MacroAssembler.h:

(MacroAssembler):
(JSC::MacroAssembler::patchableBranchPtrWithPatch):
(JSC::MacroAssembler::patchableJump):
(JSC::MacroAssembler::shouldBlind):

  • Added default implementation of patchableBranchPtrWithPatch, patchableJump.
  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::MacroAssemblerARMv7):
(MacroAssemblerARMv7):
(JSC::MacroAssemblerARMv7::patchableBranchPtrWithPatch):
(JSC::MacroAssemblerARMv7::patchableJump):
(JSC::MacroAssemblerARMv7::jump):
(JSC::MacroAssemblerARMv7::makeBranch):

  • Added ARMv7 implementation of patchableBranchPtrWithPatch, patchableJump.
  • dfg/DFGCorrectableJumpPoint.h:

(DFG):
(JSC::DFG::CorrectableJumpPoint::switchToLateJump):

  • Late jumps are PatchableJumps.
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::linkOSRExits):

  • replace use of inUninterruptedSequence
  • dfg/DFGJITCompiler.h:

(JSC::DFG::PropertyAccessRecord::PropertyAccessRecord):
(PropertyAccessRecord):

  • replace use of inUninterruptedSequence
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedPutById):

  • replace use of inUninterruptedSequence
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedPutById):

  • replace use of inUninterruptedSequence
  • jit/JIT.h:

(PropertyStubCompilationInfo):

  • replace use of inUninterruptedSequence
  • jit/JITInlineMethods.h:

(JSC::JIT::beginUninterruptedSequence):
(JSC::JIT::endUninterruptedSequence):

  • replace use of inUninterruptedSequence
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::compileGetByIdHotPath):

  • replace use of inUninterruptedSequence
  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::compileGetByIdHotPath):

  • replace use of inUninterruptedSequence
File:
1 edited

Legend:

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

    r114157 r115141  
    498498    };
    499499
     500    struct PatchableJump {
     501        PatchableJump()
     502        {
     503        }
     504
     505        explicit PatchableJump(Jump jump)
     506            : m_jump(jump)
     507        {
     508        }
     509
     510        operator Jump&() { return m_jump; }
     511
     512        Jump m_jump;
     513    };
     514
    500515    // JumpList:
    501516    //
     
    574589    }
    575590
    576     void beginUninterruptedSequence() { m_inUninterruptedSequence = true; }
    577     void endUninterruptedSequence() { m_inUninterruptedSequence = false; }
    578 
    579591    unsigned debugOffset() { return m_assembler.debugOffset(); }
    580592
    581593protected:
    582594    AbstractMacroAssembler()
    583         : m_inUninterruptedSequence(false)
    584         , m_randomSource(cryptographicallyRandomNumber())
     595        : m_randomSource(cryptographicallyRandomNumber())
    585596    {
    586597    }
    587598
    588599    AssemblerType m_assembler;
    589 
    590     bool inUninterruptedSequence()
    591     {
    592         return m_inUninterruptedSequence;
    593     }
    594 
    595     bool m_inUninterruptedSequence;
    596    
    597600   
    598601    uint32_t random()
Note: See TracChangeset for help on using the changeset viewer.