Fixing tagged binary operation input type feedback.
authorolivf@chromium.org <olivf@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 10 Oct 2013 13:32:00 +0000 (13:32 +0000)
committerolivf@chromium.org <olivf@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 10 Oct 2013 13:32:00 +0000 (13:32 +0000)
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/code-stubs.cc

index 0911d9a..1b9826e 100644 (file)
@@ -569,14 +569,12 @@ void BinaryOpStub::UpdateStatus(Handle<Object> left,
 
   State max_input = Max(left_state_, right_state_);
 
-  // Avoid unnecessary Representation changes.
+  // TODO(olivf) Instead of doing this normalization we should have a Hydrogen
+  // version of the LookupNumberStringCache to avoid a converting StringAddStub.
   if (left_state_ == STRING && right_state_ < STRING) {
     right_state_ = GENERIC;
   } else if (right_state_ == STRING && left_state_ < STRING) {
     left_state_ = GENERIC;
-  } else if ((right_state_ == GENERIC && left_state_ != STRING) ||
-             (left_state_ == GENERIC && right_state_ != STRING)) {
-    left_state_ = right_state_ = GENERIC;
   } else if (!has_int_result() && op_ != Token::SHR &&
              max_input <= NUMBER && max_input > result_state_) {
     result_state_ = max_input;