aboutsummaryrefslogtreecommitdiff
path: root/AstSemantics.md
Commit message (Collapse)AuthorAgeFilesLines
* Structured stack (#813)titzer2016-10-111-666/+0
| | | | | | | | | | | | | | | | | | | | * Rename AstSemantics.md to Semantics.md * Rewrite Semantics for structured stack machine * Update control instructions * Update nop * More tweaks * Update README.md * Update Semantics.md * Update Semantics.md * Address @rossberg-chromium comments
* Alignment maximum (#815)JF Bastien2016-10-051-4/+5
| | | As in: https://github.com/WebAssembly/spec/issues/302 and https://github.com/WebAssembly/spec/issues/217
* Binary 0xc (#811)titzer2016-09-291-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Clarify that wasm may be viewed as either an AST or a stack machine. (#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`. (#684) 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. * BinaryEncoding.md changes implied by #682 * Fix thinko in import section * Rename definition_kind to external_kind for precision * Rename resizable_definition to resizable_limits * Add opcode delimiter to init_expr * Add Elem section to ToC and move it before Data section to reflect Table going before Memory * Add missing init_expr to global variables and undo the grouped representation of globals * Note that only immutable globals can be exported * Change the other 'mutability' flag to 'varuint1' * Give 'anyfunc' its own opcode * Add note about immutable global import requirement * Remove explicit 'default' flag; make memory/table default by default * Change (get|set)_global opcodes * Add end opcode to functions * Use section codes instead of section names (rebasing onto 0xC instead of master) This PR proposes uses section codes for known sections, which is more compact and easier to check in a decoder. It allows for user-defined sections that have string names to be encoded in the same manner as before. The scheme of using negative numbers proposed here also has the advantage of allowing a single decoder to accept the old (0xB) format and the new (0xC) format for the time being. * Use LEB for br_table (#738) * Describe operand order of call_indirect (#758) * Remove arities from call/return (#748) * Limit varint sizes in Binary Encoding. (#764) * Global section (#771) global-variable was a broken anchor and the type of count was an undefined reference and inconsistent with all the rest of the sections. * Make name section a user-string section. * Update BinaryEncoding.md * Update BinaryEncoding.md * Use positive section code byte * Remove specification of name strings for unknown sections * Update BinaryEncoding.md * Remove repetition in definition of var(u)int types (#768) * Fix typo (#781) * Move the element section before the code section (#779) * Binary format identifier is out of date (#785) * Update BinaryEncoding.md to reflect the ml-proto encoding of the memory and table sections. (#800) * Add string back * Block signatures (#765) * Replace branch arities with block and if signatures. Moving arities to blocks has the nice property of giving implementations useful information up front, however some anticipated uses of this information would really want to know the types up front too. This patch proposes replacing block arities with function signature indices, which would provide full type information about a block up front. * Remove the arity operand from br_table too. * Remove mentions of "arguments". * Make string part of the payload * Remove references to post-order AST in BinaryEncoding.md (#801) * Simplify loop by removing its exit label. This removes loop's bottom label. * Move description of `return` to correct column (#804) * type correction and missing close quote (#805) * Remove more references to AST (#806) * Remove reference to AST in JS.md Remove a reference to AST in JS.md. Note that the ml-proto spec still uses the name `Ast.Module` and has files named `ast.ml`, etc, so leaving those references intact for now. * Use "instruction" instead of "AST operator" * Update rationale for stack machine * Update Rationale.md * Update discussion of expression trees * Update MVP.md * Update Rationale.md * Update Rationale.md * Remove references to expressions * Update Rationale.md * Update Rationale.md * Address review comments * Address review comments * Address review comments * Delete h
* Reorder two sentences in Table section to better fit context; (#792)Benjamin Bouvier2016-09-131-11/+11
| | | (and remove a supplementary "the")
* Explicitly mention that WebAssembly is little-endian. (#787)Dan Gohman2016-09-051-0/+2
|
* Make NaN handling more consistent. (#772)gahaas2016-08-221-16/+11
| | | This PR makes the handling of NaNs in the promotion/demotion of floats more consistent to the handling of NaNs in arithmetic operations. Similar to #716, this PR requires that canonical NaNs have to be preserved by promotion/demotion, whereas the promotion/demotion of non-canonical NaNs can result in an arbitrary quiet NaN.
* Implement a simple NaN propagation scheme that still supports NaN boxing. (#716)Dan Gohman2016-07-271-8/+9
| | | | | | This achieves simplicity by dropping the goal of minimizing nondeterminism in the resulting NaN bits. In this proposal, NaN bits are as nondeterministic as they can be, while still supporting IEEE 754 and the basic NaN boxing use case.
* Add JS Memory and Table API, support dynamic linking (#682)Luke Wagner2016-06-281-52/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Memory, Table and multi-import/export of these * Clarify mutation of elements * Mention CFI use case * Clarify call_table signature mismatches * Explicate elements section * Change support to allow/enable * Remove table/memory indices add global imports/exports * Clarify host-defined (i.e., JavaScript) table elements * s/necessary/useful * s/will/may/ * Fix typo * Fix typo * Clarify that table updates are observed by all instances * Clarify that host-defined table element values can have different signature checking * Just 'constraints' since more detail is below * Wordsmith DynamicLinking.md intro * Wordsmith FutureFeatures.md * Try to clarify wording in FutureFeatures.md * Change 'function' to 'anyfunc' * Fix nits * Refine description of initializer expressions * Remove the Definition Index Space, use (type, index) pairs as necessary
* Make dropping of values explicit (#694)rossberg-chromium2016-06-151-12/+14
| | | | | | | | | | | Simplify Wasm and allow a more natural interpretation of Wasm as a stack machine. The main changes are: - Values can no longer be discarded implicitly. - Instead, there is an explicit drop operator. - To compensate, store operators no longer return a value. The constructs affected by this are mainly blocks and block-like sequences. Before, all expressions in a block could yield a value, and it would just be dropped on the floor implicitly (except the last one). Now we require explicit drop operations in those cases. With stores no longer returning a value, the only places were we expect drops to actually arise are calls to side-effecting functions that also return a value, but this value isn't used. (Also fixing a bunch of other out-of-date text on the way.)
* Clarify type of the immediate offset operand (#680)Lars T Hansen2016-05-041-10/+11
| | | | | | | | * Clarify type of the immediate offset operand * Refined * Updated
* Function bodies contain a list of expressions. (#674)Dan Gohman2016-04-291-1/+1
|
* merge binary_0xb (#675)Luke Wagner2016-04-291-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merge pull request #648 from WebAssembly/current_memory Add current_memory operator * Reorder section size field (#639) * Prettify section names (#638) * Extensible encoding of function signatures (#640) * Prettify section names * Restructure encoding of function signatures * Revert "[Binary 11] Update the version number to 0xB." * Leave index space for growing the number of base types * Comments addressed * clarify how export/import names convert to JS strings (#569) (#573) * When embedded in the web, clarify how export/import names convert to JS strings (#569) * Fixes suggested by @jf * Address more feedback Added a link to http://monsur.hossa.in/2012/07/20/utf-8-in-javascript.html. Simplified the decoding algorithm thanks to Luke's feedback. * Access to proprietary APIs apart from HTML5 (#656) * comments * Merge pull request #641 from WebAssembly/postorder_opcodes Postorder opcodes * fix some text that seems to be in the wrong order (#670) * Clarify that br_table has a branch argument (#664) * Add explicit argument counts (#672) * Add explicit arities * Rename * Replace uint8 with varint7 in form field (#662) This needs to be variable-length.
* Permit implementations to return canonical NaNs from arithmetic. (#660)Dan Gohman2016-04-281-21/+26
| | | | | | | | | | | | | | | | | | | * Permit implementations to return canonical NaNs from arithmetic. RISC-V and ARM in "default NaN" mode do not propagate NaN values in arithmetic operations. Instead, they return a "canonical" NaN. IEEE 754 doesn't require NaN propagation; it's merely a "should". In order to ensure that wasm doesn't accidentally over-burden support for the above and other potential future IEEE-754-conforming platforms, this patch changes the NaN rules to permit either behavior. * Add the IEEE 754 section number for the NaN propagation recommendation. * Avoid "typically". * Reword the NaN conversion rules for clarity.
* Clarify failure conditions in AstSemantics.mdLuke Wagner2016-03-311-3/+6
|
* Change max to optional and hardLuke Wagner2016-03-311-2/+6
|
* Change the argument to grow memory to be in units of pages.Douglas Crosher2016-03-101-4/+4
|
* Merge pull request #555 from WebAssembly/notDan Gohman2016-03-091-0/+1
|\ | | | | Add i32.eqz.
| * Add i32.eqz and i64.eqz.Dan Gohman2016-03-041-0/+1
| |
* | Fix one more dangling reference to `tableswitch`.Dan Gohman2016-03-071-1/+1
| |
* | Fix dangling uses of tableswitch to match renaming to br_table in #586Luke Wagner2016-03-071-5/+4
|/
* Merge pull request #462 from mbodart/rotateJF Bastien2016-02-291-0/+7
|\ | | | | Move rotate instructions from FutureFeatures to AstSemantics.
| * Move rotate instructions from FutureFeatures to AstSemantics.mbodart2015-11-121-0/+7
| |
* | Merge pull request #512 from WebAssembly/no-casesDan Gohman2016-02-261-12/+6
|\ \ | | | | | | Remove cases from `tableswitch`.
| * | Remove cases from `tableswitch`.Dan Gohman2016-01-041-12/+6
| | |
* | | Merge pull request #523 from WebAssembly/remove_has_featuretitzer2016-02-241-13/+0
|\ \ \ | | | | | | | | Remove has_feature
| * | | Remove has_featuretitzer2016-01-211-13/+0
| | | |
* | | | Fix terminology nitAndreas Rossberg2016-02-251-1/+1
| | | |
* | | | Make `grow_memory` return the old memory size.Dan Gohman2016-02-191-1/+1
| | | | | | | | | | | | | | | | This implements the discussion in bug #525.
* | | | Fix spelling errors.Dan Gohman2016-02-181-1/+1
| | | |
* | | | Initial and maximum memory size must be a multple of the page size.Douglas Crosher2016-02-111-6/+11
| | | |
* | | | Added missing bracketRaphael Isemann2016-02-101-1/+1
| | | |
* | | | Remove the comma and conditional operators.Dan Gohman2016-01-281-9/+0
| | | | | | | | | | | | | | | | | | | | Comma and conditional are no longer needed, in light of #464 removing the statement/expression distinction.
* | | | Merge pull request #489 from WebAssembly/select-operand-orderDan Gohman2016-01-271-6/+7
|\ \ \ \ | |/ / / |/| | | Reorder select's operands to put the condition last.
| * | | Specify that branch instructions' return value operands come first.Dan Gohman2016-01-171-2/+4
| | | |
| * | | Reorder select's operands to put the condition last.Dan Gohman2015-12-021-4/+3
| | | |
* | | | Capitalize titlesJF Bastien2016-01-051-3/+3
| | | |
* | | | Wording fixesJF Bastien2016-01-051-3/+3
| | | |
* | | | Address kripken's commentsJF Bastien2016-01-041-2/+2
| | | |
* | | | Clarify AST semantic's goalsJF Bastien2016-01-041-0/+5
| |/ / |/| |
* | | Make the sign bit of a new NaN value nondeterministic.Dan Gohman2015-12-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | x86 produces NaN values with the sign bit set to 1, and other architectures produce NaN values with the sign bit set to 0; wasm can model this by just making the sign bit nondeterminisitc. This should still permit the NaN-boxing technique that all this NaN bit-pattern language is intended to support.
* | | elaborate on what well-structured control flow meansAlon Zakai2015-12-031-3/+9
|/ /
* | Update AstSemantics.mdtitzer2015-11-191-1/+1
| |
* | Update AstSemantics.mdtitzer2015-11-191-0/+1
| |
* | Remove nop againtitzer2015-11-191-2/+1
| |
* | Update AstSemantics.mdtitzer2015-11-191-1/+1
| |
* | Update AstSemantics.mdtitzer2015-11-191-9/+12
| |
* | Update AstSemantics.mdtitzer2015-11-181-1/+1
| |
* | Update AstSemantics.mdtitzer2015-11-181-3/+3
| |
* | Remove the statement/expression distinction.titzer2015-11-181-31/+38
|/
* Update AstSemantics.mdBrad Nelson2015-11-101-3/+3
|