Skip to content

Commit

Permalink
JSCell::m_gcData should encode its information differently
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=129741

Reviewed by Geoffrey Garen.

We want to keep track of three GC states for an object:

1. Not marked (which implies not in the remembered set)
2. Marked but not in the remembered set
3. Marked and in the remembered set
        
Currently we only indicate marked vs. not marked in JSCell::m_gcData. During a write 
barrier, we only want to take the slow path if the object being stored to is in state #2. 
We'd like to make the test for state #2 as fast as possible, which means making it a 
compare against 0.

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::osrWriteBarrier):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::checkMarkByte):
(JSC::DFG::SpeculativeJIT::writeBarrier):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::allocateCell):
(JSC::FTL::LowerDFGToLLVM::emitStoreBarrier):
* heap/Heap.cpp:
(JSC::Heap::clearRememberedSet):
(JSC::Heap::addToRememberedSet):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::checkMarkByte):
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::checkMarkByte):
(JSC::JIT::emitWriteBarrier):
* jit/Repatch.cpp:
(JSC::writeBarrier):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSCell.h:
(JSC::JSCell::mark):
(JSC::JSCell::remember):
(JSC::JSCell::forget):
(JSC::JSCell::isMarked):
(JSC::JSCell::isRemembered):
* runtime/JSCellInlines.h:
(JSC::JSCell::JSCell):
* runtime/StructureIDBlob.h:
(JSC::StructureIDBlob::StructureIDBlob):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
[email protected] committed Mar 5, 2014
1 parent 3442637 commit 4015971
Show file tree
Hide file tree
Showing 19 changed files with 140 additions and 65 deletions.
56 changes: 56 additions & 0 deletions Source/JavaScriptCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
2014-03-05 Mark Hahnenberg <[email protected]>

JSCell::m_gcData should encode its information differently
https://bugs.webkit.org/show_bug.cgi?id=129741

Reviewed by Geoffrey Garen.

We want to keep track of three GC states for an object:

1. Not marked (which implies not in the remembered set)
2. Marked but not in the remembered set
3. Marked and in the remembered set

Currently we only indicate marked vs. not marked in JSCell::m_gcData. During a write
barrier, we only want to take the slow path if the object being stored to is in state #2.
We'd like to make the test for state #2 as fast as possible, which means making it a
compare against 0.

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::osrWriteBarrier):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::checkMarkByte):
(JSC::DFG::SpeculativeJIT::writeBarrier):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::allocateCell):
(JSC::FTL::LowerDFGToLLVM::emitStoreBarrier):
* heap/Heap.cpp:
(JSC::Heap::clearRememberedSet):
(JSC::Heap::addToRememberedSet):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::checkMarkByte):
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::checkMarkByte):
(JSC::JIT::emitWriteBarrier):
* jit/Repatch.cpp:
(JSC::writeBarrier):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSCell.h:
(JSC::JSCell::mark):
(JSC::JSCell::remember):
(JSC::JSCell::forget):
(JSC::JSCell::isMarked):
(JSC::JSCell::isRemembered):
* runtime/JSCellInlines.h:
(JSC::JSCell::JSCell):
* runtime/StructureIDBlob.h:
(JSC::StructureIDBlob::StructureIDBlob):

2014-03-05 Filip Pizlo <[email protected]>

More FTL ARM fixes
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void reifyInlinedCallFrames(CCallHelpers& jit, const OSRExitBase& exit)
#if ENABLE(GGC)
static void osrWriteBarrier(CCallHelpers& jit, GPRReg owner, GPRReg scratch)
{
AssemblyHelpers::Jump definitelyNotMarked = jit.genericWriteBarrier(owner);
AssemblyHelpers::Jump ownerNotMarkedOrAlreadyRemembered = jit.checkMarkByte(owner);

// We need these extra slots because setupArgumentsWithExecState will use poke on x86.
#if CPU(X86)
Expand All @@ -179,7 +179,7 @@ static void osrWriteBarrier(CCallHelpers& jit, GPRReg owner, GPRReg scratch)
jit.addPtr(MacroAssembler::TrustedImm32(sizeof(void*) * 3), MacroAssembler::stackPointerRegister);
#endif

definitelyNotMarked.link(&jit);
ownerNotMarkedOrAlreadyRemembered.link(&jit);
}
#endif // ENABLE(GGC)

Expand Down
16 changes: 8 additions & 8 deletions Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5469,15 +5469,15 @@ void SpeculativeJIT::compileStoreBarrier(Node* node)
noResult(node);
}

