Commit f41941a0 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

Use WasmValue in inspector

Convert wasm-value into internal::WasmValue, then to debug::WasmValue.
This is then copied into a CDP protocol object via a new class,
WasmValueMirror.

Bug: v8:10347
Change-Id: I5778d2cc5701caf82e4a97ac329303e510695b74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151130Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67908}
parent 4e5fabae
...@@ -10311,8 +10311,8 @@ int debug::WasmValue::value_type() { ...@@ -10311,8 +10311,8 @@ int debug::WasmValue::value_type() {
v8::Local<v8::Array> debug::WasmValue::bytes() { v8::Local<v8::Array> debug::WasmValue::bytes() {
i::Handle<i::WasmValue> obj = Utils::OpenHandle(this); i::Handle<i::WasmValue> obj = Utils::OpenHandle(this);
// Should only be called on i32, i64, f32, f64, s128. // Should only be called on i32, i64, f32, f64, s128.
DCHECK_GE(1, obj->value_type()); DCHECK_LE(1, obj->value_type());
DCHECK_LE(5, obj->value_type()); DCHECK_GE(5, obj->value_type());
i::Isolate* isolate = obj->GetIsolate(); i::Isolate* isolate = obj->GetIsolate();
i::Handle<i::Object> bytes_or_ref(obj->bytes_or_ref(), isolate); i::Handle<i::Object> bytes_or_ref(obj->bytes_or_ref(), isolate);
......
...@@ -39,6 +39,26 @@ V8InternalValueType v8InternalValueTypeFrom(v8::Local<v8::Context> context, ...@@ -39,6 +39,26 @@ V8InternalValueType v8InternalValueTypeFrom(v8::Local<v8::Context> context,
return inspectedContext->getInternalType(value.As<v8::Object>()); return inspectedContext->getInternalType(value.As<v8::Object>());
} }
template <typename ResultType>
ResultType unpackWasmValue(v8::Local<v8::Context> context,
v8::Local<v8::Array> array) {
ResultType result;
constexpr int kSize = sizeof(result);
uint8_t buffer[kSize];
for (int i = 0; i < kSize; i++) {
v8::Local<v8::Int32> i32 =
array->Get(context, i).ToLocalChecked().As<v8::Int32>();
buffer[i] = static_cast<uint8_t>(i32->Value());
}
memcpy(&result, buffer, kSize);
return result;
}
// Partial list of Wasm's ValueType, copied here to avoid including internal
// header. Using an unscoped enumeration here to allow implicit conversions from
// int. Keep in sync with ValueType::Kind in wasm/value-type.h.
enum WasmValueType { kStmt, kI32, kI64, kF32, kF64, kS128, kAnyRef };
Response toProtocolValue(v8::Local<v8::Context> context, Response toProtocolValue(v8::Local<v8::Context> context,
v8::Local<v8::Value> value, int maxDepth, v8::Local<v8::Value> value, int maxDepth,
std::unique_ptr<protocol::Value>* result) { std::unique_ptr<protocol::Value>* result) {
...@@ -128,6 +148,49 @@ Response toProtocolValue(v8::Local<v8::Context> context, ...@@ -128,6 +148,49 @@ Response toProtocolValue(v8::Local<v8::Context> context,
*result = std::move(jsonObject); *result = std::move(jsonObject);
return Response::Success(); return Response::Success();
} }
if (v8::debug::WasmValue::IsWasmValue(value)) {
auto wasmValue = value.As<v8::debug::WasmValue>();
// Convert serializable Wasm values (i32, f32, f64) into protocol values.
// Not all i64 values are representable by double, so always represent it as
// a String here.
switch (wasmValue->value_type()) {
case kI32: {
*result = protocol::FundamentalValue::create(
unpackWasmValue<int32_t>(context, wasmValue->bytes()));
break;
}
case kI64: {
*result = protocol::StringValue::create(String16::fromInteger64(
unpackWasmValue<int64_t>(context, wasmValue->bytes())));
break;
}
case kF32: {
*result = protocol::FundamentalValue::create(
unpackWasmValue<float>(context, wasmValue->bytes()));
break;
}
case kF64: {
*result = protocol::FundamentalValue::create(
unpackWasmValue<double>(context, wasmValue->bytes()));
break;
}
case kAnyRef: {
std::unique_ptr<protocol::Value> anyrefValue;
Response response =
toProtocolValue(context, wasmValue->ref(), maxDepth, &anyrefValue);
if (!response.IsSuccess()) return response;
*result = std::move(anyrefValue);
break;
}
default: {
UNIMPLEMENTED();
}
}
return Response::Success();
}
return Response::ServerError("Object couldn't be returned by value"); return Response::ServerError("Object couldn't be returned by value");
} }
...@@ -398,6 +461,112 @@ class PrimitiveValueMirror final : public ValueMirror { ...@@ -398,6 +461,112 @@ class PrimitiveValueMirror final : public ValueMirror {
String16 m_subtype; String16 m_subtype;
}; };
class WasmValueMirror final : public ValueMirror {
public:
explicit WasmValueMirror(v8::Local<v8::debug::WasmValue> value)
: m_value(value) {}
v8::Local<v8::Value> v8Value() const override { return m_value; }
Response buildRemoteObject(
v8::Local<v8::Context> context, WrapMode mode,
std::unique_ptr<RemoteObject>* result) const override {
bool serializable;
String16 descriptionValue = description(context, &serializable);
*result = RemoteObject::create()
.setType(RemoteObject::TypeEnum::Wasm)
.setSubtype(subtype())
.setDescription(descriptionValue)
.build();
if (serializable) {
std::unique_ptr<protocol::Value> protocolValue;
toProtocolValue(context, m_value, &protocolValue);
(*result)->setValue(std::move(protocolValue));
} else {
(*result)->setUnserializableValue(descriptionValue);
}
return Response::Success();
}
void buildPropertyPreview(
v8::Local<v8::Context> context, const String16& name,
std::unique_ptr<PropertyPreview>* result) const override {
bool serializable;
*result = PropertyPreview::create()
.setName(name)
.setType(RemoteObject::TypeEnum::Wasm)
.setSubtype(subtype())
.setValue(description(context, &serializable))
.build();
}
void buildEntryPreview(
v8::Local<v8::Context> context, int* nameLimit, int* indexLimit,
std::unique_ptr<ObjectPreview>* preview) const override {
bool serializable;
*preview =
ObjectPreview::create()
.setType(RemoteObject::TypeEnum::Wasm)
.setSubtype(subtype())
.setDescription(description(context, &serializable))
.setOverflow(false)
.setProperties(std::make_unique<protocol::Array<PropertyPreview>>())
.build();
}
private:
String16 subtype() const {
switch (m_value->value_type()) {
case kI32:
return RemoteObject::SubtypeEnum::I32;
case kI64:
return RemoteObject::SubtypeEnum::I64;
case kF32:
return RemoteObject::SubtypeEnum::F32;
case kF64:
return RemoteObject::SubtypeEnum::F64;
case kAnyRef:
return RemoteObject::SubtypeEnum::Anyref;
default:
UNREACHABLE();
}
}
String16 description(v8::Local<v8::Context> context,
bool* serializable) const {
*serializable = true;
switch (m_value->value_type()) {
case kI32: {
return String16::fromInteger(
unpackWasmValue<int32_t>(context, m_value->bytes()));
}
case kI64: {
*serializable = false;
return String16::fromInteger64(
unpackWasmValue<int64_t>(context, m_value->bytes()));
}
case kF32: {
return String16::fromDouble(
unpackWasmValue<float>(context, m_value->bytes()));
}
case kF64: {
return String16::fromDouble(
unpackWasmValue<double>(context, m_value->bytes()));
}
case kAnyRef: {
return descriptionForObject(context->GetIsolate(),
m_value->ref().As<v8::Object>());
}
default: {
*serializable = false;
return String16("Unknown");
}
}
}
v8::Local<v8::debug::WasmValue> m_value;
};
class NumberMirror final : public ValueMirror { class NumberMirror final : public ValueMirror {
public: public:
explicit NumberMirror(v8::Local<v8::Number> value) : m_value(value) {} explicit NumberMirror(v8::Local<v8::Number> value) : m_value(value) {}
...@@ -1603,8 +1772,7 @@ std::unique_ptr<ValueMirror> ValueMirror::create(v8::Local<v8::Context> context, ...@@ -1603,8 +1772,7 @@ std::unique_ptr<ValueMirror> ValueMirror::create(v8::Local<v8::Context> context,
return std::make_unique<SymbolMirror>(value.As<v8::Symbol>()); return std::make_unique<SymbolMirror>(value.As<v8::Symbol>());
} }
if (v8::debug::WasmValue::IsWasmValue(value)) { if (v8::debug::WasmValue::IsWasmValue(value)) {
// TODO(v8:10347) WasmValue is not created anywhere yet. return std::make_unique<WasmValueMirror>(value.As<v8::debug::WasmValue>());
UNIMPLEMENTED();
} }
auto clientSubtype = (value->IsUndefined() || value->IsObject()) auto clientSubtype = (value->IsUndefined() || value->IsObject())
? clientFor(context)->valueSubtype(value) ? clientFor(context)->valueSubtype(value)
......
...@@ -50,28 +50,43 @@ Handle<String> PrintFToOneByteString(Isolate* isolate, const char* format, ...@@ -50,28 +50,43 @@ Handle<String> PrintFToOneByteString(Isolate* isolate, const char* format,
} }
Handle<Object> WasmValueToValueObject(Isolate* isolate, WasmValue value) { Handle<Object> WasmValueToValueObject(Isolate* isolate, WasmValue value) {
Handle<ByteArray> bytes;
switch (value.type().kind()) { switch (value.type().kind()) {
case ValueType::kI32: case ValueType::kI32: {
if (Smi::IsValid(value.to<int32_t>())) int32_t val = value.to_i32();
return handle(Smi::FromInt(value.to<int32_t>()), isolate); bytes = isolate->factory()->NewByteArray(sizeof(val));
return PrintFToOneByteString<false>(isolate, "%d", value.to<int32_t>()); memcpy(bytes->GetDataStartAddress(), &val, sizeof(val));
break;
}
case ValueType::kI64: { case ValueType::kI64: {
int64_t i64 = value.to<int64_t>(); int64_t val = value.to_i64();
int32_t i32 = static_cast<int32_t>(i64); bytes = isolate->factory()->NewByteArray(sizeof(val));
if (i32 == i64 && Smi::IsValid(i32)) memcpy(bytes->GetDataStartAddress(), &val, sizeof(val));
return handle(Smi::FromIntptr(i32), isolate); break;
return PrintFToOneByteString<false>(isolate, "%" PRId64, i64); }
case ValueType::kF32: {
float val = value.to_f32();
bytes = isolate->factory()->NewByteArray(sizeof(val));
memcpy(bytes->GetDataStartAddress(), &val, sizeof(val));
break;
}
case ValueType::kF64: {
double val = value.to_f64();
bytes = isolate->factory()->NewByteArray(sizeof(val));
memcpy(bytes->GetDataStartAddress(), &val, sizeof(val));
break;
} }
case ValueType::kF32: case ValueType::kAnyRef: {
return isolate->factory()->NewNumber(value.to<float>()); return isolate->factory()->NewWasmValue(
case ValueType::kF64: static_cast<int32_t>(value.type().kind()), value.to_anyref());
return isolate->factory()->NewNumber(value.to<double>()); }
case ValueType::kAnyRef: default: {
return value.to_anyref();
default:
UNIMPLEMENTED(); UNIMPLEMENTED();
return isolate->factory()->undefined_value(); return isolate->factory()->undefined_value();
}
} }
return isolate->factory()->NewWasmValue(
static_cast<int32_t>(value.type().kind()), bytes);
} }
MaybeHandle<String> GetLocalNameString(Isolate* isolate, MaybeHandle<String> GetLocalNameString(Isolate* isolate,
......
...@@ -29,6 +29,11 @@ function instantiate(bytes) { ...@@ -29,6 +29,11 @@ function instantiate(bytes) {
const evalWithUrl = (code, url) => Protocol.Runtime.evaluate( const evalWithUrl = (code, url) => Protocol.Runtime.evaluate(
{'expression': code + '\n//# sourceURL=v8://test/' + url}); {'expression': code + '\n//# sourceURL=v8://test/' + url});
function getWasmValue(value) {
return typeof (value.value) === 'undefined' ? value.unserializableValue :
value.value;
}
Protocol.Debugger.onPaused(async msg => { Protocol.Debugger.onPaused(async msg => {
let loc = msg.params.callFrames[0].location; let loc = msg.params.callFrames[0].location;
let line = [`Paused at offset ${loc.columnNumber}`]; let line = [`Paused at offset ${loc.columnNumber}`];
...@@ -42,11 +47,11 @@ Protocol.Debugger.onPaused(async msg => { ...@@ -42,11 +47,11 @@ Protocol.Debugger.onPaused(async msg => {
for (var value of scope_properties.result.result) { for (var value of scope_properties.result.result) {
let msg = await Protocol.Runtime.getProperties( let msg = await Protocol.Runtime.getProperties(
{objectId: value.value.objectId}); {objectId: value.value.objectId});
let str = msg.result.result.map(elem => elem.value.value).join(', '); let str = msg.result.result.map(elem => getWasmValue(elem.value)).join(', ');
line.push(`${value.name}: [${str}]`); line.push(`${value.name}: [${str}]`);
} }
} else { } else {
let str = scope_properties.result.result.map(elem => elem.value.value).join(', '); let str = scope_properties.result.result.map(elem => getWasmValue(elem.value)).join(', ');
line.push(`${scope.type}: [${str}]`); line.push(`${scope.type}: [${str}]`);
} }
} }
......
...@@ -13,15 +13,15 @@ Script wasm://wasm/d374ef0a byte offset 69: Wasm opcode 0x41 ...@@ -13,15 +13,15 @@ Script wasm://wasm/d374ef0a byte offset 69: Wasm opcode 0x41
Scope: Scope:
at func (0:69): at func (0:69):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 4 (number), "var1": 0 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 4 (i32), "var1": 0 (i32), "i64_local": 0 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -32,16 +32,16 @@ Script wasm://wasm/d374ef0a byte offset 71: Wasm opcode 0x21 ...@@ -32,16 +32,16 @@ Script wasm://wasm/d374ef0a byte offset 71: Wasm opcode 0x21
Scope: Scope:
at func (0:71): at func (0:71):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 4 (number), "var1": 0 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 4 (i32), "var1": 0 (i32), "i64_local": 0 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 11 (number) 0: 11 (i32)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -52,15 +52,15 @@ Script wasm://wasm/d374ef0a byte offset 73: Wasm opcode 0x41 ...@@ -52,15 +52,15 @@ Script wasm://wasm/d374ef0a byte offset 73: Wasm opcode 0x41
Scope: Scope:
at func (0:73): at func (0:73):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 0 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 0 (i32), "i64_local": 0 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -71,16 +71,16 @@ Script wasm://wasm/d374ef0a byte offset 75: Wasm opcode 0x21 ...@@ -71,16 +71,16 @@ Script wasm://wasm/d374ef0a byte offset 75: Wasm opcode 0x21
Scope: Scope:
at func (0:75): at func (0:75):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 0 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 0 (i32), "i64_local": 0 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 47 (number) 0: 47 (i32)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -91,15 +91,15 @@ Script wasm://wasm/d374ef0a byte offset 77: Wasm opcode 0x42 ...@@ -91,15 +91,15 @@ Script wasm://wasm/d374ef0a byte offset 77: Wasm opcode 0x42
Scope: Scope:
at func (0:77): at func (0:77):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": 0 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -110,16 +110,16 @@ Script wasm://wasm/d374ef0a byte offset 88: Wasm opcode 0x21 ...@@ -110,16 +110,16 @@ Script wasm://wasm/d374ef0a byte offset 88: Wasm opcode 0x21
Scope: Scope:
at func (0:88): at func (0:88):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": 0 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 9223372036854775807 (string) 0: 9223372036854775807 (i64)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -130,15 +130,15 @@ Script wasm://wasm/d374ef0a byte offset 90: Wasm opcode 0x42 ...@@ -130,15 +130,15 @@ Script wasm://wasm/d374ef0a byte offset 90: Wasm opcode 0x42
Scope: Scope:
at func (0:90): at func (0:90):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": 9223372036854775807 (string), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": 9223372036854775807 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -149,16 +149,16 @@ Script wasm://wasm/d374ef0a byte offset 101: Wasm opcode 0x21 ...@@ -149,16 +149,16 @@ Script wasm://wasm/d374ef0a byte offset 101: Wasm opcode 0x21
Scope: Scope:
at func (0:101): at func (0:101):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": 9223372036854775807 (string), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": 9223372036854775807 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: -9223372036854775808 (string) 0: -9223372036854775808 (i64)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -169,15 +169,15 @@ Script wasm://wasm/d374ef0a byte offset 103: Wasm opcode 0x41 ...@@ -169,15 +169,15 @@ Script wasm://wasm/d374ef0a byte offset 103: Wasm opcode 0x41
Scope: Scope:
at func (0:103): at func (0:103):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -188,16 +188,16 @@ Script wasm://wasm/d374ef0a byte offset 105: Wasm opcode 0xb8 ...@@ -188,16 +188,16 @@ Script wasm://wasm/d374ef0a byte offset 105: Wasm opcode 0xb8
Scope: Scope:
at func (0:105): at func (0:105):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 1 (number) 0: 1 (i32)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -208,16 +208,16 @@ Script wasm://wasm/d374ef0a byte offset 106: Wasm opcode 0x41 ...@@ -208,16 +208,16 @@ Script wasm://wasm/d374ef0a byte offset 106: Wasm opcode 0x41
Scope: Scope:
at func (0:106): at func (0:106):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 1 (number) 0: 1 (f64)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -228,17 +228,17 @@ Script wasm://wasm/d374ef0a byte offset 108: Wasm opcode 0xb8 ...@@ -228,17 +228,17 @@ Script wasm://wasm/d374ef0a byte offset 108: Wasm opcode 0xb8
Scope: Scope:
at func (0:108): at func (0:108):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 1 (number) 0: 1 (f64)
1: 7 (number) 1: 7 (i32)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -249,17 +249,17 @@ Script wasm://wasm/d374ef0a byte offset 109: Wasm opcode 0xa3 ...@@ -249,17 +249,17 @@ Script wasm://wasm/d374ef0a byte offset 109: Wasm opcode 0xa3
Scope: Scope:
at func (0:109): at func (0:109):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 1 (number) 0: 1 (f64)
1: 7 (number) 1: 7 (f64)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -270,16 +270,16 @@ Script wasm://wasm/d374ef0a byte offset 110: Wasm opcode 0x21 ...@@ -270,16 +270,16 @@ Script wasm://wasm/d374ef0a byte offset 110: Wasm opcode 0x21
Scope: Scope:
at func (0:110): at func (0:110):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 0.14285714285714285 (number) 0: 0.14285714285714285 (f64)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -290,15 +290,15 @@ Script wasm://wasm/d374ef0a byte offset 112: Wasm opcode 0x41 ...@@ -290,15 +290,15 @@ Script wasm://wasm/d374ef0a byte offset 112: Wasm opcode 0x41
Scope: Scope:
at func (0:112): at func (0:112):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0.14285714285714285 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0.14285714285714285 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -309,16 +309,16 @@ Script wasm://wasm/d374ef0a byte offset 114: Wasm opcode 0x24 ...@@ -309,16 +309,16 @@ Script wasm://wasm/d374ef0a byte offset 114: Wasm opcode 0x24
Scope: Scope:
at func (0:114): at func (0:114):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0.14285714285714285 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0.14285714285714285 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 15 (number) 0: 15 (i32)
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -329,15 +329,15 @@ Script wasm://wasm/d374ef0a byte offset 116: Wasm opcode 0x0b ...@@ -329,15 +329,15 @@ Script wasm://wasm/d374ef0a byte offset 116: Wasm opcode 0x0b
Scope: Scope:
at func (0:116): at func (0:116):
- scope (module): - scope (module):
globals: "global0": 15 (number) globals: "global0": 15 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0.14285714285714285 (number) locals: "0": 0 (f64), "i32Arg": 11 (i32), "var1": 47 (i32), "i64_local": -9223372036854775808 (i64), "unicode☼f64": 0.14285714285714285 (f64)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at call_func (0:58): at call_func (0:58):
- scope (module): - scope (module):
globals: "global0": 15 (number) globals: "global0": 15 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -348,9 +348,9 @@ Script wasm://wasm/d374ef0a byte offset 60: Wasm opcode 0x0b ...@@ -348,9 +348,9 @@ Script wasm://wasm/d374ef0a byte offset 60: Wasm opcode 0x0b
Scope: Scope:
at call_func (0:60): at call_func (0:60):
- scope (module): - scope (module):
globals: "global0": 15 (number) globals: "global0": 15 (i32)
- scope (local): - scope (local):
locals: "var0": 4 (number), "var1": 7.199999809265137 (number) locals: "var0": 4 (i32), "var1": 7.199999809265137 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
......
...@@ -14,23 +14,23 @@ Script wasm://wasm/c4eb034a byte offset 85: Wasm opcode 0x20 ...@@ -14,23 +14,23 @@ Script wasm://wasm/c4eb034a byte offset 85: Wasm opcode 0x20
Scope: Scope:
at C (interpreted) (0:85): at C (interpreted) (0:85):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "i32_arg": 42 (number), "i32_local": 0 (number) locals: "i32_arg": 42 (i32), "i32_local": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at B (liftoff) (0:76): at B (liftoff) (0:76):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number) locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 42 (number) 0: 42 (i32)
1: 3 (number) 1: 3 (i32)
at A (liftoff) (0:54): at A (liftoff) (0:54):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -41,24 +41,24 @@ Script wasm://wasm/c4eb034a byte offset 87: Wasm opcode 0x24 ...@@ -41,24 +41,24 @@ Script wasm://wasm/c4eb034a byte offset 87: Wasm opcode 0x24
Scope: Scope:
at C (interpreted) (0:87): at C (interpreted) (0:87):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "i32_arg": 42 (number), "i32_local": 0 (number) locals: "i32_arg": 42 (i32), "i32_local": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 42 (number) 0: 42 (i32)
at B (liftoff) (0:76): at B (liftoff) (0:76):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number) locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 42 (number) 0: 42 (i32)
1: 3 (number) 1: 3 (i32)
at A (liftoff) (0:54): at A (liftoff) (0:54):
- scope (module): - scope (module):
globals: "global0": 0 (number) globals: "global0": 0 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -69,23 +69,23 @@ Script wasm://wasm/c4eb034a byte offset 89: Wasm opcode 0x41 ...@@ -69,23 +69,23 @@ Script wasm://wasm/c4eb034a byte offset 89: Wasm opcode 0x41
Scope: Scope:
at C (interpreted) (0:89): at C (interpreted) (0:89):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "i32_arg": 42 (number), "i32_local": 0 (number) locals: "i32_arg": 42 (i32), "i32_local": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at B (liftoff) (0:76): at B (liftoff) (0:76):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number) locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 42 (number) 0: 42 (i32)
1: 3 (number) 1: 3 (i32)
at A (liftoff) (0:54): at A (liftoff) (0:54):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -96,24 +96,24 @@ Script wasm://wasm/c4eb034a byte offset 91: Wasm opcode 0x21 ...@@ -96,24 +96,24 @@ Script wasm://wasm/c4eb034a byte offset 91: Wasm opcode 0x21
Scope: Scope:
at C (interpreted) (0:91): at C (interpreted) (0:91):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "i32_arg": 42 (number), "i32_local": 0 (number) locals: "i32_arg": 42 (i32), "i32_local": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 47 (number) 0: 47 (i32)
at B (liftoff) (0:76): at B (liftoff) (0:76):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number) locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 42 (number) 0: 42 (i32)
1: 3 (number) 1: 3 (i32)
at A (liftoff) (0:54): at A (liftoff) (0:54):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -124,23 +124,23 @@ Script wasm://wasm/c4eb034a byte offset 93: Wasm opcode 0x0b ...@@ -124,23 +124,23 @@ Script wasm://wasm/c4eb034a byte offset 93: Wasm opcode 0x0b
Scope: Scope:
at C (interpreted) (0:93): at C (interpreted) (0:93):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "i32_arg": 42 (number), "i32_local": 47 (number) locals: "i32_arg": 42 (i32), "i32_local": 47 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at B (liftoff) (0:76): at B (liftoff) (0:76):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number) locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 42 (number) 0: 42 (i32)
1: 3 (number) 1: 3 (i32)
at A (liftoff) (0:54): at A (liftoff) (0:54):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -151,17 +151,17 @@ Script wasm://wasm/c4eb034a byte offset 78: Wasm opcode 0x1a ...@@ -151,17 +151,17 @@ Script wasm://wasm/c4eb034a byte offset 78: Wasm opcode 0x1a
Scope: Scope:
at B (liftoff) (0:78): at B (liftoff) (0:78):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number) locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 42 (number) 0: 42 (i32)
1: 3 (number) 1: 3 (i32)
at A (liftoff) (0:54): at A (liftoff) (0:54):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -172,16 +172,16 @@ Script wasm://wasm/c4eb034a byte offset 79: Wasm opcode 0x1a ...@@ -172,16 +172,16 @@ Script wasm://wasm/c4eb034a byte offset 79: Wasm opcode 0x1a
Scope: Scope:
at B (liftoff) (0:79): at B (liftoff) (0:79):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number) locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 42 (number) 0: 42 (i32)
at A (liftoff) (0:54): at A (liftoff) (0:54):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -192,15 +192,15 @@ Script wasm://wasm/c4eb034a byte offset 80: Wasm opcode 0x0b ...@@ -192,15 +192,15 @@ Script wasm://wasm/c4eb034a byte offset 80: Wasm opcode 0x0b
Scope: Scope:
at B (liftoff) (0:80): at B (liftoff) (0:80):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number) locals: "0": 0 (f32), "i32_arg": 42 (i32), "i32_local": 0 (i32), "f32_local": 7.199999809265137 (f32), "var5": 0 (f32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at A (liftoff) (0:54): at A (liftoff) (0:54):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
...@@ -211,9 +211,9 @@ Script wasm://wasm/c4eb034a byte offset 56: Wasm opcode 0x0b ...@@ -211,9 +211,9 @@ Script wasm://wasm/c4eb034a byte offset 56: Wasm opcode 0x0b
Scope: Scope:
at A (liftoff) (0:56): at A (liftoff) (0:56):
- scope (module): - scope (module):
globals: "global0": 42 (number) globals: "global0": 42 (i32)
- scope (local): - scope (local):
locals: "var0": 42 (number) locals: "var0": 42 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
- scope (global): - scope (global):
......
...@@ -149,11 +149,11 @@ async function getScopeValues(value) { ...@@ -149,11 +149,11 @@ async function getScopeValues(value) {
let msg = await Protocol.Runtime.getProperties({objectId: value.objectId}); let msg = await Protocol.Runtime.getProperties({objectId: value.objectId});
printIfFailure(msg); printIfFailure(msg);
const printProperty = function(elem) { const printProperty = function(elem) {
return `"${elem.name}": ${elem.value.value} (${elem.value.type})`; return `"${elem.name}": ${getWasmValue(elem.value)} (${elem.value.subtype})`;
} }
return msg.result.result.map(printProperty).join(', '); return msg.result.result.map(printProperty).join(', ');
} }
return value.value + ' (' + value.type + ')'; return getWasmValue(value) + ' (' + value.subtype + ')';
} }
async function dumpScopeProperties(message) { async function dumpScopeProperties(message) {
...@@ -163,3 +163,9 @@ async function dumpScopeProperties(message) { ...@@ -163,3 +163,9 @@ async function dumpScopeProperties(message) {
InspectorTest.log(' ' + value.name + ': ' + value_str); InspectorTest.log(' ' + value.name + ': ' + value_str);
} }
} }
function getWasmValue(wasmValue) {
return typeof (wasmValue.value) === 'undefined' ?
wasmValue.unserializableValue :
wasmValue.value;
}
...@@ -147,11 +147,11 @@ async function getScopeValues(value) { ...@@ -147,11 +147,11 @@ async function getScopeValues(value) {
let msg = await Protocol.Runtime.getProperties({objectId: value.objectId}); let msg = await Protocol.Runtime.getProperties({objectId: value.objectId});
printIfFailure(msg); printIfFailure(msg);
const printProperty = function(elem) { const printProperty = function(elem) {
return `"${elem.name}": ${elem.value.value} (${elem.value.type})`; return `"${elem.name}": ${getWasmValue(elem.value)} (${elem.value.subtype})`;
} }
return msg.result.result.map(printProperty).join(', '); return msg.result.result.map(printProperty).join(', ');
} }
return value.value + ' (' + value.type + ')'; return getWasmValue(value) + ' (' + value.subtype + ')';
} }
async function dumpScopeProperties(message) { async function dumpScopeProperties(message) {
...@@ -161,3 +161,9 @@ async function dumpScopeProperties(message) { ...@@ -161,3 +161,9 @@ async function dumpScopeProperties(message) {
InspectorTest.log(' ' + value.name + ': ' + value_str); InspectorTest.log(' ' + value.name + ': ' + value_str);
} }
} }
function getWasmValue(wasmValue) {
return typeof (wasmValue.value) === 'undefined' ?
wasmValue.unserializableValue :
wasmValue.value;
}
...@@ -13,7 +13,7 @@ at wasm_A (0:38): ...@@ -13,7 +13,7 @@ at wasm_A (0:38):
at wasm_B (0:56): at wasm_B (0:56):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 3 (number) locals: "var0": 3 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -36,7 +36,7 @@ at wasm_A (0:39): ...@@ -36,7 +36,7 @@ at wasm_A (0:39):
at wasm_B (0:56): at wasm_B (0:56):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 3 (number) locals: "var0": 3 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -46,7 +46,7 @@ Scope: ...@@ -46,7 +46,7 @@ Scope:
at wasm_B (0:45): at wasm_B (0:45):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 3 (number) locals: "var0": 3 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -56,9 +56,9 @@ Scope: ...@@ -56,9 +56,9 @@ Scope:
at wasm_B (0:47): at wasm_B (0:47):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 3 (number) locals: "var0": 3 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 3 (number) 0: 3 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -67,7 +67,7 @@ Scope: ...@@ -67,7 +67,7 @@ Scope:
at wasm_B (0:49): at wasm_B (0:49):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 3 (number) locals: "var0": 3 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -77,9 +77,9 @@ Scope: ...@@ -77,9 +77,9 @@ Scope:
at wasm_B (0:51): at wasm_B (0:51):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 3 (number) locals: "var0": 3 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 3 (number) 0: 3 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -88,10 +88,10 @@ Scope: ...@@ -88,10 +88,10 @@ Scope:
at wasm_B (0:53): at wasm_B (0:53):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 3 (number) locals: "var0": 3 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 3 (number) 0: 3 (i32)
1: 1 (number) 1: 1 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -100,9 +100,9 @@ Scope: ...@@ -100,9 +100,9 @@ Scope:
at wasm_B (0:54): at wasm_B (0:54):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 3 (number) locals: "var0": 3 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 2 (number) 0: 2 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -115,7 +115,7 @@ at wasm_A (0:38): ...@@ -115,7 +115,7 @@ at wasm_A (0:38):
at wasm_B (0:56): at wasm_B (0:56):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 2 (number) locals: "var0": 2 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -129,7 +129,7 @@ at wasm_A (0:39): ...@@ -129,7 +129,7 @@ at wasm_A (0:39):
at wasm_B (0:56): at wasm_B (0:56):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 2 (number) locals: "var0": 2 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -139,7 +139,7 @@ Scope: ...@@ -139,7 +139,7 @@ Scope:
at wasm_B (0:45): at wasm_B (0:45):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 2 (number) locals: "var0": 2 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -149,9 +149,9 @@ Scope: ...@@ -149,9 +149,9 @@ Scope:
at wasm_B (0:47): at wasm_B (0:47):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 2 (number) locals: "var0": 2 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 2 (number) 0: 2 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -160,7 +160,7 @@ Scope: ...@@ -160,7 +160,7 @@ Scope:
at wasm_B (0:49): at wasm_B (0:49):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 2 (number) locals: "var0": 2 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -170,9 +170,9 @@ Scope: ...@@ -170,9 +170,9 @@ Scope:
at wasm_B (0:51): at wasm_B (0:51):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 2 (number) locals: "var0": 2 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 2 (number) 0: 2 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -181,10 +181,10 @@ Scope: ...@@ -181,10 +181,10 @@ Scope:
at wasm_B (0:53): at wasm_B (0:53):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 2 (number) locals: "var0": 2 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 2 (number) 0: 2 (i32)
1: 1 (number) 1: 1 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -193,9 +193,9 @@ Scope: ...@@ -193,9 +193,9 @@ Scope:
at wasm_B (0:54): at wasm_B (0:54):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 2 (number) locals: "var0": 2 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 1 (number) 0: 1 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -208,7 +208,7 @@ at wasm_A (0:38): ...@@ -208,7 +208,7 @@ at wasm_A (0:38):
at wasm_B (0:56): at wasm_B (0:56):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 1 (number) locals: "var0": 1 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -222,7 +222,7 @@ at wasm_A (0:39): ...@@ -222,7 +222,7 @@ at wasm_A (0:39):
at wasm_B (0:56): at wasm_B (0:56):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 1 (number) locals: "var0": 1 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -232,7 +232,7 @@ Scope: ...@@ -232,7 +232,7 @@ Scope:
at wasm_B (0:45): at wasm_B (0:45):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 1 (number) locals: "var0": 1 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -242,9 +242,9 @@ Scope: ...@@ -242,9 +242,9 @@ Scope:
at wasm_B (0:47): at wasm_B (0:47):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 1 (number) locals: "var0": 1 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 1 (number) 0: 1 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -253,7 +253,7 @@ Scope: ...@@ -253,7 +253,7 @@ Scope:
at wasm_B (0:49): at wasm_B (0:49):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 1 (number) locals: "var0": 1 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -263,9 +263,9 @@ Scope: ...@@ -263,9 +263,9 @@ Scope:
at wasm_B (0:51): at wasm_B (0:51):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 1 (number) locals: "var0": 1 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 1 (number) 0: 1 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -274,10 +274,10 @@ Scope: ...@@ -274,10 +274,10 @@ Scope:
at wasm_B (0:53): at wasm_B (0:53):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 1 (number) locals: "var0": 1 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 1 (number) 0: 1 (i32)
1: 1 (number) 1: 1 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -286,9 +286,9 @@ Scope: ...@@ -286,9 +286,9 @@ Scope:
at wasm_B (0:54): at wasm_B (0:54):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 1 (number) locals: "var0": 1 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 0 (number) 0: 0 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -301,7 +301,7 @@ at wasm_A (0:38): ...@@ -301,7 +301,7 @@ at wasm_A (0:38):
at wasm_B (0:56): at wasm_B (0:56):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 0 (number) locals: "var0": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -315,7 +315,7 @@ at wasm_A (0:39): ...@@ -315,7 +315,7 @@ at wasm_A (0:39):
at wasm_B (0:56): at wasm_B (0:56):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 0 (number) locals: "var0": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -325,7 +325,7 @@ Scope: ...@@ -325,7 +325,7 @@ Scope:
at wasm_B (0:45): at wasm_B (0:45):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 0 (number) locals: "var0": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
...@@ -335,9 +335,9 @@ Scope: ...@@ -335,9 +335,9 @@ Scope:
at wasm_B (0:47): at wasm_B (0:47):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 0 (number) locals: "var0": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
0: 0 (number) 0: 0 (i32)
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
...@@ -346,7 +346,7 @@ Scope: ...@@ -346,7 +346,7 @@ Scope:
at wasm_B (0:61): at wasm_B (0:61):
- scope (module): - scope (module):
- scope (local): - scope (local):
locals: "var0": 0 (number) locals: "var0": 0 (i32)
- scope (wasm-expression-stack): - scope (wasm-expression-stack):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
......
...@@ -103,15 +103,20 @@ Protocol.Debugger.onPaused(async msg => { ...@@ -103,15 +103,20 @@ Protocol.Debugger.onPaused(async msg => {
Protocol.Debugger.resume(); Protocol.Debugger.resume();
}); });
function getWasmValue(value) {
return typeof (value.value) === 'undefined' ? value.unserializableValue :
value.value;
}
async function getScopeValues(value) { async function getScopeValues(value) {
if (value.type == 'object') { if (value.type == 'object') {
let msg = await Protocol.Runtime.getProperties({objectId: value.objectId}); let msg = await Protocol.Runtime.getProperties({objectId: value.objectId});
const printProperty = function(elem) { const printProperty = function(elem) {
return `"${elem.name}": ${elem.value.value} (${elem.value.type})`; return `"${elem.name}": ${getWasmValue(elem.value)} (${elem.value.subtype})`;
} }
return msg.result.result.map(printProperty).join(', '); return msg.result.result.map(printProperty).join(', ');
} }
return value.value + ' (' + value.type + ')'; return getWasmValue(value) + ' (' + value.subtype + ')';
} }
(async function test() { (async function test() {
......
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