Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Unified Diff: src/x64/stub-cache-x64.cc

Issue 15848002: Omit smi-check for write-barrier unless tagged. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index 148f65ee0d51e49379f8d2e8b795bc759131a727..f6c81b4c8ca298084c84b8e2116b2f375d947002 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -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);
}
}
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698