-
Notifications
You must be signed in to change notification settings - Fork 452
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
AssertEq seems to reject any operand other than invoke or const #34
Comments
That's working as intended, and is hard-coded in the syntax, see the grammar. The only way to access a module externally is by invoking an export, so you shouldn't be able to (or need to) observe anything else in a test. |
|
Right, that's the (script) AST. The parsing rule is:
Those expressions are evaluated in an empty dummy context, so you (intentionally) don't have access to any state. IOW, constant expressions only -- this is intended as a declarative assertion about the behaviour of exported functions. |
OK, I see. So for the purposes of the ml-proto, we're acting as if each module has its own isolated heap (not the unified heap we will have post-dynamic-linking) and it's not exposed externally (unlike what will happen in embedded environments). And to do heap assertions you shove an assertion routine into the module? Awkward but reasonable, I guess. I don't like having to shove test code inside the module being tested :( |
Yes. @titzer was particularly adamant about not having a richer assertion On 29 August 2015 at 04:05, Katelyn Gadd [email protected] wrote:
|
@kg Even with dynamic linking, there will not be a single "unified heap" but, rather, explicit linking of new code into existing module instances. In ml-proto, the static-code/loaded-instance distinction is reflected by the |
The new names are: - `i32.extend8_s` - `i32.extend16_s` - `i64.extend8_s` - `i64.extend16_s` `i64.extend32_s` has also been added for consistency. See issue WebAssembly#34.
This commit fixes WebAssembly#34 by specifying that the flags field (which indicates if a segment is passive) is a `varuint32` instead of a `uint8`. It was discovered in WebAssembly#34 that the memory index located at that position today is a `varuint32`, which can be validly encoded as `0x80 0x00` in addition to `0x00` (in addition to a number of other encodings). This means that if the first field were repurposed as a single byte of flags, it would break these existing modules that work today. It's not currently known how many modules in the wild actually take advantage of such an encoding, but it's probably better to be safe than sorry! Closes WebAssembly#34
* Add missing eq_ref * Fix export index computation * Remove bogus test
* Rename LaneIdx{2,4,8,16,32} to ImmLaneIdx{2,4,8,16,32} This makes it clear everywhere that `ImmLaneIdx` is an immediate operand and also makes the nomenclature for immediate operands consistent (both `ImmByte` and `ImmLaneIdx` start with the prefix `Imm`) . See WebAssembly/simd#33 . * further clarify the representation hierarchies and immediate mode operands * memarg is an immediate mode argument * reference scalar load/stores spec * Fix typo: floating-point value to integer-value * Fix memarg * Fix language in replace value * Update "hierarchy" of types paragraph
doc(explainer) Fix a typo
[spec] fixed resultype typo in configuration validity
Merge with WebAssembly/main and wasm-3.0 branch.
…4.13 (#1481) (#34) Co-authored-by: Andreas Rossberg <[email protected]>
I can't figure out why it does this, but
asserteq
produces a syntax error if its operands are anything other thaninvoke
orconst
.loads
/loadu
definitely don't work.The text was updated successfully, but these errors were encountered: