Skip to content

Conversation

@sunfishcode
Copy link
Member

And into the "Basic opcodes" section, renumbering the remainder of the
section accordingly.

This is for the binary_0xc branch, and is one step of a broader opcode reorganization.

…686)

* Clarify that wasm may be viewed as either an AST or a stack machine.

* Reword the introductory paragraph.

* Add parens, remove "typed".
Make opcode 0x00 `unreachable`, and move `nop` to a non-zero opcode.

All-zeros is one of the more common patterns of corrupted data. This
change makes it more likely that code that is accidentally zeroed, in
whole or in part, will be noticed when executed rather than silently
running through a nop slide.

Obviously, this doesn't matter when an opcode table is present, but
if there is a default opcode table, it would presumably use the
opcodes defined here.
And into the "Basic opcodes" section, renumbering the remainder of the
section accordingly.
@kripken
Copy link
Member

kripken commented May 23, 2016

lgtm

@titzer
Copy link

titzer commented May 24, 2016

I think we should do a big one-step reorganization instead of small steps, and the reorganization needs to balance a couple of things: compressibility, extensibility, and logical consistency. In particular, some advice from the Brotli compression folks suggested that the opcodes should be organized to reduce entropy and allow the compression algorithm to do a better job.

@sunfishcode
Copy link
Member Author

If someone wants to compute a Brotli-friendly order, that's fine with me. If we wish to balance it with logical consistency, organizing the opcodes for logical consistency before we begin will simplify the process.

@rossberg
Copy link
Member

Should be subsumed by #826 now.

@jfbastien jfbastien closed this Oct 31, 2016
@sunfishcode sunfishcode deleted the select-category branch November 22, 2016 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants