Commit dbdf487f authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[debug] test that functions optimize without breakpoints.

This came up in the context of a Twitter discussion, see this particular
tweet https://twitter.com/hashseed/status/905684048382754817 and the
relevant thread.

Change-Id: If2447169df999b64ce701a44321d48ba1bff2a06
Reviewed-on: https://chromium-review.googlesource.com/654598Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47864}
parent d4c6c756
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --opt
// Flags: --opt --no-always-opt
Debug = debug.Debug;
......@@ -15,4 +15,17 @@ f();
f();
assertOptimized(f);
var bp = Debug.setBreakPoint(f);
assertUnoptimized(f);
f();
f();
%OptimizeFunctionOnNextCall(f);
f();
assertUnoptimized(f);
Debug.clearBreakPoint(bp);
%OptimizeFunctionOnNextCall(f);
f();
assertOptimized(f);
Debug.setListener(null);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment