diff options
| author | Michael Holman <michael.holman@microsoft.com> | 2015-06-29 13:50:38 -0700 |
|---|---|---|
| committer | Michael Holman <michael.holman@microsoft.com> | 2015-06-29 13:50:38 -0700 |
| commit | f638520afb6c669442caa7d788bbcdbef300edf8 (patch) | |
| tree | 8d7664613949e2291f246b626fec08c7e4638240 /BinaryEncoding.md | |
| parent | f6625e1becab6672863034125163984f13a0c86f (diff) | |
| download | nanowasm-design-f638520afb6c669442caa7d788bbcdbef300edf8.tar.gz | |
some cleanup
Diffstat (limited to 'BinaryEncoding.md')
| -rw-r--r-- | BinaryEncoding.md | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/BinaryEncoding.md b/BinaryEncoding.md index 557664e..61fb019 100644 --- a/BinaryEncoding.md +++ b/BinaryEncoding.md @@ -65,32 +65,36 @@ Yes: ## Global structure -* A module contains: - * a header followed by - * a table (sorted by offset) containing, for each section, its type and - offset (within the module), followed by - * a sequence of sections. +* A module contains (in this order): + * A header + * A table (sorted by offset) containing, for each section: + * Section type + * Offset within the module + * A sequence of sections * A section contains: - * a header followed by - * the section contents (specific to the section type) -* A definitions section contains: - * the generic section header - * a table containing, for each opcode-space, a standardized string literal - type name (where index defines its type), offset (within the section), - sorted by offset, followed by - * a sequence of opcode tables + * A header followed by + * The section contents (specific to the section type) +* A definitions section contains (in this order): + * The generic section header + * A table (sorted by offset) containing, for each type which has opcodes: + * A standardized string literal [type name](AstSemantics.md#local-and-memory-types). + The index of a type name in this table is referred to as a type ID + * Offset of its opcode table within the section + * A sequence of opcode tables * An opcode table contains: - * a sequence of standardized string literal opcode names, where order - determines opcode index -* A code section contains: - * the generic section header - * a table containing, for each function, its signature, offset (within the - section), sorted by offset, followed by - * a sequence of functions + * A sequence of standardized string literal [opcode names](AstSemantics.md), + where order determines opcode index +* A code section contains (in this order): + * The generic section header + * A table (sorted by offset) containing, for each function: + * Signature + * Offset within the section + * A sequence of functions * A function contains: - * a table containing, for each type, how many locals are indexed by the - function body of that type - * the serialized AST + * A table containing, for each type ID that has [locals](AstSemantics.md#addressing-local-variables): + * Type ID + * Count of locals + * The serialized AST ## Serialized AST |
