64030c6b56
We'd sometimes forget that the input was not originally a numeric. Bug: v8:7135 Change-Id: I8bc690cc0c2dfac8a2a218ca56352b6a569825dc Reviewed-on: https://chromium-review.googlesource.com/793039 Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#49667}
18 lines
411 B
JavaScript
18 lines
411 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() { return -"0" }
|
|
foo();
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo();
|
|
assertOptimized(foo);
|
|
|
|
function bar() { return -"1" }
|
|
bar();
|
|
%OptimizeFunctionOnNextCall(bar);
|
|
bar();
|
|
assertOptimized(bar);
|