Reviewers: ulan,

Message:
Committed patchset #2 manually as r20476 (presubmit successful).

Description:
Fixed environment assignment for LCheckNonSmi.

This fixes browsing facebook.com with a debug version of Chrome.

[email protected]

Committed: https://code.google.com/p/v8/source/detail?r=20476

Please review this at https://codereview.chromium.org/223763003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+12, -4 lines):
  M src/arm/lithium-arm.cc
  M src/arm64/lithium-arm64.cc
  M src/ia32/lithium-ia32.cc
  M src/x64/lithium-x64.cc


Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 97722ccfa24876d8671978cbabfc49f5ce8fab64..357c191d817dd209487ff01bbaba11fee55f7761 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1963,7 +1963,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {

 LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) {
   LOperand* value = UseRegisterAtStart(instr->value());
-  return AssignEnvironment(new(zone()) LCheckNonSmi(value));
+  LInstruction* result = new(zone()) LCheckNonSmi(value);
+  if (!instr->value()->IsHeapObject()) result = AssignEnvironment(result);
+  return result;
 }


Index: src/arm64/lithium-arm64.cc
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc
index d58e3cc9916bf01890c550f2b581ae158f17c71c..0a522a5f551b64f627396ccf63d24c4688974173 100644
--- a/src/arm64/lithium-arm64.cc
+++ b/src/arm64/lithium-arm64.cc
@@ -1171,7 +1171,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {

 LInstruction* LChunkBuilder::DoCheckValue(HCheckValue* instr) {
   LOperand* value = UseRegisterAtStart(instr->value());
-  return AssignEnvironment(new(zone()) LCheckValue(value));
+  LInstruction* result = new(zone()) LCheckNonSmi(value);
+  if (!instr->value()->IsHeapObject()) result = AssignEnvironment(result);
+  return result;
 }


Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index 66c79d1d587c2cf1857789728993c87e2cc97f43..cb15e0d82f4872f7b3bbc1608cf5d49c90126f22 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -2007,7 +2007,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {

 LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) {
   LOperand* value = UseAtStart(instr->value());
-  return AssignEnvironment(new(zone()) LCheckNonSmi(value));
+  LInstruction* result = new(zone()) LCheckNonSmi(value);
+  if (!instr->value()->IsHeapObject()) result = AssignEnvironment(result);
+  return result;
 }


Index: src/x64/lithium-x64.cc
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
index 90f9a1a236f72eb1b23dac9fcea4262acb986b43..ea5ef9f3af7b1736b51cfcda0533a41f787bd799 100644
--- a/src/x64/lithium-x64.cc
+++ b/src/x64/lithium-x64.cc
@@ -1925,7 +1925,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {

 LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) {
   LOperand* value = UseRegisterAtStart(instr->value());
-  return AssignEnvironment(new(zone()) LCheckNonSmi(value));
+  LInstruction* result = new(zone()) LCheckNonSmi(value);
+  if (!instr->value()->IsHeapObject()) result = AssignEnvironment(result);
+  return result;
 }




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to