Commit d41f9290 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Omit smi-check for write-barrier unless tagged.

R=mvstanton@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15848002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f691f48c
......@@ -581,6 +581,8 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
index -= object->map()->inobject_properties();
// TODO(verwaest): Share this code as a code stub.
SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
if (index < 0) {
// Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize);
......@@ -606,7 +608,9 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
name_reg,
scratch1,
kLRHasNotBeenSaved,
kDontSaveFPRegs);
kDontSaveFPRegs,
EMIT_REMEMBERED_SET,
smi_check);
}
} else {
// Write to the properties array.
......@@ -636,7 +640,9 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
name_reg,
receiver_reg,
kLRHasNotBeenSaved,
kDontSaveFPRegs);
kDontSaveFPRegs,
EMIT_REMEMBERED_SET,
smi_check);
}
}
......@@ -723,6 +729,8 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
}
// TODO(verwaest): Share this code as a code stub.
SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
if (index < 0) {
// Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize);
......@@ -740,7 +748,9 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
name_reg,
scratch1,
kLRHasNotBeenSaved,
kDontSaveFPRegs);
kDontSaveFPRegs,
EMIT_REMEMBERED_SET,
smi_check);
}
} else {
// Write to the properties array.
......@@ -762,7 +772,9 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
name_reg,
receiver_reg,
kLRHasNotBeenSaved,
kDontSaveFPRegs);
kDontSaveFPRegs,
EMIT_REMEMBERED_SET,
smi_check);
}
}
......
......@@ -918,6 +918,8 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
// object and the number of in-object properties is not going to change.
index -= object->map()->inobject_properties();
SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
// TODO(verwaest): Share this code as a code stub.
if (index < 0) {
// Set the property straight into the object.
......@@ -940,7 +942,9 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
offset,
name_reg,
scratch1,
kDontSaveFPRegs);
kDontSaveFPRegs,
EMIT_REMEMBERED_SET,
smi_check);
}
} else {
// Write to the properties array.
......@@ -965,7 +969,9 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
offset,
name_reg,
receiver_reg,
kDontSaveFPRegs);
kDontSaveFPRegs,
EMIT_REMEMBERED_SET,
smi_check);
}
}
......@@ -1061,6 +1067,8 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
ASSERT(!FLAG_track_double_fields || !representation.IsDouble());
// TODO(verwaest): Share this code as a code stub.
SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
if (index < 0) {
// Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize);
......@@ -1074,7 +1082,9 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
offset,
name_reg,
scratch1,
kDontSaveFPRegs);
kDontSaveFPRegs,
EMIT_REMEMBERED_SET,
smi_check);
}
} else {
// Write to the properties array.
......@@ -1091,7 +1101,9 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
offset,
name_reg,
receiver_reg,
kDontSaveFPRegs);
kDontSaveFPRegs,
EMIT_REMEMBERED_SET,
smi_check);
}
}
......
......@@ -880,6 +880,8 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
index -= object->map()->inobject_properties();
// TODO(verwaest): Share this code as a code stub.
SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
if (index < 0) {
// Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize);
......@@ -898,7 +900,8 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
ASSERT(storage_reg.is(name_reg));
}
__ RecordWriteField(
receiver_reg, offset, name_reg, scratch1, kDontSaveFPRegs);
receiver_reg, offset, name_reg, scratch1, kDontSaveFPRegs,
EMIT_REMEMBERED_SET, smi_check);
}
} else {
// Write to the properties array.
......@@ -920,7 +923,8 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
ASSERT(storage_reg.is(name_reg));
}
__ RecordWriteField(
scratch1, offset, name_reg, receiver_reg, kDontSaveFPRegs);
scratch1, offset, name_reg, receiver_reg, kDontSaveFPRegs,
EMIT_REMEMBERED_SET, smi_check);
}
}
......@@ -1000,6 +1004,8 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
}
// TODO(verwaest): Share this code as a code stub.
SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
if (index < 0) {
// Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize);
......@@ -1010,7 +1016,8 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
// Pass the value being stored in the now unused name_reg.
__ movq(name_reg, value_reg);
__ RecordWriteField(
receiver_reg, offset, name_reg, scratch1, kDontSaveFPRegs);
receiver_reg, offset, name_reg, scratch1, kDontSaveFPRegs,
EMIT_REMEMBERED_SET, smi_check);
}
} else {
// Write to the properties array.
......@@ -1024,7 +1031,8 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
// Pass the value being stored in the now unused name_reg.
__ movq(name_reg, value_reg);
__ RecordWriteField(
scratch1, offset, name_reg, receiver_reg, kDontSaveFPRegs);
scratch1, offset, name_reg, receiver_reg, kDontSaveFPRegs,
EMIT_REMEMBERED_SET, smi_check);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment