Skip to content

Commit 010e57f

Browse files
authored
[wasm64] Fix MEMORY64=2 after #22773 (#22857)
Its a good job we kept `toIndexType` around in #22773 because it turns out it does need different semantics to `to64` after all.
1 parent 014e11b commit 010e57f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ jobs:
641641
wasm64l.test_hello_world
642642
wasm64l.test_bigswitch
643643
wasm64l.test_module_wasm_memory
644+
wasm64l.test_longjmp2_emscripten
644645
other.test_memory64_proxies
645646
other.test_failing_growth_wasm64"
646647
- upload-test-results

src/parseTools.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,8 @@ function from64Expr(x, assign = true) {
964964
}
965965

966966
function toIndexType(x) {
967-
return to64(x);
967+
if (MEMORY64 == 1) return `BigInt(${x})`;
968+
return x;
968969
}
969970

970971
function to64(x) {

0 commit comments

Comments
 (0)