Commit b4214a12 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

[a64] Omit redundant smi checks in write barriers.

R=rmcilroy@chromium.org

Review URL: https://codereview.chromium.org/156603007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 85856fea
...@@ -5051,11 +5051,17 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -5051,11 +5051,17 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
} }
Handle<Map> transition = instr->transition(); Handle<Map> transition = instr->transition();
SmiCheck check_needed =
instr->hydrogen()->value()->IsHeapObject()
? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
Register value = ToRegister(instr->value()); Register value = ToRegister(instr->value());
if (!instr->hydrogen()->value()->type().IsHeapObject()) { if (!instr->hydrogen()->value()->type().IsHeapObject()) {
DeoptimizeIfSmi(value, instr->environment()); DeoptimizeIfSmi(value, instr->environment());
// We know that value is a smi now, so we can omit the check below.
check_needed = OMIT_SMI_CHECK;
} }
} else if (representation.IsDouble()) { } else if (representation.IsDouble()) {
ASSERT(transition.is_null()); ASSERT(transition.is_null());
...@@ -5087,9 +5093,6 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -5087,9 +5093,6 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
// Do the store. // Do the store.
Register value = ToRegister(instr->value()); Register value = ToRegister(instr->value());
Register destination; Register destination;
SmiCheck check_needed =
instr->hydrogen()->value()->IsHeapObject()
? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
if (access.IsInobject()) { if (access.IsInobject()) {
destination = object; destination = object;
} else { } else {
......
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