summaryrefslogtreecommitdiff
path: root/test/wasm2js/func_ptrs.2asm.js
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-05-29 10:35:25 -0700
committerGitHub <noreply@github.com>2024-05-29 10:35:25 -0700
commitf622b8e47c69dcbdf2666c795fb3658dc4da52af (patch)
tree27a0c58cb6b932e8251fa6dd2aa68b41f138a1a1 /test/wasm2js/func_ptrs.2asm.js
parent525f0761496c6aafea80a2d2e8cb709515eb06c5 (diff)
downloadbinaryen-f622b8e47c69dcbdf2666c795fb3658dc4da52af.tar.gz
binaryen-f622b8e47c69dcbdf2666c795fb3658dc4da52af.tar.bz2
binaryen-f622b8e47c69dcbdf2666c795fb3658dc4da52af.zip
Use new wast parser in wasm2js (#6606)
When generating assertions, traverse the `WASTScript` data structure rather than interleaving assertion parsing with emitting.
Diffstat (limited to 'test/wasm2js/func_ptrs.2asm.js')
-rw-r--r--test/wasm2js/func_ptrs.2asm.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/wasm2js/func_ptrs.2asm.js b/test/wasm2js/func_ptrs.2asm.js
index 4b7c4fd44..3e5c82e78 100644
--- a/test/wasm2js/func_ptrs.2asm.js
+++ b/test/wasm2js/func_ptrs.2asm.js
@@ -13,30 +13,30 @@ function asmFunc(imports) {
var Math_sqrt = Math.sqrt;
var spectest = imports.spectest;
var print = spectest.print_i32;
- function $3() {
+ function $2() {
return 13 | 0;
}
- function $4($0) {
+ function $3($0) {
$0 = $0 | 0;
return $0 + 1 | 0 | 0;
}
- function $5(a) {
+ function $4(a) {
a = a | 0;
return a - 2 | 0 | 0;
}
- function $6($0) {
+ function $5($0) {
$0 = $0 | 0;
print($0 | 0);
}
return {
- "one": $3,
- "two": $4,
- "three": $5,
- "four": $6
+ "one": $2,
+ "two": $3,
+ "three": $4,
+ "four": $5
};
}
@@ -79,20 +79,20 @@ function asmFunc(imports) {
return 5 | 0;
}
- function $5(i) {
+ function $0(i) {
i = i | 0;
return FUNCTION_TABLE[i | 0]() | 0 | 0;
}
- function $6(i) {
+ function $1(i) {
i = i | 0;
return FUNCTION_TABLE[i | 0]() | 0 | 0;
}
var FUNCTION_TABLE = [t1, t2, t3, u1, u2, t1, t3];
return {
- "callt": $5,
- "callu": $6
+ "callt": $0,
+ "callu": $1
};
}
@@ -120,14 +120,14 @@ function asmFunc(imports) {
return 2 | 0;
}
- function $2(i) {
+ function $0(i) {
i = i | 0;
return FUNCTION_TABLE[i | 0]() | 0 | 0;
}
var FUNCTION_TABLE = [t1, t2];
return {
- "callt": $2
+ "callt": $0
};
}