Files
v8/test/debugger/debug/debug-materialized.js
Simon Zünd 39852e0b06 Reland "[debug] Remove 'value unavailble' experiment"
This is a reland of commit c7cbb4139b

Relanding as is. Was reverted due to a test failure that turned out
to be a flake that still reproduced after the revert landed.

Flako run: https://ci.chromium.org/ui/p/v8/builders/try.triggered/v8_flako/b8758034788224082417/overview

Original change's description:
> [debug] Remove 'value unavailble' experiment
>
> The experiment was enabled in July 2023 and we haven't heard any
> negative feedback so we can safely remove the experiment now.
>
> R=bmeurer@chromium.org
>
> Bug: chromium:1328681
> Change-Id: I6613a4e8e741d8c16881ec1adeb01e039244fac7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5224284
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#91968}

Bug: chromium:1328681
Change-Id: I651e2a20c6612fc138246aa7e61daab285b57795
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5233640
Commit-Queue: Simon Zünd <szuend@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#91978}
2024-01-24 10:43:56 +00:00

46 lines
981 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.
function dbg(x) {
debugger;
}
function foo() {
arguments[0];
dbg();
}
function bar() {
var t = { a : 1 };
dbg();
return t.a;
}
%PrepareFunctionForOptimization(foo);
%PrepareFunctionForOptimization(bar);
foo(1);
foo(1);
bar(1);
bar(1);
%OptimizeFunctionOnNextCall(foo);
%OptimizeFunctionOnNextCall(bar);
var Debug = debug.Debug;
Debug.setListener(function(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return;
for (var i = 0; i < exec_state.frameCount(); i++) {
var f = exec_state.frame(i);
for (var j = 0; j < f.localCount(); j++) {
if (f.localValue(j).isUnavailable()) {
print(`${f.localName(j)} is unavailable`);
} else {
print("'" + f.localName(j) + "' = " + f.localValue(j).value());
}
}
}
});
foo(1);
bar(1);