From 1b4cb2aac4922e626c352100df1721cd37a51572 Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Thu, 6 Jun 2013 14:31:44 +0000 Subject: [PATCH] Assign less environments R=danno@chromium.org Review URL: https://chromiumcodereview.appspot.com/16556002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/lithium-arm.cc | 9 +++++---- src/ia32/lithium-ia32.cc | 9 +++++---- src/x64/lithium-x64.cc | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) 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; }