-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Update spectest module definition #695
Conversation
39e7c5e
to
cf859a3
Compare
Codecov Report
@@ Coverage Diff @@
## master #695 +/- ##
=======================================
Coverage 99.30% 99.30%
=======================================
Files 72 72
Lines 10312 10312
=======================================
Hits 10240 10240
Misses 72 72
Flags with carried forward coverage won't be shown. Click here to find out more.
|
test/spectests/spectests.cpp
Outdated
// https://github.com/WebAssembly/spec/blob/e3a3c12f51221daaa901691e674d7ff990029122/interpreter/host/spectest.ml#L33 | ||
// https://github.com/WebAssembly/spec/blob/f85f6e6b70fff9ee0f6ba21ebcdad2183bd67874/test/harness/sync_index.js#L79 | ||
// spectest module definition: | ||
// https://github.com/WebAssembly/spec/blob/master/interpreter/README.md#spectest-host-module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we link to a commit hash or a tag? I think it is fine probably as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to commit hash
/* wat2wasm | ||
(module | ||
(global (export "global_i32") i32 (i32.const 666)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this new ordering is dependent on? And if so do you think wabt produced the correct expected output?
If not, is this just to show it is a copy from a spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just to show correspondence to the spec. Ordering of sections in the module is strict, all members are referred by names only in spectests, and it's not even required for module to be Wasm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ordering of sections in the module is strict
The sections are strictly ordered, but the wat->wasm translator could decide how it lays out members within those, e.g. the ordering of functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well many out unit tests assume that wabt puts them in the order as defined in wat.
cf859a3
to
103f177
Compare
Spectest predefined module now has a proper spec: WebAssembly/spec#1280
There were a couple of members missing which are not used anyway, so this change is only cosmetic.