JITCompiler::Jump SpeculativeJIT::genericWriteBarrier(CCallHelpers& jit, GPRReg owner)
JITCompiler::Jump SpeculativeJIT::checkMarkByte(CCallHelpers& jit, GPRReg owner)
{
return jit.branchTest8(MacroAssembler::Zero, MacroAssembler::Address(owner, JSCell::gcDataOffset()));
return jit.branchTest8(MacroAssembler::NonZero, MacroAssembler::Address(owner, JSCell::gcDataOffset()));
}

JITCompiler::Jump SpeculativeJIT::genericWriteBarrier(CCallHelpers& jit, JSCell* owner)
JITCompiler::Jump SpeculativeJIT::checkMarkByte(CCallHelpers& jit, JSCell* owner)
{
uint8_t* address = reinterpret_cast<uint8_t*>(owner) + JSCell::gcDataOffset();
return jit.branchTest8(MacroAssembler::Zero, MacroAssembler::AbsoluteAddress(address));
return jit.branchTest8(MacroAssembler::NonZero, MacroAssembler::AbsoluteAddress(address));
}

void SpeculativeJIT::storeToWriteBarrierBuffer(GPRReg cell, GPRReg scratch1, GPRReg scratch2)
Expand Down Expand Up @@ -5536,16 +5536,16 @@ void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, JSCell* value, GPRReg scratch
if (Heap::isMarked(value))
return;

JITCompiler::Jump definitelyNotMarked = genericWriteBarrier(m_jit, ownerGPR);
JITCompiler::Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(m_jit, ownerGPR);
storeToWriteBarrierBuffer(ownerGPR, scratch1, scratch2);
definitelyNotMarked.link(&m_jit);
ownerNotMarkedOrAlreadyRemembered.link(&m_jit);
}

