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/MacroAssemblerARMv7.h

    r114809 r115141  
    4646
    4747public:
     48    MacroAssemblerARMv7()
     49        : m_makeJumpPatchable(false)
     50    {
     51    }
     52
    4853    typedef ARMv7Assembler::LinkRecord LinkRecord;
    4954    typedef ARMv7Assembler::JumpType JumpType;
     
    16001605    }
    16011606
     1607    PatchableJump patchableBranchPtrWithPatch(RelationalCondition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0))
     1608    {
     1609        m_makeJumpPatchable = true;
     1610        Jump result = branchPtrWithPatch(cond, left, dataLabel, initialRightValue);
     1611        m_makeJumpPatchable = false;
     1612        return PatchableJump(result);
     1613    }
     1614
     1615    PatchableJump patchableJump()
     1616    {
     1617        m_makeJumpPatchable = true;
     1618        Jump result = jump();
     1619        m_makeJumpPatchable = false;
     1620        return PatchableJump(result);
     1621    }
     1622
    16021623    ALWAYS_INLINE DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address)
    16031624    {
     
    16341655
    16351656protected:
    1636 
    16371657    ALWAYS_INLINE Jump jump()
    16381658    {
    16391659        moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister);
    1640         return Jump(m_assembler.bx(dataTempRegister), inUninterruptedSequence() ? ARMv7Assembler::JumpNoConditionFixedSize : ARMv7Assembler::JumpNoCondition);
     1660        return Jump(m_assembler.bx(dataTempRegister), m_makeJumpPatchable ? ARMv7Assembler::JumpNoConditionFixedSize : ARMv7Assembler::JumpNoCondition);
    16411661    }
    16421662
     
    16451665        m_assembler.it(cond, true, true);
    16461666        moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister);
    1647         return Jump(m_assembler.bx(dataTempRegister), inUninterruptedSequence() ? ARMv7Assembler::JumpConditionFixedSize : ARMv7Assembler::JumpCondition, cond);
     1667        return Jump(m_assembler.bx(dataTempRegister), m_makeJumpPatchable ? ARMv7Assembler::JumpConditionFixedSize : ARMv7Assembler::JumpCondition, cond);
    16481668    }
    16491669    ALWAYS_INLINE Jump makeBranch(RelationalCondition cond) { return makeBranch(armV7Condition(cond)); }
     
    17421762    }
    17431763
     1764    bool m_makeJumpPatchable;
    17441765};
    17451766
Note: See TracChangeset for help on using the changeset viewer.