From: yangguo@chromium.org Date: Tue, 24 Jun 2014 09:33:05 +0000 (+0000) Subject: Remove bogus assertions in HCompareObjectEqAndBranch. X-Git-Tag: upstream/4.7.83~8581 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58bf19e9d595440fef96c9735eb360b6b60cfce9;p=platform%2Fupstream%2Fv8.git Remove bogus assertions in HCompareObjectEqAndBranch. R=jkummerow@chromium.org, danno@chromium.org BUG=387636 LOG=Y Review URL: https://codereview.chromium.org/331863015 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index d691cbe..ef42425 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -4383,12 +4383,6 @@ class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> { HBasicBlock* true_target = NULL, HBasicBlock* false_target = NULL) : known_successor_index_(kNoKnownSuccessorIndex) { - ASSERT(!left->IsConstant() || - (!HConstant::cast(left)->HasInteger32Value() || - HConstant::cast(left)->HasSmiValue())); - ASSERT(!right->IsConstant() || - (!HConstant::cast(right)->HasInteger32Value() || - HConstant::cast(right)->HasSmiValue())); SetOperandAt(0, left); SetOperandAt(1, right); SetSuccessorAt(0, true_target); diff --git a/test/mjsunit/regress/regress-crbug-387636.js b/test/mjsunit/regress/regress-crbug-387636.js new file mode 100644 index 0000000..1e50ace --- /dev/null +++ b/test/mjsunit/regress/regress-crbug-387636.js @@ -0,0 +1,14 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --allow-natives-syntax + +function f() { + [].indexOf(0x40000000); +} + +f(); +f(); +%OptimizeFunctionOnNextCall(f); +f();