elements, index, static_cast<HValue*>(NULL),
kind, ALLOW_RETURN_HOLE);
IfBuilder if_issame(this);
- HCompareMap* issame = if_issame.If<HCompareMap>(
+ if_issame.IfNot<HIsSmiAndBranch>(element);
+ HCompareMap* issame = if_issame.AndIf<HCompareMap>(
element, isolate()->factory()->heap_number_map());
if_issame.And();
HValue* number = Add<HLoadNamedField>(
--- /dev/null
+// 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 foo() { return [+0,false].indexOf(-(4/3)); }
+foo();
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();