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:
hpayer@chromium.org 2012-11-22 07:05:20 +00:00
parent 2fed381652
commit ee164ffe3d
6 changed files with 8 additions and 29 deletions

View File

@ -7381,12 +7381,7 @@ void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) {
ASSERT(!address.is(r0));
__ Move(address, regs_.address());
__ Move(r0, regs_.object());
if (mode == INCREMENTAL_COMPACTION) {
__ Move(r1, address);
} else {
ASSERT(mode == INCREMENTAL);
__ ldr(r1, MemOperand(address, 0));
}
__ Move(r1, address);
__ mov(r2, Operand(ExternalReference::isolate_address()));
AllowExternalCallThatCantCauseGC scope(masm);

View File

@ -7225,13 +7225,7 @@ void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) {
int argument_count = 3;
__ PrepareCallCFunction(argument_count, regs_.scratch0());
__ mov(Operand(esp, 0 * kPointerSize), regs_.object());
if (mode == INCREMENTAL_COMPACTION) {
__ 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, 1 * kPointerSize), regs_.address()); // Slot.
__ mov(Operand(esp, 2 * kPointerSize),
Immediate(ExternalReference::isolate_address()));

View File

@ -78,7 +78,7 @@ void IncrementalMarking::RecordWriteSlow(HeapObject* obj,
void IncrementalMarking::RecordWriteFromCode(HeapObject* obj,
Object* value,
Object** slot,
Isolate* isolate) {
ASSERT(obj->IsHeapObject());
IncrementalMarking* marking = isolate->heap()->incremental_marking();
@ -94,7 +94,7 @@ void IncrementalMarking::RecordWriteFromCode(HeapObject* obj,
MemoryChunk::kWriteBarrierCounterGranularity);
}
marking->RecordWrite(obj, NULL, value);
marking->RecordWrite(obj, slot, *slot);
}

View File

@ -127,7 +127,7 @@ class IncrementalMarking {
}
static void RecordWriteFromCode(HeapObject* obj,
Object* value,
Object** slot,
Isolate* isolate);
static void RecordWriteForEvacuationFromCode(HeapObject* obj,

View File

@ -7555,12 +7555,7 @@ void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) {
ASSERT(!address.is(a0));
__ Move(address, regs_.address());
__ Move(a0, regs_.object());
if (mode == INCREMENTAL_COMPACTION) {
__ Move(a1, address);
} else {
ASSERT(mode == INCREMENTAL);
__ lw(a1, MemOperand(address, 0));
}
__ Move(a1, address);
__ li(a2, Operand(ExternalReference::isolate_address()));
AllowExternalCallThatCantCauseGC scope(masm);

View File

@ -6214,13 +6214,8 @@ void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) {
ASSERT(!address.is(arg1));
__ Move(address, regs_.address());
__ Move(arg1, regs_.object());
if (mode == INCREMENTAL_COMPACTION) {
// TODO(gc) Can we just set address arg2 in the beginning?
__ Move(arg2, address);
} else {
ASSERT(mode == INCREMENTAL);
__ movq(arg2, Operand(address, 0));
}
// TODO(gc) Can we just set address arg2 in the beginning?
__ Move(arg2, address);
__ LoadAddress(arg3, ExternalReference::isolate_address());
int argument_count = 3;