v8/test/mjsunit/regress/regress-1077804.js
Nico Hartmann aed91bc8dc [mjsunit] Relax flags of regress-1077804.js test
Bug: chromium:1077804
Change-Id: Iec47dbbcaf4ab8ea1a738df303b35c241a4d12d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2187499
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67670}
2020-05-08 08:27:58 +00:00

22 lines
475 B
JavaScript

// 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.
// Flags: --allow-natives-syntax
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()));