Skip to content

Commit

Permalink
[table64] Preserve 64-bit table flag when writing binaries (WebAssemb…
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed May 20, 2024
1 parent 3e33605 commit 5999c99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/wasm/wasm-binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ void WasmBinaryWriter::writeImports() {
table->max,
table->hasMax(),
/*shared=*/false,
/*is64*/ false);
table->is64());
});
finishSection(start);
}
Expand Down
11 changes: 11 additions & 0 deletions test/lit/table64.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
;; RUN: wasm-opt %s -all --roundtrip -S -o - | filecheck %s


;; Most table64 test coverage is handled by the spec tests.
;; Here we test what the spec doesn't cover, currently just the i64 flag
;; is preserved on table imports during roundtripping.
(module
(import "env" "table" (table i64 1 funcref))
)
;; CHECK: (import "env" "table" (table $timport$0 i64 1 funcref))

0 comments on commit 5999c99

Please sign in to comment.