Use slot instead of value in the write barrier to record write from code.
BUG= Review URL: https://codereview.chromium.org/11412096 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2fed381652
commit
ee164ffe3d
@ -7381,12 +7381,7 @@ void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) {
|
|||||||
ASSERT(!address.is(r0));
|
ASSERT(!address.is(r0));
|
||||||
__ Move(address, regs_.address());
|
__ Move(address, regs_.address());
|
||||||
__ Move(r0, regs_.object());
|
__ Move(r0, regs_.object());
|
||||||
if (mode == INCREMENTAL_COMPACTION) {
|
|
||||||
__ Move(r1, address);
|
__ Move(r1, address);
|
||||||
} else {
|
|
||||||
ASSERT(mode == INCREMENTAL);
|
|
||||||
__ ldr(r1, MemOperand(address, 0));
|
|
||||||
}
|
|
||||||
__ mov(r2, Operand(ExternalReference::isolate_address()));
|
__ mov(r2, Operand(ExternalReference::isolate_address()));
|
||||||
|
|
||||||
AllowExternalCallThatCantCauseGC scope(masm);
|
AllowExternalCallThatCantCauseGC scope(masm);
|
||||||
|
@ -7225,13 +7225,7 @@ void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) {
|
|||||||
int argument_count = 3;
|
int argument_count = 3;
|
||||||
__ PrepareCallCFunction(argument_count, regs_.scratch0());
|
__ PrepareCallCFunction(argument_count, regs_.scratch0());
|
||||||
__ mov(Operand(esp, 0 * kPointerSize), regs_.object());
|
__ mov(Operand(esp, 0 * kPointerSize), regs_.object());
|
||||||
if (mode == INCREMENTAL_COMPACTION) {
|
|
||||||
__ mov(Operand(esp, 1 * kPointerSize), regs_.address()); // Slot.
|
__ mov(Operand(esp, 1 * kPointerSize), regs_.address()); // Slot.
|
||||||
} else {
|
|
||||||
ASSERT(mode == INCREMENTAL);
|
|
||||||
__ mov(regs_.scratch0(), Operand(regs_.address(), 0));
|
|
||||||
__ mov(Operand(esp, 1 * kPointerSize), regs_.scratch0()); // Value.
|
|
||||||
}
|
|
||||||
__ mov(Operand(esp, 2 * kPointerSize),
|
__ mov(Operand(esp, 2 * kPointerSize),
|
||||||
Immediate(ExternalReference::isolate_address()));
|
Immediate(ExternalReference::isolate_address()));
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ void IncrementalMarking::RecordWriteSlow(HeapObject* obj,
|
|||||||
|
|
||||||
|
|
||||||
void IncrementalMarking::RecordWriteFromCode(HeapObject* obj,
|
void IncrementalMarking::RecordWriteFromCode(HeapObject* obj,
|
||||||
Object* value,
|
Object** slot,
|
||||||
Isolate* isolate) {
|
Isolate* isolate) {
|
||||||
ASSERT(obj->IsHeapObject());
|
ASSERT(obj->IsHeapObject());
|
||||||
IncrementalMarking* marking = isolate->heap()->incremental_marking();
|
IncrementalMarking* marking = isolate->heap()->incremental_marking();
|
||||||
@ -94,7 +94,7 @@ void IncrementalMarking::RecordWriteFromCode(HeapObject* obj,
|
|||||||
MemoryChunk::kWriteBarrierCounterGranularity);
|
MemoryChunk::kWriteBarrierCounterGranularity);
|
||||||
}
|
}
|
||||||
|
|
||||||
marking->RecordWrite(obj, NULL, value);
|
marking->RecordWrite(obj, slot, *slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ class IncrementalMarking {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void RecordWriteFromCode(HeapObject* obj,
|
static void RecordWriteFromCode(HeapObject* obj,
|
||||||
Object* value,
|
Object** slot,
|
||||||
Isolate* isolate);
|
Isolate* isolate);
|
||||||
|
|
||||||
static void RecordWriteForEvacuationFromCode(HeapObject* obj,
|
static void RecordWriteForEvacuationFromCode(HeapObject* obj,
|
||||||
|
@ -7555,12 +7555,7 @@ void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) {
|
|||||||
ASSERT(!address.is(a0));
|
ASSERT(!address.is(a0));
|
||||||
__ Move(address, regs_.address());
|
__ Move(address, regs_.address());
|
||||||
__ Move(a0, regs_.object());
|
__ Move(a0, regs_.object());
|
||||||
if (mode == INCREMENTAL_COMPACTION) {
|
|
||||||
__ Move(a1, address);
|
__ Move(a1, address);
|
||||||
} else {
|
|
||||||
ASSERT(mode == INCREMENTAL);
|
|
||||||
__ lw(a1, MemOperand(address, 0));
|
|
||||||
}
|
|
||||||
__ li(a2, Operand(ExternalReference::isolate_address()));
|
__ li(a2, Operand(ExternalReference::isolate_address()));
|
||||||
|
|
||||||
AllowExternalCallThatCantCauseGC scope(masm);
|
AllowExternalCallThatCantCauseGC scope(masm);
|
||||||
|
@ -6214,13 +6214,8 @@ void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) {
|
|||||||
ASSERT(!address.is(arg1));
|
ASSERT(!address.is(arg1));
|
||||||
__ Move(address, regs_.address());
|
__ Move(address, regs_.address());
|
||||||
__ Move(arg1, regs_.object());
|
__ Move(arg1, regs_.object());
|
||||||
if (mode == INCREMENTAL_COMPACTION) {
|
|
||||||
// TODO(gc) Can we just set address arg2 in the beginning?
|
// TODO(gc) Can we just set address arg2 in the beginning?
|
||||||
__ Move(arg2, address);
|
__ Move(arg2, address);
|
||||||
} else {
|
|
||||||
ASSERT(mode == INCREMENTAL);
|
|
||||||
__ movq(arg2, Operand(address, 0));
|
|
||||||
}
|
|
||||||
__ LoadAddress(arg3, ExternalReference::isolate_address());
|
__ LoadAddress(arg3, ExternalReference::isolate_address());
|
||||||
int argument_count = 3;
|
int argument_count = 3;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user