aboutsummaryrefslogtreecommitdiff
path: root/Modules.md
diff options
context:
space:
mode:
authorLuke Wagner <mail@lukewagner.name>2016-11-03 08:37:25 -0500
committerGitHub <noreply@github.com>2016-11-03 08:37:25 -0500
commit97b4ec76ff6360c59669be5838bb329988f64a25 (patch)
tree5688aa448363fd88b70a20a84d6f500d60dbf2b3 /Modules.md
parent18cbacb90cd3584dd5c9aa3d392e4e55f66af6ab (diff)
downloadnanowasm-design-97b4ec76ff6360c59669be5838bb329988f64a25.tar.gz
Clarify names section indexing (#859)
* Clarify names section indexing * Fix broken link * Link start-section to Modules.md#function-index-space link * Explicate index spaces * Periods
Diffstat (limited to 'Modules.md')
-rw-r--r--Modules.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules.md b/Modules.md
index 28ef1a3..110fdc5 100644
--- a/Modules.md
+++ b/Modules.md
@@ -299,6 +299,8 @@ available before compilation begins.
The *function index space* indexes all imported and internally-defined
function definitions, assigning monotonically-increasing indices based on the
order of definition in the module (as defined by the [binary encoding](BinaryEncoding.md)).
+Thus, the index space starts at zero with the function imports (if any) followed
+by the functions defined within the module.
The function index space is used by:
@@ -309,6 +311,8 @@ The function index space is used by:
The *global index space* indexes all imported and internally-defined
global definitions, assigning monotonically-increasing indices based on the
order of definition in the module (as defined by the [binary encoding](BinaryEncoding.md)).
+Thus, the index space starts at zero with the global imports (if any) followed
+by the globals defined within the module.
The global index space is used by:
@@ -322,6 +326,8 @@ The global index space is used by:
The *linear memory index space* indexes all imported and internally-defined
linear memory definitions, assigning monotonically-increasing indices based on the
order of definition in the module (as defined by the [binary encoding](BinaryEncoding.md)).
+Thus, the index space starts at zero with the memory imports (if any) followed
+by the memories defined within the module.
The linear memory index space is only used by the
[data section](#data-section). In the MVP, there is at most one linear memory so
@@ -333,6 +339,8 @@ this index space is just a placeholder for when there can be
The *table index space* indexes all imported and internally-defined
table definitions, assigning monotonically-increasing indices based on the
order of definition in the module (as defined by the [binary encoding](BinaryEncoding.md)).
+Thus, the index space starts at zero with the table imports (if any) followed
+by the tables defined within the module.
The table index space is only used by the [elements section](#elements-section).
In the MVP, there is at most one table so this index space is just