Commit 54dc61a5 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

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
parent 15582e24
......@@ -586,6 +586,14 @@ void BinaryOpStub::UpdateStatus(Handle<Object> 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()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment