v8/test/debugger/debug/debug-optimize.js
Ross McIlroy 05207b098a [Interpreter] Replace --ignition flag with a --stress-fullcodegen
Removes the --ignition flag which is now on by default. Adds a
--stress-fullcodegen flag which enables running all functions supported
by fullcodegen to be compiled by fullcodegen.

This will enable moving parser internalization later when we are not
stressing fullcodegen or compiling asm.js functions.

BUG=v8:5203, v8:6409, v8:6589

Change-Id: I7fa68016d4e734755434ec0b4e749ef65ffa7f4e
Reviewed-on: https://chromium-review.googlesource.com/565569
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46635}
2017-07-13 13:05:00 +00:00

55 lines
867 B
JavaScript

// Copyright 2015 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: --opt --no-always-opt --no-stress-fullcodegen
var Debug = debug.Debug;
function f1() {
return 1;
}
function f2() {
return 2;
}
function f3() {
return f1();
}
function f4() {
return 4;
}
function optimize(f) {
f();
f();
%OptimizeFunctionOnNextCall(f);
f();
}
optimize(f1);
optimize(f2);
optimize(f3);
Debug.setListener(function() {});
assertOptimized(f1);
assertOptimized(f2);
assertOptimized(f3);
Debug.setBreakPoint(f1, 1);
// Setting break point deoptimizes f1 and f3 (which inlines f1).
assertUnoptimized(f1);
assertOptimized(f2);
assertUnoptimized(f3);
// We can optimize with break points set.
optimize(f4);
assertOptimized(f4);
Debug.setListener(null);