Commit 59f485fc authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[wasm][debug] Flatten locals in scope view.

This aligns the wasm locals with how JavaScript locals are displayed in
the DevTools scope view.

Before: https://i.imgur.com/y0urpbL.png
After: https://i.imgur.com/368KDay.png

Bug: chromium:1043034
Change-Id: I5811d18101ec68c320fd223e041e12989c66e721
Doc: https://bit.ly/wasm-fallback-dx#bookmark=id.1uhy72x83he7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232550
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68222}
parent fe49166a
......@@ -436,17 +436,9 @@ class DebugInfoImpl {
// Fill parameters and locals.
int num_locals = static_cast<int>(scope.debug_side_table->num_locals());
DCHECK_LE(static_cast<int>(function->sig->parameter_count()), num_locals);
if (num_locals > 0) {
Handle<JSObject> locals_obj =
isolate->factory()->NewJSObjectWithNullProto();
Handle<String> locals_name =
isolate->factory()->InternalizeString(StaticCharVector("locals"));
JSObject::AddProperty(isolate, local_scope_object, locals_name,
locals_obj, NONE);
for (int i = 0; i < num_locals; ++i) {
Handle<Name> name;
if (!GetLocalNameString(isolate, native_module_, function->func_index,
i)
if (!GetLocalNameString(isolate, native_module_, function->func_index, i)
.ToHandle(&name)) {
name = PrintFToOneByteString<true>(isolate, "var%d", i);
}
......@@ -455,7 +447,8 @@ class DebugInfoImpl {
Handle<Object> value_obj = WasmValueToValueObject(isolate, value);
// {name} can be a string representation of an element index.
LookupIterator::Key lookup_key{isolate, name};
LookupIterator it(isolate, locals_obj, lookup_key, locals_obj,
LookupIterator it(isolate, local_scope_object, lookup_key,
local_scope_object,
LookupIterator::OWN_SKIP_INTERCEPTOR);
if (it.IsFound()) continue;
Object::AddDataProperty(&it, value_obj, NONE,
......@@ -463,7 +456,6 @@ class DebugInfoImpl {
StoreOrigin::kNamed)
.Check();
}
}
return local_scope_object;
}
......
......@@ -43,18 +43,9 @@ Protocol.Debugger.onPaused(async msg => {
if (scope.type == 'module') continue;
var scope_properties =
await Protocol.Runtime.getProperties({objectId: scope.object.objectId});
if (scope.type == 'local') {
for (var value of scope_properties.result.result) {
let msg = await Protocol.Runtime.getProperties(
{objectId: value.value.objectId});
let str = msg.result.result.map(elem => getWasmValue(elem.value)).join(', ');
line.push(`${value.name}: [${str}]`);
}
} else {
let str = scope_properties.result.result.map(elem => getWasmValue(elem.value)).join(', ');
line.push(`${scope.type}: [${str}]`);
}
}
InspectorTest.log(line.join('; '));
Protocol.Debugger.resume();
});
......
......@@ -20,7 +20,8 @@ at C (interpreted) (0:159):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 0 (i32)
- scope (local):
locals: "i32_arg": 42 (i32), "i32_local": 0 (i32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
- scope (wasm-expression-stack):
at B (liftoff) (0:150):
- scope (module):
......@@ -30,7 +31,11 @@ at B (liftoff) (0:150):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 0 (i32)
- scope (local):
locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
0: 0 (f32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
f32_local: 7.199999809265137 (f32)
var5: 0 (f32)
- scope (wasm-expression-stack):
0: 42 (i32)
1: 3 (i32)
......@@ -42,7 +47,7 @@ at A (liftoff) (0:128):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 0 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......@@ -59,7 +64,8 @@ at C (interpreted) (0:161):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 0 (i32)
- scope (local):
locals: "i32_arg": 42 (i32), "i32_local": 0 (i32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
- scope (wasm-expression-stack):
0: 42 (i32)
at B (liftoff) (0:150):
......@@ -70,7 +76,11 @@ at B (liftoff) (0:150):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 0 (i32)
- scope (local):
locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
0: 0 (f32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
f32_local: 7.199999809265137 (f32)
var5: 0 (f32)
- scope (wasm-expression-stack):
0: 42 (i32)
1: 3 (i32)
......@@ -82,7 +92,7 @@ at A (liftoff) (0:128):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 0 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......@@ -99,7 +109,8 @@ at C (interpreted) (0:163):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "i32_arg": 42 (i32), "i32_local": 0 (i32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
- scope (wasm-expression-stack):
at B (liftoff) (0:150):
- scope (module):
......@@ -109,7 +120,11 @@ at B (liftoff) (0:150):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
0: 0 (f32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
f32_local: 7.199999809265137 (f32)
var5: 0 (f32)
- scope (wasm-expression-stack):
0: 42 (i32)
1: 3 (i32)
......@@ -121,7 +136,7 @@ at A (liftoff) (0:128):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......@@ -138,7 +153,8 @@ at C (interpreted) (0:165):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "i32_arg": 42 (i32), "i32_local": 0 (i32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
- scope (wasm-expression-stack):
0: 47 (i32)
at B (liftoff) (0:150):
......@@ -149,7 +165,11 @@ at B (liftoff) (0:150):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
0: 0 (f32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
f32_local: 7.199999809265137 (f32)
var5: 0 (f32)
- scope (wasm-expression-stack):
0: 42 (i32)
1: 3 (i32)
......@@ -161,7 +181,7 @@ at A (liftoff) (0:128):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......@@ -178,7 +198,8 @@ at C (interpreted) (0:167):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "i32_arg": 42 (i32), "i32_local": 47 (i32)
i32_arg: 42 (i32)
i32_local: 47 (i32)
- scope (wasm-expression-stack):
at B (liftoff) (0:150):
- scope (module):
......@@ -188,7 +209,11 @@ at B (liftoff) (0:150):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
0: 0 (f32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
f32_local: 7.199999809265137 (f32)
var5: 0 (f32)
- scope (wasm-expression-stack):
0: 42 (i32)
1: 3 (i32)
......@@ -200,7 +225,7 @@ at A (liftoff) (0:128):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......@@ -217,7 +242,11 @@ at B (liftoff) (0:152):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
0: 0 (f32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
f32_local: 7.199999809265137 (f32)
var5: 0 (f32)
- scope (wasm-expression-stack):
0: 42 (i32)
1: 3 (i32)
......@@ -229,7 +258,7 @@ at A (liftoff) (0:128):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......@@ -246,7 +275,11 @@ at B (liftoff) (0:153):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
0: 0 (f32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
f32_local: 7.199999809265137 (f32)
var5: 0 (f32)
- scope (wasm-expression-stack):
0: 42 (i32)
at A (liftoff) (0:128):
......@@ -257,7 +290,7 @@ at A (liftoff) (0:128):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......@@ -274,7 +307,11 @@ at B (liftoff) (0:154):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
0: 0 (f32)
i32_arg: 42 (i32)
i32_local: 0 (i32)
f32_local: 7.199999809265137 (f32)
var5: 0 (f32)
- scope (wasm-expression-stack):
at A (liftoff) (0:128):
- scope (module):
......@@ -284,7 +321,7 @@ at A (liftoff) (0:128):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......@@ -301,7 +338,7 @@ at A (liftoff) (0:130):
exported_table: js_func: function js_func() { [native code] }, anonymous: function () { [native code] }, A (liftoff): function 0() { [native code] }
globals: "exported_global": 42 (i32)
- scope (local):
locals: "var0": 42 (i32)
var0: 42 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
- scope (global):
......
......@@ -15,7 +15,7 @@ at wasm_B (0:56):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 3 (i32)
var0: 3 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -40,7 +40,7 @@ at wasm_B (0:56):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 3 (i32)
var0: 3 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -51,7 +51,7 @@ at wasm_B (0:45):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 3 (i32)
var0: 3 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -62,7 +62,7 @@ at wasm_B (0:47):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 3 (i32)
var0: 3 (i32)
- scope (wasm-expression-stack):
0: 3 (i32)
at (anonymous) (0:17):
......@@ -74,7 +74,7 @@ at wasm_B (0:49):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 3 (i32)
var0: 3 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -85,7 +85,7 @@ at wasm_B (0:51):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 3 (i32)
var0: 3 (i32)
- scope (wasm-expression-stack):
0: 3 (i32)
at (anonymous) (0:17):
......@@ -97,7 +97,7 @@ at wasm_B (0:53):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 3 (i32)
var0: 3 (i32)
- scope (wasm-expression-stack):
0: 3 (i32)
1: 1 (i32)
......@@ -110,7 +110,7 @@ at wasm_B (0:54):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 3 (i32)
var0: 3 (i32)
- scope (wasm-expression-stack):
0: 2 (i32)
at (anonymous) (0:17):
......@@ -127,7 +127,7 @@ at wasm_B (0:56):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 2 (i32)
var0: 2 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -143,7 +143,7 @@ at wasm_B (0:56):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 2 (i32)
var0: 2 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -154,7 +154,7 @@ at wasm_B (0:45):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 2 (i32)
var0: 2 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -165,7 +165,7 @@ at wasm_B (0:47):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 2 (i32)
var0: 2 (i32)
- scope (wasm-expression-stack):
0: 2 (i32)
at (anonymous) (0:17):
......@@ -177,7 +177,7 @@ at wasm_B (0:49):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 2 (i32)
var0: 2 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -188,7 +188,7 @@ at wasm_B (0:51):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 2 (i32)
var0: 2 (i32)
- scope (wasm-expression-stack):
0: 2 (i32)
at (anonymous) (0:17):
......@@ -200,7 +200,7 @@ at wasm_B (0:53):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 2 (i32)
var0: 2 (i32)
- scope (wasm-expression-stack):
0: 2 (i32)
1: 1 (i32)
......@@ -213,7 +213,7 @@ at wasm_B (0:54):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 2 (i32)
var0: 2 (i32)
- scope (wasm-expression-stack):
0: 1 (i32)
at (anonymous) (0:17):
......@@ -230,7 +230,7 @@ at wasm_B (0:56):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 1 (i32)
var0: 1 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -246,7 +246,7 @@ at wasm_B (0:56):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 1 (i32)
var0: 1 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -257,7 +257,7 @@ at wasm_B (0:45):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 1 (i32)
var0: 1 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -268,7 +268,7 @@ at wasm_B (0:47):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 1 (i32)
var0: 1 (i32)
- scope (wasm-expression-stack):
0: 1 (i32)
at (anonymous) (0:17):
......@@ -280,7 +280,7 @@ at wasm_B (0:49):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 1 (i32)
var0: 1 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -291,7 +291,7 @@ at wasm_B (0:51):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 1 (i32)
var0: 1 (i32)
- scope (wasm-expression-stack):
0: 1 (i32)
at (anonymous) (0:17):
......@@ -303,7 +303,7 @@ at wasm_B (0:53):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 1 (i32)
var0: 1 (i32)
- scope (wasm-expression-stack):
0: 1 (i32)
1: 1 (i32)
......@@ -316,7 +316,7 @@ at wasm_B (0:54):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 1 (i32)
var0: 1 (i32)
- scope (wasm-expression-stack):
0: 0 (i32)
at (anonymous) (0:17):
......@@ -333,7 +333,7 @@ at wasm_B (0:56):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 0 (i32)
var0: 0 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -349,7 +349,7 @@ at wasm_B (0:56):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 0 (i32)
var0: 0 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -360,7 +360,7 @@ at wasm_B (0:45):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 0 (i32)
var0: 0 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......@@ -371,7 +371,7 @@ at wasm_B (0:47):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 0 (i32)
var0: 0 (i32)
- scope (wasm-expression-stack):
0: 0 (i32)
at (anonymous) (0:17):
......@@ -383,7 +383,7 @@ at wasm_B (0:61):
- scope (module):
instance: exports: "main" (Function)
- scope (local):
locals: "var0": 0 (i32)
var0: 0 (i32)
- scope (wasm-expression-stack):
at (anonymous) (0:17):
-- skipped
......
......@@ -5,7 +5,11 @@ Paused at:
--- 0 ---
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d
scope at div (0:46):
locals: "a": 1, "b": 0, "unused": 4711, "local_zero": 0, "local_const_11": 11
a: 1
b: 0
unused: 4711
local_zero: 0
local_const_11: 11
--- 1 ---
try {
instance.exports.#div(1, 0, 4711); // traps (div by zero)
......@@ -31,7 +35,11 @@ Paused at:
--- 0 ---
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d
scope at div (0:46):
locals: "a": -2147483648, "b": -1, "unused": 4711, "local_zero": 0, "local_const_11": 11
a: -2147483648
b: -1
unused: 4711
local_zero: 0
local_const_11: 11
--- 1 ---
try {
instance.exports.#div(0x80000000, -1, 4711); // traps (unrepresentable)
......
......@@ -92,11 +92,7 @@ async function printLocalScope(frame) {
let properties = await Protocol.Runtime.getProperties(
{'objectId': scope.object.objectId});
for (let value of properties.result.result) {
let msg = await Protocol.Runtime.getProperties(
{objectId: value.value.objectId});
let prop_str = p => `"${p.name}": ${p.value.value}`;
let value_str = msg.result.result.map(prop_str).join(', ');
InspectorTest.log(` ${value.name}: ${value_str}`);
InspectorTest.log(` ${value.name}: ${value.value.value}`);
}
}
}
......@@ -12,7 +12,7 @@ at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{"0":1024}
at (anonymous) (0:17):
......@@ -24,14 +24,14 @@ at wasm_A (0:39):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1024}
{"var0":1024}
- scope (wasm-expression-stack):
{}
at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -43,14 +43,14 @@ at wasm_A (0:40):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1024}
{"var0":1024}
- scope (wasm-expression-stack):
{}
at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -62,7 +62,7 @@ at wasm_B (0:62):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -74,7 +74,7 @@ at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":2}
{"var0":2}
- scope (wasm-expression-stack):
{"0":1024}
at (anonymous) (0:17):
......@@ -86,7 +86,7 @@ at wasm_B (0:62):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":2}
{"var0":2}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -98,7 +98,7 @@ at wasm_B (0:46):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":2}
{"var0":2}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -110,7 +110,7 @@ at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":1024}
at (anonymous) (0:17):
......@@ -122,14 +122,14 @@ at wasm_A (0:39):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1024}
{"var0":1024}
- scope (wasm-expression-stack):
{}
at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -141,7 +141,7 @@ at wasm_B (0:62):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -153,7 +153,7 @@ at wasm_B (0:46):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -165,7 +165,7 @@ at wasm_B (0:48):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":1}
at (anonymous) (0:17):
......@@ -177,7 +177,7 @@ at wasm_B (0:50):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -189,7 +189,7 @@ at wasm_B (0:52):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":1}
at (anonymous) (0:17):
......@@ -201,7 +201,7 @@ at wasm_B (0:54):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":1,"1":1}
at (anonymous) (0:17):
......@@ -213,7 +213,7 @@ at wasm_B (0:55):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":0}
at (anonymous) (0:17):
......@@ -225,7 +225,7 @@ at wasm_B (0:57):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -237,7 +237,7 @@ at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{"0":1024}
at (anonymous) (0:17):
......@@ -249,14 +249,14 @@ at wasm_A (0:39):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1024}
{"var0":1024}
- scope (wasm-expression-stack):
{}
at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -268,14 +268,14 @@ at wasm_A (0:40):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1024}
{"var0":1024}
- scope (wasm-expression-stack):
{}
at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -287,14 +287,14 @@ at wasm_A (0:41):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1024}
{"var0":1024}
- scope (wasm-expression-stack):
{}
at wasm_B (0:60):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -306,7 +306,7 @@ at wasm_B (0:62):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......
......@@ -113,13 +113,9 @@ async function waitForPauseAndStep(stepAction) {
functionDeclaration: 'function() { return this; }',
returnByValue: true
});
if (scope.type === 'local') {
InspectorTest.log(` locals: ${JSON.stringify(value.locals)}`);
} else {
InspectorTest.log(` ${JSON.stringify(value)}`);
}
}
}
}
Protocol.Debugger[stepAction]();
}
......@@ -15,7 +15,7 @@ at wasm_B (0:54):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":4}
{"var0":4}
- scope (wasm-expression-stack):
{"0":3}
at (anonymous) (0:17):
......@@ -27,7 +27,7 @@ at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -39,13 +39,14 @@ at wasm_A (0:38):
- scope (module):
-- skipped
- scope (local):
{}
- scope (wasm-expression-stack):
{}
at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -57,13 +58,14 @@ at wasm_A (0:39):
- scope (module):
-- skipped
- scope (local):
{}
- scope (wasm-expression-stack):
{}
at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -75,7 +77,7 @@ at wasm_B (0:58):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -87,7 +89,7 @@ at wasm_B (0:54):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":3}
{"var0":3}
- scope (wasm-expression-stack):
{"0":2}
at (anonymous) (0:17):
......@@ -99,7 +101,7 @@ at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":2}
{"var0":2}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -111,7 +113,7 @@ at wasm_B (0:58):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":2}
{"var0":2}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -123,7 +125,7 @@ at wasm_B (0:54):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":2}
{"var0":2}
- scope (wasm-expression-stack):
{"0":1}
at (anonymous) (0:17):
......@@ -135,7 +137,7 @@ at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -147,13 +149,14 @@ at wasm_A (0:38):
- scope (module):
-- skipped
- scope (local):
{}
- scope (wasm-expression-stack):
{}
at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -165,7 +168,7 @@ at wasm_B (0:58):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -177,7 +180,7 @@ at wasm_B (0:45):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -189,7 +192,7 @@ at wasm_B (0:47):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":1}
at (anonymous) (0:17):
......@@ -201,7 +204,7 @@ at wasm_B (0:49):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -213,7 +216,7 @@ at wasm_B (0:51):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":1}
at (anonymous) (0:17):
......@@ -225,7 +228,7 @@ at wasm_B (0:53):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":1,"1":1}
at (anonymous) (0:17):
......@@ -237,7 +240,7 @@ at wasm_B (0:54):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":1}
{"var0":1}
- scope (wasm-expression-stack):
{"0":0}
at (anonymous) (0:17):
......@@ -249,7 +252,7 @@ at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -261,13 +264,14 @@ at wasm_A (0:38):
- scope (module):
-- skipped
- scope (local):
{}
- scope (wasm-expression-stack):
{}
at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -279,13 +283,14 @@ at wasm_A (0:39):
- scope (module):
-- skipped
- scope (local):
{}
- scope (wasm-expression-stack):
{}
at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -297,13 +302,14 @@ at wasm_A (0:40):
- scope (module):
-- skipped
- scope (local):
{}
- scope (wasm-expression-stack):
{}
at wasm_B (0:56):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......@@ -315,7 +321,7 @@ at wasm_B (0:58):
- scope (module):
-- skipped
- scope (local):
locals: {"var0":0}
{"var0":0}
- scope (wasm-expression-stack):
{}
at (anonymous) (0:17):
......
......@@ -112,14 +112,9 @@ async function waitForPauseAndStep(stepAction) {
returnByValue: true
});
if (scope.type === 'local') {
if (value.locals)
InspectorTest.log(` locals: ${JSON.stringify(value.locals)}`);
} else {
InspectorTest.log(` ${JSON.stringify(value)}`);
}
}
}
}
Protocol.Debugger[stepAction]();
}
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