Rename "Literals" to "Immediates" and spell out operators.#377
Rename "Literals" to "Immediates" and spell out operators.#377sunfishcode wants to merge 1 commit intomasterfrom
Conversation
"Immediate" is the more common term to use in assembly languages. 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.
|
I don't think literals are the same as immediates. An immediate in assembly language is part of a given instruction. But the literal expressions in Wasm are not part of the surrounding opcode, they are (at least logically) their own, stand-alone instructions, "loading" constants. Moreover, they may or may not be implemented with CPU instructions having the constant as an immediate (for example, a float constant may need to be loaded from memory on some architectures, I believe; some constants can also be loaded from special registers, or be produced via specific opcodes). So I disagree with this change; IMHO it is conflating abstraction levels. |
|
On Tue, Sep 29, 2015 at 12:55 PM, rossberg-chromium <
|
|
FWIW, I do think we have immediates, in the form of the integer operands to AST nodes (e.g., the index of |
|
That works for me. Immediates are things that are "part of the opcode", and we can call our "load immediate" instructions "literals" to avoid ambiguity. I submitted WebAssembly/spec#88 to implement this in the spec. |
"Immediate" is the more common term to use in assembly languages.
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.