summaryrefslogtreecommitdiff
path: root/test/passes/emit-js-wrapper=a.js.wast.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-04-06 10:08:35 -0700
committerGitHub <noreply@github.com>2021-04-06 10:08:35 -0700
commitcc0439224cfc2eabe8f8c28d782ab6b44a0f24f9 (patch)
treed44f639f2eb835ed7839e82885e8ebba212cfd84 /test/passes/emit-js-wrapper=a.js.wast.js
parentb900ed95deda68dad12b3aac7d1283f642e7a545 (diff)
downloadbinaryen-cc0439224cfc2eabe8f8c28d782ab6b44a0f24f9.tar.gz
binaryen-cc0439224cfc2eabe8f8c28d782ab6b44a0f24f9.tar.bz2
binaryen-cc0439224cfc2eabe8f8c28d782ab6b44a0f24f9.zip
Fuzzing in JS VMs: Print types when we have nothing better (#3773)
This matches #3747 which makes us not log out reference values, instead we print just their types. This also prints a type for non-reference things, replacing a previous exception, which affects things like SIMD and BigInts, but those trap anyhow at the JS boundary I believe (or did that change for SIMD?). Anyhow, printing the type won't give a false "ok" when comparing wasm2js output to the interpreter, assuming the interpreter prints out a value and not just a type (which is the case). We could try to do better, but this code is on the JS side, where we don't have the type - just a string representation of it, which we'd need to parse etc.
Diffstat (limited to 'test/passes/emit-js-wrapper=a.js.wast.js')
-rw-r--r--test/passes/emit-js-wrapper=a.js.wast.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/passes/emit-js-wrapper=a.js.wast.js b/test/passes/emit-js-wrapper=a.js.wast.js
index 60f2449b0..a3c0a22ee 100644
--- a/test/passes/emit-js-wrapper=a.js.wast.js
+++ b/test/passes/emit-js-wrapper=a.js.wast.js
@@ -30,7 +30,8 @@ function literal(x, type) {
ret += Number(x).toString();
break;
}
- default: throw 'what?';
+ // For anything else, just print the type.
+ default: ret += type; break;
}
return ret;
}