Skip to content

Commit

Permalink
[a64] Omit redundant smi checks in write barriers.
Browse files Browse the repository at this point in the history
R=rmcilroy@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information
bmeurer@chromium.org committed Feb 12, 2014
1 parent 929c047 commit f6fa3eb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/a64/lithium-codegen-a64.cc
Expand Up @@ -5051,11 +5051,17 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
}

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()) {
Register value = ToRegister(instr->value());
if (!instr->hydrogen()->value()->type().IsHeapObject()) {
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()) {
ASSERT(transition.is_null());
Expand Down Expand Up @@ -5087,9 +5093,6 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
// Do the store.
Register value = ToRegister(instr->value());
Register destination;
SmiCheck check_needed =
instr->hydrogen()->value()->IsHeapObject()
? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
if (access.IsInobject()) {
destination = object;
} else {
Expand Down

0 comments on commit f6fa3eb

Please sign in to comment.