diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc index 5463a9a87f..548da2e409 100644 --- a/src/arm/lithium-arm.cc +++ b/src/arm/lithium-arm.cc @@ -2354,10 +2354,11 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); - if ((FLAG_track_fields && instr->field_representation().IsSmi()) || - (FLAG_track_heap_object_fields && - instr->field_representation().IsHeapObject())) { - return AssignEnvironment(result); + if (FLAG_track_heap_object_fields && + instr->field_representation().IsHeapObject()) { + if (!instr->value()->type().IsHeapObject()) { + return AssignEnvironment(result); + } } return result; } diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc index c5c7755abf..1b92c60f08 100644 --- a/src/ia32/lithium-ia32.cc +++ b/src/ia32/lithium-ia32.cc @@ -2478,10 +2478,11 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp, temp_map); - if ((FLAG_track_fields && instr->field_representation().IsSmi()) || - (FLAG_track_heap_object_fields && - instr->field_representation().IsHeapObject())) { - return AssignEnvironment(result); + if (FLAG_track_heap_object_fields && + instr->field_representation().IsHeapObject()) { + if (!instr->value()->type().IsHeapObject()) { + return AssignEnvironment(result); + } } return result; } diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc index e50be086bc..59a833e2f4 100644 --- a/src/x64/lithium-x64.cc +++ b/src/x64/lithium-x64.cc @@ -2294,10 +2294,11 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { needs_write_barrier_for_map) ? TempRegister() : NULL; LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); - if ((FLAG_track_fields && instr->field_representation().IsSmi()) || - (FLAG_track_heap_object_fields && - instr->field_representation().IsHeapObject())) { - return AssignEnvironment(result); + if (FLAG_track_heap_object_fields && + instr->field_representation().IsHeapObject()) { + if (!instr->value()->type().IsHeapObject()) { + return AssignEnvironment(result); + } } return result; }