Skip to content

Instantly share code, notes, and snippets.

@binji
Last active August 17, 2018 22:46
Show Gist options
  • Save binji/147ffc9e1a0f575024d087b91f7abf91 to your computer and use it in GitHub Desktop.
Save binji/147ffc9e1a0f575024d087b91f7abf91 to your computer and use it in GitHub Desktop.
WebAssembly spec diffs
2.4.4. Rename current_memory -> memory.size
2.4.4. Rename grow_memory -> memory.grow
2.5.10. Mutable globals may be exported
2.5.11. Clarification that import names need not be unique
3.3.4.5. Rename current_memory -> memory.size
3.3.4.6. Rename grow_memory -> memory.grow
3.3.7.2. Clarification that get_global in a constant expression can only refer to imported globals
3.4.8.5. An exported global can be mutable
3.4.9.5. An imported global can be mutable
3.4.10.
typo "For each data_i in module.data, the segment data_i must be valid"
typo "For each export_i in module.exports, the segment export_i must be valid..."
Some clarification of English spec text
4.3.2.9. typo in formal spec text. changed to "j_1 * j_2 - trunc(j_1 / j_2)"
4.3.3.6. typo in english text: "else return the result of dividing z_1 by z_2..."
4.3.3.18. fne returns 1 if either operand is NaN
4.4.1.2. typo: "unop_t"
4.4.1.3. typo: "binop_t(c_1, c_2)"
4.4.1.6. typo: "t_1.const c_1"
4.4.4.3. Rename current_memory -> memory.size
4.4.4.4. Rename grow_memory -> memory.grow
4.4.7.3. Allow host function divergence
4.5.3.2. typo: "s ⊕ { funcs funcinst }"
5.2.4. Fix utf8 encoding/decoding for 3- and 4-byte cases ("b_1 - 0xE0" and "b_1 - 0xF0", respectively)
5.4.4. Rename current_memory -> memory.size, Rename grow_memory -> memory.grow
6.5.5. Rename current_memory -> memory.size, Rename grow_memory -> memory.grow
6.3.3. typo: "c ≠ '"' ∧ c ≠ '\'"
6.6.3. typo: "{locals id(param)*} well-formed"
6.6.6.1. Clarify offset is set to 0 in abbreviation
6.6.7.1. Clarify offset is set to 0 in abbreviation
6.6.11. Move optional table index to abbreviation (6.6.11.1)
6.6.12. Move optional memory index to abbreviation (6.6.12.1)
A.1.module_exports. typo: "...equals the length of externtype'"
A.3.pop_ctrl. changed to pop ctrl stack after pop_opds (since pop_opd accesses ctrl[0])
A.3.validate. "case (if t*) pop_opd(I32) ..."
A.5. "every function invocation always evaluates to a result of the right type (if it does not trap or diverge)"
A.5."Host Function Instances". Allow for host function divergence.
Added A.6. Index of Types
Added A.7. Index of Instructions
Added A.8. Index of Semantic Rules
2.2. Added Global object cache
3."asynchronously compile a WebAssembly module". Add step 1 "Let promise be a new promise".
3."asynchronously compile a WebAssembly module". Add step 4 "Return promise".
3."compile a WebAssembly module". Change step 2 to unwrap promise.
3."instantiate a WebAssembly Module". add support for imported/exported mutable globals.
3.3. Remove note "Any attempts to detach buffer..."
3.3. Add algorithm "reset the Memory buffer", refactor `memory.grow` and `grow_memory` instruction to use this.
3.4."create a table object". Add step to fetch associated store.
3.5. Add "Globals" section, defining WebAssembly.Global type.
3.6."new Exported Function". Change step 11 to call `SetFunctionLength`.
3.6."call an Exported Function". Change step 11 to "if ret is empty..."
3.6."ToJSValue". Change step 1 to "return the Number value for signed_i32(i32)."
3.6."ToJSValue". Clarify note about NaN payloads.
1."compile a potential WebAssembly response". Change step 7: "and resolve returnValue with result".
2. Add section on WebAssembly module Serialization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment