2020-05-06 08:59:44 +00:00
|
|
|
// Copyright 2020 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.
|
|
|
|
|
2020-05-07 10:40:08 +00:00
|
|
|
// Flags: --allow-natives-syntax
|
2020-05-06 08:59:44 +00:00
|
|
|
|
|
|
|
function foo() {
|
|
|
|
return bar();
|
|
|
|
}
|
|
|
|
|
|
|
|
function bar(a, b) {
|
|
|
|
return a + b;
|
|
|
|
}
|
|
|
|
|
|
|
|
%PrepareFunctionForOptimization(foo);
|
|
|
|
foo();
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
%PrepareFunctionForOptimization(bar);
|
|
|
|
%OptimizeFunctionOnNextCall(bar);
|
|
|
|
bar(2n, 2n);
|
|
|
|
assertTrue(Number.isNaN(foo()));
|