Remove write barriers for cells on x64, ARM and MIPS.
Review URL: http://codereview.chromium.org/8834005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
a8bd2260ea
commit
f6eab29d73
@ -2283,21 +2283,7 @@ void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
|
||||
|
||||
// Store the value.
|
||||
__ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
|
||||
|
||||
// Cells are always in the remembered set.
|
||||
if (instr->hydrogen()->NeedsWriteBarrier()) {
|
||||
HType type = instr->hydrogen()->value()->type();
|
||||
SmiCheck check_needed =
|
||||
type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
|
||||
__ RecordWriteField(scratch,
|
||||
JSGlobalPropertyCell::kValueOffset,
|
||||
value,
|
||||
scratch2,
|
||||
kLRHasBeenSaved,
|
||||
kSaveFPRegs,
|
||||
OMIT_REMEMBERED_SET,
|
||||
check_needed);
|
||||
}
|
||||
// Cells are always rescanned, so no write barrier here.
|
||||
}
|
||||
|
||||
|
||||
|
@ -2587,15 +2587,7 @@ Handle<Code> StoreStubCompiler::CompileStoreGlobal(
|
||||
|
||||
// Store the value in the cell.
|
||||
__ str(r0, FieldMemOperand(r4, JSGlobalPropertyCell::kValueOffset));
|
||||
|
||||
__ mov(r1, r0);
|
||||
__ RecordWriteField(r4,
|
||||
JSGlobalPropertyCell::kValueOffset,
|
||||
r1,
|
||||
r2,
|
||||
kLRHasNotBeenSaved,
|
||||
kDontSaveFPRegs,
|
||||
OMIT_REMEMBERED_SET);
|
||||
// Cells are always rescanned, so no write barrier here.
|
||||
|
||||
Counters* counters = masm()->isolate()->counters();
|
||||
__ IncrementCounter(counters->named_store_global_inline(), 1, r4, r3);
|
||||
|
@ -2141,21 +2141,7 @@ void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
|
||||
|
||||
// Store the value.
|
||||
__ sw(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
|
||||
|
||||
// Cells are always in the remembered set.
|
||||
if (instr->hydrogen()->NeedsWriteBarrier()) {
|
||||
HType type = instr->hydrogen()->value()->type();
|
||||
SmiCheck check_needed =
|
||||
type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
|
||||
__ RecordWriteField(scratch,
|
||||
JSGlobalPropertyCell::kValueOffset,
|
||||
value,
|
||||
scratch2,
|
||||
kRAHasBeenSaved,
|
||||
kSaveFPRegs,
|
||||
OMIT_REMEMBERED_SET,
|
||||
check_needed);
|
||||
}
|
||||
// Cells are always rescanned, so no write barrier here.
|
||||
}
|
||||
|
||||
|
||||
|
@ -2605,15 +2605,7 @@ Handle<Code> StoreStubCompiler::CompileStoreGlobal(
|
||||
// Store the value in the cell.
|
||||
__ sw(a0, FieldMemOperand(t0, JSGlobalPropertyCell::kValueOffset));
|
||||
__ mov(v0, a0); // Stored value must be returned in v0.
|
||||
|
||||
// This trashes a0 but the value is returned in v0 anyway.
|
||||
__ RecordWriteField(t0,
|
||||
JSGlobalPropertyCell::kValueOffset,
|
||||
a0,
|
||||
a2,
|
||||
kRAHasNotBeenSaved,
|
||||
kDontSaveFPRegs,
|
||||
OMIT_REMEMBERED_SET);
|
||||
// Cells are always rescanned, so no write barrier here.
|
||||
|
||||
Counters* counters = masm()->isolate()->counters();
|
||||
__ IncrementCounter(counters->named_store_global_inline(), 1, a1, a3);
|
||||
|
@ -2047,25 +2047,7 @@ void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
|
||||
|
||||
// Store the value.
|
||||
__ movq(Operand(address, 0), value);
|
||||
|
||||
if (instr->hydrogen()->NeedsWriteBarrier()) {
|
||||
Label smi_store;
|
||||
HType type = instr->hydrogen()->value()->type();
|
||||
if (!type.IsHeapNumber() && !type.IsString() && !type.IsNonPrimitive()) {
|
||||
__ JumpIfSmi(value, &smi_store, Label::kNear);
|
||||
}
|
||||
|
||||
int offset = JSGlobalPropertyCell::kValueOffset - kHeapObjectTag;
|
||||
__ lea(object, Operand(address, -offset));
|
||||
// Cells are always in the remembered set.
|
||||
__ RecordWrite(object,
|
||||
address,
|
||||
value,
|
||||
kSaveFPRegs,
|
||||
OMIT_REMEMBERED_SET,
|
||||
OMIT_SMI_CHECK);
|
||||
__ bind(&smi_store);
|
||||
}
|
||||
// Cells are always rescanned, so no write barrier here.
|
||||
}
|
||||
|
||||
|
||||
|
@ -2370,23 +2370,9 @@ Handle<Code> StoreStubCompiler::CompileStoreGlobal(
|
||||
|
||||
// Store the value in the cell.
|
||||
__ movq(cell_operand, rax);
|
||||
Label done;
|
||||
__ JumpIfSmi(rax, &done);
|
||||
|
||||
__ movq(rcx, rax);
|
||||
__ lea(rdx, cell_operand);
|
||||
// Cells are always in the remembered set.
|
||||
__ RecordWrite(rbx, // Object.
|
||||
rdx, // Address.
|
||||
rcx, // Value.
|
||||
kDontSaveFPRegs,
|
||||
OMIT_REMEMBERED_SET,
|
||||
OMIT_SMI_CHECK);
|
||||
|
||||
// Cells are always rescanned, so no write barrier here.
|
||||
|
||||
// Return the value (register rax).
|
||||
__ bind(&done);
|
||||
|
||||
Counters* counters = isolate()->counters();
|
||||
__ IncrementCounter(counters->named_store_global_inline(), 1);
|
||||
__ ret(0);
|
||||
|
Loading…
Reference in New Issue
Block a user