summaryrefslogtreecommitdiff
path: root/test/wasm2js/refs.2asm.js.opt
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-06-21 08:30:55 -0700
committerGitHub <noreply@github.com>2024-06-21 08:30:55 -0700
commit02625158ebd0a15eaa6524fdbbc3af23497bb34f (patch)
treec9b8261ec5b71c2561ccdefa0739ed25c3d2f069 /test/wasm2js/refs.2asm.js.opt
parentc3089b3b553536ece3b1d6a9cffe82cda1b813e5 (diff)
downloadbinaryen-02625158ebd0a15eaa6524fdbbc3af23497bb34f.tar.gz
binaryen-02625158ebd0a15eaa6524fdbbc3af23497bb34f.tar.bz2
binaryen-02625158ebd0a15eaa6524fdbbc3af23497bb34f.zip
wasm2js: Fix the names of temp vars with named reference types (#6689)
We were missing code to mangle such names for JS. Without that, the name of a temp var for the type `(ref $foo)` would end up with `(`, `)` in the name, which is not valid in JS.
Diffstat (limited to 'test/wasm2js/refs.2asm.js.opt')
-rw-r--r--test/wasm2js/refs.2asm.js.opt8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/wasm2js/refs.2asm.js.opt b/test/wasm2js/refs.2asm.js.opt
index 0071a15b5..ee8c25a7c 100644
--- a/test/wasm2js/refs.2asm.js.opt
+++ b/test/wasm2js/refs.2asm.js.opt
@@ -53,6 +53,10 @@ function asmFunc(imports) {
funcref_temps(funcref_temps, 0.0);
}
+ function named_type_temps() {
+ return named_type_temps;
+ }
+
return {
"null_": null_,
"is_null": is_null,
@@ -61,7 +65,8 @@ function asmFunc(imports) {
"ref_as": ref_as,
"use_global": use_global,
"use_global_ref": use_global_ref,
- "funcref_temps": funcref_temps
+ "funcref_temps": funcref_temps,
+ "named_type_temps": named_type_temps
};
}
@@ -75,3 +80,4 @@ export var ref_as = retasmFunc.ref_as;
export var use_global = retasmFunc.use_global;
export var use_global_ref = retasmFunc.use_global_ref;
export var funcref_temps = retasmFunc.funcref_temps;
+export var named_type_temps = retasmFunc.named_type_temps;