Ignore:
Timestamp:
Mar 6, 2014, 12:00:52 PM (11 years ago)
Author:
[email protected]
Message:

Fix write barriers in Repatch.cpp for !ENABLE(DFG_JIT) platforms after r165128
https://bugs.webkit.org/show_bug.cgi?id=129760

Reviewed by Geoffrey Garen.

r165128 disabled the write barrier fast path for inline caches on !ENABLE(DFG_JIT) platforms.
The fix is to refactor the write barrier code into AssemblyHelpers and use that everywhere.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::writeBarrier):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::writeBarrier):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::writeBarrier):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::checkMarkByte):

  • jit/JIT.h:
  • jit/JITPropertyAccess.cpp:
  • jit/Repatch.cpp:

(JSC::writeBarrier):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r165135 r165203  
    388388#endif
    389389
    390     Jump checkMarkByte(GPRReg owner)
    391     {
    392         return branchTest8(NonZero, Address(owner, JSCell::gcDataOffset()));
    393     }
    394 
    395390    // These methods convert between doubles, and doubles boxed and JSValues.
    396391#if USE(JSVALUE64)
     
    621616    }
    622617
    623     void writeBarrier(GPRReg owner, GPRReg scratch1, GPRReg scratch2, WriteBarrierUseKind useKind)
    624     {
    625         UNUSED_PARAM(owner);
    626         UNUSED_PARAM(scratch1);
    627         UNUSED_PARAM(scratch2);
    628         UNUSED_PARAM(useKind);
    629         ASSERT(owner != scratch1);
    630         ASSERT(owner != scratch2);
    631         ASSERT(scratch1 != scratch2);
    632        
    633 #if ENABLE(WRITE_BARRIER_PROFILING)
    634         emitCount(WriteBarrierCounters::jitCounterFor(useKind));
    635 #endif
     618    Jump checkMarkByte(GPRReg cell)
     619    {
     620        return branchTest8(MacroAssembler::NonZero, MacroAssembler::Address(cell, JSCell::gcDataOffset()));
     621    }
     622
     623    Jump checkMarkByte(JSCell* cell)
     624    {
     625        uint8_t* address = reinterpret_cast<uint8_t*>(cell) + JSCell::gcDataOffset();
     626        return branchTest8(MacroAssembler::NonZero, MacroAssembler::AbsoluteAddress(address));
    636627    }
    637628
Note: See TracChangeset for help on using the changeset viewer.