-
Notifications
You must be signed in to change notification settings - Fork 694
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
Conversation
Also, remove a broken link to the binary encoding page. The binary encoding is not yet determined, but AstSemantics.md doesn't need to reference it right now anyway.
Looks good to me, although I wonder if we could get by with the slightly more compact |
I'm ok with |
A bit more terminology nitpicking from me :) : "literal" usually refers to the textual representation of something. Again this is not really the right level to talk about these opcodes. I would rather call them constants. |
"Constant" means unchanging, which can include local variables or other things. "Literals" (or even "immediates") properly express the property that the value is being provided immediately with the instruction. |
That's "constant" as an adjective. Constant as a noun denotes a constant
value, I'd say. ;)
|
I frequently use "constant" as a noun to refer to non-immediate constants. If "literal" sounds too much like a text thing, that's why it's my second choice after "immediate" ;). |
* `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 |
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 explicitly point out that this preserve NaN sign, signal/quiet, and payload?
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.
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.
lgtm with either term. I'll suggest |
On 29 September 2015 at 21:20, JF Bastien notifications@github.com wrote:
That would of course have very confusing connotations with the major FWIW, 'constant' also is the terminology that both the JVM (ldc and |
If that wasn't clear, I was trolling FP programmers, and it looks like I hit my mark dead on :-) May I instead suggest we use |
"const" also sounds fine to me. v8-native-prototype uses internal names On Wed, Sep 30, 2015 at 5:26 PM, rossberg-chromium <notifications@github.com
|
Ok. I added a patch to this PR to use |
lgtm, though it's a bit confusion to talk about immediates in the English text, and |
The value is given in an immediate field of the |
lgtm. Thanks! |
Spell out the "literal" operators.
Also, remove a broken link to the binary encoding page. The binary
encoding is not yet determined, but AstSemantics.md doesn't need to
reference it right now anyway.
See also WebAssembly/spec#88