v8/test/mjsunit/regress/regress-6941.js
Georg Neis 7a7639e594 Fix type feedback recording in CodeStubAssembler::Equal.
R=bmeurer@chromium.org, jarin@chromium.org

Bug: v8:6941
Change-Id: Ic1062e1c5f181ab5041fb7b7cb1487683a36c300
Reviewed-on: https://chromium-review.googlesource.com/721020
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48599}
2017-10-16 14:41:20 +00:00

21 lines
449 B
JavaScript

// Copyright 2017 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 --opt
function foo(x) {
return Symbol.iterator == x;
}
function main() {
foo(Symbol());
foo({valueOf() { return Symbol.toPrimitive}});
}
%NeverOptimizeFunction(main);
main();
%OptimizeFunctionOnNextCall(foo);
main();
assertOptimized(foo);