Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

[test] Fix table index encoding #154

Merged
merged 1 commit into from Oct 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/core/binary-leb128.wast
Expand Up @@ -33,9 +33,10 @@
"\00asm" "\01\00\00\00"
"\04\04\01" ;; Table section with 1 entry
"\70\00\00" ;; no max, minimum 0, funcref
"\09\07\01" ;; Element section with 1 entry
"\09\09\01" ;; Element section with 1 entry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so that we're clear: this is doing the 2nd alternative

or at least making an explicit decision about this backward-incompatible binary representation change and removing (?) corresponding tests

from my issue description, right?

Because this changes the test itself rather than the spec, it basically acknowledges that new layout is a breaking change, but we think it's fine and won't break anything in the wild?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gahaas @binji Ping. Was there any resolution here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this change was already made in WebAssembly/reference-types#95, it makes sense to do the same here.

"\02" ;; Element with explicit table index
"\80\00" ;; Table index 0, encoded with 2 bytes
"\41\00\0b\00" ;; (i32.const 0) with no elements
"\41\00\0b\00\00" ;; (i32.const 0) with no elements
)
(module binary
"\00asm" "\01\00\00\00"
Expand Down