From 12584ad4f3a493ba8007b8d8be01d67e83881882 Mon Sep 17 00:00:00 2001 From: Michael Holman Date: Thu, 18 Feb 2016 21:45:12 -0800 Subject: [PATCH] clarify that indirect calls cannot call imports To help engines optimize calls, we should know ahead of time whether call is to import or not (e.g. to avoid needing intermediate thunk for boxing). --- BinaryEncoding.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BinaryEncoding.md b/BinaryEncoding.md index bfdbe30a..86535460 100644 --- a/BinaryEncoding.md +++ b/BinaryEncoding.md @@ -131,7 +131,7 @@ must contain a function body. Imported and exported functions must have a name. | body | `bytes` | `flags[0] == 0` | function body | ### Data Segments section -The data segemnts section declares the initialized data that should be loaded into the linear memory. +The data segments section declares the initialized data that should be loaded into the linear memory. A module may only contain one data segments section. | Field | Type | Description | @@ -151,6 +151,7 @@ A module may only contain one data segments section. The indirect function table section declares the size and entries of the indirect function table, which consist of indexes into the [Functions](#functions-section) section. This section must be preceded by a [Functions](#functions-section) section. +Entries must be non-imported functions. | Field | Type | Description | | ----- | ----- | ----- |