Skip to content
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

Spell out the "literal" operators. #380

Merged
merged 4 commits into from
Oct 2, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions AstSemantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,14 @@ values.

## Literals

Each local type allows literal values directly in the AST. See the
[binary encoding section](BinaryEncoding.md#constant-pool).
These opcodes have an immediate operand of their associated type which is
copied into their result value. All possible values of all types are
supported.

* `i32.literal`: produce the value of an i32 immediate
* `i64.literal`: produce the value of an i64 immediate
* `f32.literal`: produce the value of an f32 immediate
* `f64.literal`: produce the value of an f64 immediate
Copy link
Member

Choose a reason for hiding this comment

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

Should we explicitly point out that this preserve NaN sign, signal/quiet, and payload?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds reasonable. I added a mention of NaN values of all possible bit patterns.

WebAssembly presently has no concept of signaling vs. quiet NaN, so I think it's sufficient to just say all possible bit patterns.


## Expressions with control flow

Expand Down