From c7142e5a35ac75a32ce43adc78a32e264700cbd1 Mon Sep 17 00:00:00 2001 From: Douglas Crosher Date: Thu, 25 Feb 2016 22:50:25 +1100 Subject: [PATCH] Note that all unknown sections are ignored. --- BinaryEncoding.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/BinaryEncoding.md b/BinaryEncoding.md index fd5c0313..def45be1 100644 --- a/BinaryEncoding.md +++ b/BinaryEncoding.md @@ -187,14 +187,26 @@ stored to from dedicated instructions. | type | `uint8` | the type of the global, as a memory type | | exported | `uint8` | a boolean indicating whether the global variable is exported | -### WorkInProgress: WLL section +### All other sections + +These sections can occur in any order and multiple times. | Field | Type | Description | | ----- | ----- | ----- | -| id = `0x11` | `uint8` | section identifier for globals | -| size | `varuint32` | size of this section in bytes | +| id | `uint8` | section identifier | +| size | `uint32` | size of this section in bytes excluding this size | | body | `bytes` | contents of this section | +The section size is a fixed width to support back patching. + +#### Known external section IDs. + +The IDs are expected to be replaced by strings, and this table may be managed elsewhere in future. + +| Id | Description | +|----|-------------| +| 0x11 | Web Low-level Language, [WLLang/WebLL](https://wllang.com/) | + # AST Encoding Function bodies consist of a dense pre-order encoding of an [Abstract Syntax Tree](AstSemantics.md).