aboutsummaryrefslogtreecommitdiff
path: root/BinaryEncoding.md
Commit message (Collapse)AuthorAgeFilesLines
* BinaryEncoding.md: Fix formattingmainXavier Del Campo Romero2025-11-131-1/+1
|
* BinaryEncoding.c: Define nw_lo count as uint32Xavier Del Campo Romero2025-11-131-1/+1
| | | | | Otherwise, it would not be possible for engines to look up the offset with O(1) complexity because `count` would have a variable length.
* BinaryEncoding.md: Update definition for nw_loXavier Del Campo Romero2025-11-041-2/+9
|
* BinaryEncoding.md: Add nw_iti custom sectionXavier Del Campo Romero2025-11-041-0/+18
|
* BinaryEncoding.md: Fix typoXavier Del Campo Romero2025-11-041-2/+2
|
* Add NanoWasm extensionsXavier Del Campo Romero2025-03-101-0/+85
| | | | | | | This commit introduces third-party extensions to the MVP, branded as "NanoWasm", that aim to reduce memory consumption and computational time for resource-constrained environments, at the expense of increased module file size.
* Update BinaryEncoding.md (#1199)SpyderTL2024-02-221-1/+1
| | | Clarify description of function_body length field.
* Define non-trapping float-to-int conversions. (#1089)Dan Gohman2020-02-261-6/+22
| | | | | | | | | | | | | | | | | | | * Define non-trapping float-to-int conversions. This also introduces the concept of prefix bytes, and defines the "numeric" prefix byte, used for encodin the new conversion instructions. * Add feature markers. * Add the feature marker in more places. * Rename "numeric" to "misc". See https://github.com/WebAssembly/nontrapping-float-to-int-conversions/issues/5. * Rename opcodes. See https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
* Add links redirecting users to the formal spec (#1260)Ben Smith2019-01-231-0/+2
| | | See issue #1258.
* Updated conversion anchor links to correct id (#1223)Hans Oksendahl2018-08-031-2/+2
| | | | | These two anchor links were referencing the wrong URL. Updated `#datatype-conversions` to `#datatype-conversions-truncations-reinterpretations-promotions-and-demotions`
* Updated anchor link to reference correct id (#1222)Hans Oksendahl2018-08-031-1/+1
| | | | | This link was not resolving correctly. Changed `#control-flow-structures` to `#control-constructs-and-instructions`
* Fixup links to future features (#1157)Joseph Richey2017-11-151-3/+4
| | | | | | | | | | | | | | | | | | This link standardizes how all the other design pages will refer to future features (either in `FutureFeatures.md` or in a tracking issue). All links to these upcoming features now use references at the bottom of the doc page (as opposed to inline links or references). Note that this change makes it very easy for the doc links to be updated when a tracking issue is started. As all the references have a standard format; a simple find/replace script will get everything. This commit also makes sure that references now point to a tracking issue if one exists. Note that this means a future CL can now delete some of the unnecessary sections from `FutureFeatures.md`. The only visible change from this commit is that certain broken links are now fixed, or links pointing to a doc section now point to the correct tracking issue.
* Clarify function names subsection (#1096)Sam Clegg2017-06-191-0/+7
| | | Fixes #1094, #1076
* Improve formatting of Name section content (#1095)Sam Clegg2017-06-161-48/+53
| | | | | | | | | - Move the module name first so that subsections are described in order. - Format tables nicely where possible. - Write paragraphs at 80. - Remove trailing whitespace - wasm -> WebAssembly
* fix typos linking to old AstSemantics.md (#1083)Seth Thompson2017-05-311-2/+2
|
* Add a module name to the name section (#1055)Derek Schuff2017-05-111-0/+12
| | | | It's additional name type (with code 0) alongside function and local names.
* Add links for definitions far away (#1038)Clemens Hammacher2017-04-121-3/+3
| | | Also, replace "below" by "above" if appropriate.
* Typo: implementatin -> implementation (#1031)Juha Lindfors2017-04-041-1/+1
|
* Require import/export names to be UTF-8. (#1016)Dan Gohman2017-03-301-10/+10
| | | | | | | | | | | | | | | | | | | | | | * Require import/export names to be UTF-8. This implements the UTF-8 proposal described in https://github.com/WebAssembly/design/issues/989#issuecomment-284757788. This does not currently rename "name" to "utf8-name", because if UTF-8 is required for import/export names, there's a greater appeal to just saying that all strings are UTF-8, though this is debatable. * s/utf8/UTF-8/g * Say "UTF-8 byte sequence" rather than "UTF-8 string". This document is describing the encoded bytes, rather than the string which one gets from decoding them. Also, make the descriptions of the byte sequence length fields more precise. * Fix typo.
* Version is now 0x1 (#1006)JF Bastien2017-03-291-1/+1
| | | | | | | | * Version is now 0x1 Resolves #1005. * Drop MVP
* Clarify the flags value in resizable_limits (#1008)Ben Smith2017-03-081-1/+1
|
* Make Names section extensible (#984)Luke Wagner2017-02-161-15/+48
| | | | | | | | | | * Make Names section extensible * Fix typo * Switch name list to name map and drop mention of UTF8 * Change to
* Clarify the presence of the Name Section (#967)Mircea Trofin2017-01-301-11/+14
| | | | | | | | | | | | * Clarify the presence of the Name Section The spec was indicating that custom sections are ignored by the wasm implementation. That's not true, because we do not ignore the Name Section. Specified behavior pertinent to this section. * Incorporated feedback. * Nit (validate -> process
* Describe instruction opcode encoding scheme (#926)Luke Wagner2017-01-101-1/+12
| | | | | | * Describe instruction opcode encoding scheme * Not actually 'far' fewer
* resizable_limits flag is varuint1 for now (#895)JF Bastien2016-12-121-2/+2
| | | Same size, same meaning for now, but clearer.
* Add Module.sections (#877)Luke Wagner2016-11-291-8/+8
| | | | | | | | | | | | | | | | * Add Module.sections * Don't say 'instance' to avoid confusion * s/sections/userSections/ * Put ToString() back, for JS API regularity * Fix spelling of moduleObject * Clarify returning a copy * s/user|unknown/custom/ and in BinaryEncoding.md too
* Fix a typo and an error (#866)Christophe de Dinechin2016-11-101-1/+1
| | | | | | * Fix typo on "semantics" * Fix encoding for 'end', which should be 0x0b and not 0x0f.
* Unknown sections must be uniquely named (#855)JF Bastien2016-11-041-1/+3
| | | | | | | | | | * Unknown sections must be uniquely named This is left unspecified. Unique naming seems like the right answer. * Non-unique * Update name section
* Clarify names section indexing (#859)Luke Wagner2016-11-031-3/+4
| | | | | | | | | | | | * Clarify names section indexing * Fix broken link * Link start-section to Modules.md#function-index-space link * Explicate index spaces * Periods
* Mention block_type instead of inline_signature_type in opcode table (#852)Timo Savola2016-10-301-3/+3
|
* Merge PostMVP into FutureFeatures for clarity. (#845)Brad Nelson2016-10-301-4/+4
|
* Fix i32/i64titzer2016-10-301-1/+1
|
* Tagging future features with icon. (#839)Brad Nelson2016-10-271-12/+27
| | | Added brief item on multiple return.
* fix improperly spaced markdown blocks and typos (for formatting on website ↵Seth Thompson2016-10-261-0/+7
| | | | (#837)
* Merge binary_0xd (#836)Luke Wagner2016-10-261-220/+296
| | | | | | | | | | | | | | | | | | * Reorganise opcode space (#826) * Future-proof type opcodes (#823) * Future-proof memory instructions (#824) * Fix order of copysign (#828) * Global types can be mutable, just not when imported (#830) * Naming nit: rename `flags` to `reserved` (#832) * Bump 0xd's version to 0xd * Make it hex
* Structured stack (#813)titzer2016-10-111-10/+10
| | | | | | | | | | | | | | | | | | | | * 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
* Binary 0xc (#811)titzer2016-09-291-130/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add drop & tee_local (#711)rossberg-chromium2016-07-271-1/+3
| | | | | | | | | | | | * Add tee_local * Actually add `drop` * Use more suitable opcode * Adjust name of `current_memory` operator ...while we're here.
* Propose possible future layer 1 compression design doc. (#705)KarlSchimpf2016-06-081-0/+5
| | | | | | * Propose possible future layer 1 compression design doc. * Change sentence to explicitly state that compression is a proposal.
* Fix BinaryEncoding.md to say that the AST encoding is post-order. (#692)Derek Schuff2016-05-191-10/+10
|
* Fix typos in function bodies (#691)Liigo Zhuang2016-05-171-3/+3
|
* merge binary_0xb (#675)Luke Wagner2016-04-291-66/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Rename fields in memory section (#661)Luke Wagner2016-04-211-2/+2
| | | | | | | | * Rename fields in memory section Does not affect the spec, but I think `initial` is a better name than `minimum` since the `initial` isn't necessarily the `minimum` if, in the future, we were to add a `shrink_memory` + `minimum` (which could be <= `initial`). The PR also renames `max` to be more consistent with other names in this file. * Update BinaryEncoding.md
* Revert "[Binary 11] Update the version number to 0xB."titzer2016-04-051-2/+2
|
* Update BinaryEncoding.mdtitzer2016-04-051-2/+2
|
* Reword the magic number and version.titzer2016-04-051-2/+2
|
* This one goes to 11.titzer2016-04-051-1/+1
|
* Merge pull request #597 from WebAssembly/precise-orderingLuke Wagner2016-03-311-68/+65
|\ | | | | Define precise order of sections
| * Remove End section againLuke Wagner2016-03-141-18/+2
| |
| * Revert "Update size of smallest module"Luke Wagner2016-03-141-5/+4
| | | | | | | | This reverts commit 4c310f2c4e7e2560fa0225b0bb2cc7f4c8ab3dde.