v8/test/mjsunit/regress/regress-5380.js
mstarzinger b848716c98 [compiler] Fix confusion about OSR BailoutId semantics.
The semantics of the {BailoutId} representing an OSR entry point is
different between the interpreter and the full code generator. These
semantics are hard-coded in various graph builders. We need to ensure
that the correct graph builder is chosen for OSR compilations.

R=rmcilroy@chromium.org
TEST=mjsunit/regress/regress-5380
BUG=v8:5380

Review-Url: https://codereview.chromium.org/2341663002
Cr-Commit-Position: refs/heads/master@{#39444}
2016-09-15 11:00:42 +00:00

18 lines
402 B
JavaScript

// Copyright 2016 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 --ignition-staging --turbo
function f(do_osr) {
for (var i = 0; i < 3; ++i) {
if (i == 1 && do_osr) %OptimizeOsr();
}
}
f(false);
f(false);
%BaselineFunctionOnNextCall(f);
f(false);
f(true);