Reviewers: Toon Verwaest,

Message:
Committed patchset #1 manually as r17144.

Description:
Fix potential deopt-loop introduced in r17143.

[email protected]
BUG=

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

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

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

Affected files (+12, -5 lines):
  M src/code-stubs.cc


Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 1b9826ee42ea0c786a10855573009f63a80c1974..2283f847bab674029ae9e6d1f881e431589a60fc 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -584,11 +584,18 @@ void BinaryOpStub::UpdateStatus(Handle<Object> left,
          op_ == Token::ADD);

   if (old_state == GetExtraICState()) {
-    // Since the fpu is to precise, we might bail out on numbers which
-    // actually would truncate with 64 bit precision.
-    ASSERT(!CpuFeatures::IsSupported(SSE2) &&
-           result_state_ <= INT32);
-    result_state_ = NUMBER;
+    // Tagged operations can lead to non-truncating HChanges
+    if (left->IsUndefined()) {
+      left_state_ = GENERIC;
+    } else if (right->IsUndefined()) {
+      right_state_ = GENERIC;
+    } else {
+      // Since the fpu is to precise, we might bail out on numbers which
+      // actually would truncate with 64 bit precision.
+      ASSERT(!CpuFeatures::IsSupported(SSE2) &&
+             result_state_ <= INT32);
+      result_state_ = NUMBER;
+    }
   }
 }



--
--
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/groups/opt_out.

Reply via email to