Skip to content

Commit 817e635

Browse files
committed
[table64] Preserve 64-bit table flag when writing binaries
1 parent 3e33605 commit 817e635

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/wasm/wasm-binary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ void WasmBinaryWriter::writeImports() {
365365
table->max,
366366
table->hasMax(),
367367
/*shared=*/false,
368-
/*is64*/ false);
368+
table->is64());
369369
});
370370
finishSection(start);
371371
}

test/lit/table64.wast

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
2+
;; RUN: wasm-opt %s -all --roundtrip -S -o - | filecheck %s
3+
4+
5+
(module
6+
(import "env" "table" (table i64 1 funcref))
7+
)
8+
;; CHECK: (import "env" "table" (table $timport$0 i64 1 funcref))

0 commit comments

Comments
 (0)