From 54dc61a50448a082483b080cdf38814885477076 Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Wed, 20 Nov 2013 09:30:46 +0000 Subject: [PATCH] Reset overwrite mode for BinaryOpStub unless we can actually make use of it. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/77943002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/code-stubs.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/code-stubs.cc b/src/code-stubs.cc index 166d46d..051dd45 100644 --- a/src/code-stubs.cc +++ b/src/code-stubs.cc @@ -586,6 +586,14 @@ void BinaryOpStub::UpdateStatus(Handle left, ASSERT(result_state_ <= (has_int_result() ? INT32 : NUMBER) || op_ == Token::ADD); + // Reset overwrite mode unless we can actually make use of it, or may be able + // to make use of it at some point in the future. + if ((mode_ == OVERWRITE_LEFT && left_state_ > NUMBER) || + (mode_ == OVERWRITE_RIGHT && right_state_ > NUMBER) || + result_state_ > NUMBER) { + mode_ = NO_OVERWRITE; + } + if (old_state == GetExtraICState()) { // Tagged operations can lead to non-truncating HChanges if (left->IsUndefined() || left->IsBoolean()) { -- 2.7.4