void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg scratch1, GPRReg scratch2)
{
JITCompiler::Jump definitelyNotMarked = genericWriteBarrier(m_jit, ownerGPR);
JITCompiler::Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(m_jit, ownerGPR);
storeToWriteBarrierBuffer(ownerGPR, scratch1, scratch2);
definitelyNotMarked.link(&m_jit);
ownerNotMarkedOrAlreadyRemembered.link(&m_jit);
}
#else
void SpeculativeJIT::compileStoreBarrier(Node* node)
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ class SpeculativeJIT {
void storeToWriteBarrierBuffer(GPRReg cell, GPRReg scratch1, GPRReg scratch2);
void storeToWriteBarrierBuffer(JSCell*, GPRReg scratch1, GPRReg scratch2);

static JITCompiler::Jump genericWriteBarrier(CCallHelpers& jit, GPRReg owner);
static JITCompiler::Jump genericWriteBarrier(CCallHelpers& jit, JSCell* owner);
static JITCompiler::Jump checkMarkByte(CCallHelpers& jit, GPRReg owner);
static JITCompiler::Jump checkMarkByte(CCallHelpers& jit, JSCell* owner);
void writeBarrier(GPRReg owner, GPRReg scratch1, GPRReg scratch2);
void writeBarrier(GPRReg owner, JSCell* value, GPRReg scratch1, GPRReg scratch2);

Expand Down
8 changes: 4 additions & 4 deletions Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4709,9 +4709,9 @@ void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueTagGPR, Edge valu
if (!isKnownCell(valueUse.node()))
isNotCell = m_jit.branch32(JITCompiler::NotEqual, valueTagGPR, JITCompiler::TrustedImm32(JSValue::CellTag));

JITCompiler::Jump definitelyNotMarked = genericWriteBarrier(m_jit, ownerGPR);
JITCompiler::Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(m_jit, ownerGPR);
storeToWriteBarrierBuffer(ownerGPR, scratch1, scratch2);
definitelyNotMarked.link(&m_jit);
ownerNotMarkedOrAlreadyRemembered.link(&m_jit);

if (!isKnownCell(valueUse.node()))
isNotCell.link(&m_jit);
Expand All @@ -4723,9 +4723,9 @@ void SpeculativeJIT::writeBarrier(JSCell* owner, GPRReg valueTagGPR, Edge valueU
if (!isKnownCell(valueUse.node()))
isNotCell = m_jit.branch32(JITCompiler::NotEqual, valueTagGPR, JITCompiler::TrustedImm32(JSValue::CellTag));

JITCompiler::Jump definitelyNotMarked = genericWriteBarrier(m_jit, owner);
JITCompiler::Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(m_jit, owner);
storeToWriteBarrierBuffer(owner, scratch1, scratch2);
definitelyNotMarked.link(&m_jit);
ownerNotMarkedOrAlreadyRemembered.link(&m_jit);

if (!isKnownCell(valueUse.node()))
isNotCell.link(&m_jit);
Expand Down
8 changes: 4 additions & 4 deletions Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5042,9 +5042,9 @@ void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, Edge valueUs
if (!isKnownCell(valueUse.node()))
isNotCell = m_jit.branchTest64(JITCompiler::NonZero, valueGPR, GPRInfo::tagMaskRegister);

JITCompiler::Jump definitelyNotMarked = genericWriteBarrier(m_jit, ownerGPR);
JITCompiler::Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(m_jit, ownerGPR);
storeToWriteBarrierBuffer(ownerGPR, scratch1, scratch2);
definitelyNotMarked.link(&m_jit);
ownerNotMarkedOrAlreadyRemembered.link(&m_jit);

if (!isKnownCell(valueUse.node()))
isNotCell.link(&m_jit);
Expand All @@ -5056,9 +5056,9 @@ void SpeculativeJIT::writeBarrier(JSCell* owner, GPRReg valueGPR, Edge valueUse,
if (!isKnownCell(valueUse.node()))
isNotCell = m_jit.branchTest64(JITCompiler::NonZero, valueGPR, GPRInfo::tagMaskRegister);

JITCompiler::Jump definitelyNotMarked = genericWriteBarrier(m_jit, owner);
JITCompiler::Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(m_jit, owner);
storeToWriteBarrierBuffer(owner, scratch1, scratch2);
definitelyNotMarked.link(&m_jit);
ownerNotMarkedOrAlreadyRemembered.link(&m_jit);

if (!isKnownCell(valueUse.node()))
isNotCell.link(&m_jit);
Expand Down
8 changes: 4 additions & 4 deletions Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4082,7 +4082,7 @@ class LowerDFGToLLVM {
m_out.store8(m_out.constInt8(structure->indexingType()), result, m_heaps.JSCell_indexingType);
m_out.store8(m_out.constInt8(structure->typeInfo().type()), result, m_heaps.JSCell_typeInfoType);
m_out.store8(m_out.constInt8(structure->typeInfo().inlineTypeFlags()), result, m_heaps.JSCell_typeInfoFlags);
m_out.store8(m_out.constInt8(0), result, m_heaps.JSCell_gcData);
m_out.store8(m_out.constInt8(JSCell::NotMarked), result, m_heaps.JSCell_gcData);

return result;
}
Expand Down Expand Up @@ -5404,16 +5404,16 @@ class LowerDFGToLLVM {
{
#if ENABLE(GGC)
LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Store barrier continuation"));
LBasicBlock isMarked = FTL_NEW_BLOCK(m_out, ("Store barrier is marked block"));
LBasicBlock isMarkedAndNotRemembered = FTL_NEW_BLOCK(m_out, ("Store barrier is marked block"));
LBasicBlock bufferHasSpace = FTL_NEW_BLOCK(m_out, ("Store barrier buffer is full"));
LBasicBlock bufferIsFull = FTL_NEW_BLOCK(m_out, ("Store barrier buffer is full"));

// Check the mark byte.
m_out.branch(
m_out.isZero8(loadMarkByte(base)), usually(continuation), rarely(isMarked));
m_out.notZero8(loadMarkByte(base)), usually(continuation), rarely(isMarkedAndNotRemembered));

// Append to the write barrier buffer.
LBasicBlock lastNext = m_out.appendTo(isMarked, bufferHasSpace);
LBasicBlock lastNext = m_out.appendTo(isMarkedAndNotRemembered, bufferHasSpace);
LValue currentBufferIndex = m_out.load32(m_out.absolute(&vm().heap.writeBarrierBuffer().m_currentIndex));
LValue bufferCapacity = m_out.load32(m_out.absolute(&vm().heap.writeBarrierBuffer().m_capacity));
m_out.branch(
Expand Down
7 changes: 5 additions & 2 deletions Source/JavaScriptCore/heap/Heap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void Heap::getConservativeRegisterRoots(HashSet<JSCell*>& roots)
JSCell** registerRoots = stackRoots.roots();
for (size_t i = 0; i < stackRootCount; i++) {
setMarked(registerRoots[i]);
registerRoots[i]->mark();
registerRoots[i]->setMarked();
roots.add(registerRoots[i]);
}
}
Expand Down Expand Up @@ -668,8 +668,10 @@ void Heap::clearRememberedSet(Vector<const JSCell*>& rememberedSet)
{
#if ENABLE(GGC)
GCPHASE(ClearRememberedSet);
for (auto* cell : rememberedSet)
for (auto* cell : rememberedSet) {
MarkedBlock::blockFor(cell)->clearRemembered(cell);
const_cast<JSCell*>(cell)->setRemembered(false);
}
#else
UNUSED_PARAM(rememberedSet);
#endif
Expand Down Expand Up @@ -826,6 +828,7 @@ void Heap::addToRememberedSet(const JSCell* cell)
if (isInRememberedSet(cell))
return;
MarkedBlock::blockFor(cell)->setRemembered(cell);
const_cast<JSCell*>(cell)->setRemembered(true);
m_slotVisitor.unconditionallyAppend(const_cast<JSCell*>(cell));
}

Expand Down
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/heap/SlotVisitorInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ALWAYS_INLINE void SlotVisitor::internalAppend(void* from, JSCell* cell)
return;
}

cell->mark();
cell->setMarked();
m_bytesVisited += MarkedBlock::blockFor(cell)->cellSize();

MARK_LOG_CHILD(*this, cell);
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/jit/AssemblyHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ class AssemblyHelpers : public MacroAssembler {
void jitAssertArgumentCountSane() { }
#endif

Jump genericWriteBarrier(GPRReg owner)
Jump checkMarkByte(GPRReg owner)
{
return branchTest8(Zero, Address(owner, JSCell::gcDataOffset()));
return branchTest8(NonZero, Address(owner, JSCell::gcDataOffset()));
}

// These methods convert between doubles, and doubles boxed and JSValues.
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/jit/JIT.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ namespace JSC {
enum WriteBarrierMode { UnconditionalWriteBarrier, ShouldFilterValue, ShouldFilterBaseAndValue };
// value register in write barrier is used before any scratch registers
// so may safely be the same as either of the scratch registers.
Jump checkMarkWord(RegisterID owner);
Jump checkMarkWord(JSCell* owner);
Jump checkMarkByte(RegisterID owner);
Jump checkMarkByte(JSCell* owner);
void emitWriteBarrier(unsigned owner, unsigned value, WriteBarrierMode);
void emitWriteBarrier(JSCell* owner, unsigned value, WriteBarrierMode);
void emitWriteBarrier(JSCell* owner);
Expand Down
20 changes: 10 additions & 10 deletions Source/JavaScriptCore/jit/JITPropertyAccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,15 +879,15 @@ void JIT::emit_op_init_global_const(Instruction* currentInstruction)

#endif // USE(JSVALUE64)

JIT::Jump JIT::checkMarkWord(RegisterID owner)
JIT::Jump JIT::checkMarkByte(RegisterID owner)
{
return branchTest8(Zero, Address(owner, JSCell::gcDataOffset()));
return branchTest8(NonZero, Address(owner, JSCell::gcDataOffset()));
}

JIT::Jump JIT::checkMarkWord(JSCell* owner)
JIT::Jump JIT::checkMarkByte(JSCell* owner)
{
uint8_t* address = reinterpret_cast<uint8_t*>(owner) + JSCell::gcDataOffset();
return branchTest8(Zero, AbsoluteAddress(address));
return branchTest8(NonZero, AbsoluteAddress(address));
}

#if USE(JSVALUE64)
Expand All @@ -904,9 +904,9 @@ void JIT::emitWriteBarrier(unsigned owner, unsigned value, WriteBarrierMode mode
if (mode == ShouldFilterBaseAndValue)
ownerNotCell = branchTest64(NonZero, regT0, tagMaskRegister);

Jump ownerNotMarked = checkMarkWord(regT0);
Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(regT0);
callOperation(operationUnconditionalWriteBarrier, regT0);
ownerNotMarked.link(this);
ownerNotMarkedOrAlreadyRemembered.link(this);

if (mode == ShouldFilterBaseAndValue)
ownerNotCell.link(this);
Expand Down Expand Up @@ -953,9 +953,9 @@ void JIT::emitWriteBarrier(unsigned owner, unsigned value, WriteBarrierMode mode
if (mode == ShouldFilterBaseAndValue)
ownerNotCell = branch32(NotEqual, regT0, TrustedImm32(JSValue::CellTag));

Jump ownerNotMarked = checkMarkWord(regT1);
Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(regT1);
callOperation(operationUnconditionalWriteBarrier, regT1);
ownerNotMarked.link(this);
ownerNotMarkedOrAlreadyRemembered.link(this);

if (mode == ShouldFilterBaseAndValue)
ownerNotCell.link(this);
Expand Down Expand Up @@ -993,9 +993,9 @@ void JIT::emitWriteBarrier(JSCell* owner)
{
#if ENABLE(GGC)
if (!MarkedBlock::blockFor(owner)->isMarked(owner)) {
Jump ownerNotMarked = checkMarkWord(owner);
Jump ownerNotMarkedOrAlreadyRemembered = checkMarkByte(owner);
callOperation(operationUnconditionalWriteBarrier, owner);
ownerNotMarked.link(this);
ownerNotMarkedOrAlreadyRemembered.link(this);
} else
callOperation(operationUnconditionalWriteBarrier, owner);
#else
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/jit/Repatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,11 +825,11 @@ static MacroAssembler::Call writeBarrier(CCallHelpers& jit, GPRReg owner, GPRReg
ASSERT(owner != scratch2);

#if ENABLE(DFG_JIT)
MacroAssembler::Jump definitelyNotMarked = DFG::SpeculativeJIT::genericWriteBarrier(jit, owner);
MacroAssembler::Jump ownerNotMarkedOrAlreadyRemembered = DFG::SpeculativeJIT::checkMarkByte(jit, owner);
#endif
MacroAssembler::Call call = storeToWriteBarrierBuffer(jit, owner, scratch1, scratch2, allocator);
#if ENABLE(DFG_JIT)
definitelyNotMarked.link(&jit);
ownerNotMarkedOrAlreadyRemembered.link(&jit);
#endif
return call;
}
Expand Down
9 changes: 1 addition & 8 deletions Source/JavaScriptCore/llint/LowLevelInterpreter.asm
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,7 @@ macro arrayProfile(cellAndIndexingType, profile, scratch)
end

macro checkMarkByte(cell, scratch1, scratch2, continuation)
move cell, scratch1
move cell, scratch2

andp MarkedBlockMask, scratch1
andp ~MarkedBlockMask, scratch2

rshiftp AtomNumberShift + BitMapWordShift, scratch2
loadb MarkedBlock::m_marks[scratch1, scratch2, 1], scratch1
loadb JSCell::m_gcData[cell], scratch1
continuation(scratch1)
end

Expand Down
8 changes: 4 additions & 4 deletions Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ macro writeBarrierOnOperand(cellOperand)
loadisFromInstruction(cellOperand, t1)
loadConstantOrVariablePayload(t1, CellTag, t2, .writeBarrierDone)
checkMarkByte(t2, t1, t3,
macro(marked)
btbz marked, .writeBarrierDone
macro(gcData)
btbnz gcData, .writeBarrierDone
push cfr, PC
# We make two extra slots because cCall2 will poke.
subp 8, sp
Expand Down Expand Up @@ -577,8 +577,8 @@ macro writeBarrierOnGlobalObject(valueOperand)
loadp CodeBlock[cfr], t3
loadp CodeBlock::m_globalObject[t3], t3
checkMarkByte(t3, t1, t2,
macro(marked)
btbz marked, .writeBarrierDone
macro(gcData)
btbnz gcData, .writeBarrierDone
push cfr, PC
# We make two extra slots because cCall2 will poke.
subp 8, sp
Expand Down
8 changes: 4 additions & 4 deletions Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ macro writeBarrierOnOperand(cellOperand)
loadisFromInstruction(cellOperand, t1)
loadConstantOrVariableCell(t1, t2, .writeBarrierDone)
checkMarkByte(t2, t1, t3,
macro(marked)
btbz marked, .writeBarrierDone
macro(gcData)
btbnz gcData, .writeBarrierDone
push PB, PC
cCall2Void(_llint_write_barrier_slow, cfr, t2)
pop PC, PB
Expand Down Expand Up @@ -426,8 +426,8 @@ macro writeBarrierOnGlobalObject(valueOperand)
loadp CodeBlock[cfr], t3
loadp CodeBlock::m_globalObject[t3], t3
checkMarkByte(t3, t1, t2,
macro(marked)
btbz marked, .writeBarrierDone
macro(gcData)
btbnz gcData, .writeBarrierDone
push PB, PC
cCall2Void(_llint_write_barrier_slow, cfr, t3)
pop PC, PB
Expand Down
Loading

0 comments on commit 4015971

Please sign in to comment.