From: olivf@chromium.org Date: Thu, 10 Oct 2013 13:32:00 +0000 (+0000) Subject: Fixing tagged binary operation input type feedback. X-Git-Tag: upstream/4.7.83~12140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1384cc0a3d4d34322fd9ed127bceacb52cedc9e5;p=platform%2Fupstream%2Fv8.git 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 --- 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;