From 1384cc0a3d4d34322fd9ed127bceacb52cedc9e5 Mon Sep 17 00:00:00 2001 From: "olivf@chromium.org" Date: Thu, 10 Oct 2013 13:32:00 +0000 Subject: [PATCH] Fixing tagged binary operation input type feedback. 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/code-stubs.cc b/src/code-stubs.cc index 0911d9a..1b9826e 100644 --- a/src/code-stubs.cc +++ b/src/code-stubs.cc @@ -569,14 +569,12 @@ void BinaryOpStub::UpdateStatus(Handle 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; -- 2.7.4