From bb8a6e43af9bc6b5b904a5124062b59ae06d1304 Mon Sep 17 00:00:00 2001 From: rossberg-chromium Date: Tue, 5 Apr 2016 14:14:49 +0200 Subject: [PATCH] Restructure encoding of function signatures --- BinaryEncoding.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BinaryEncoding.md b/BinaryEncoding.md index 396aae56..51588a42 100644 --- a/BinaryEncoding.md +++ b/BinaryEncoding.md @@ -119,11 +119,15 @@ The type section declares all function signatures that will be used in the modul | entries | `type_entry*` | repeated type entries as described below | #### Type entry -| Field | Type | Description | +| Field | Type/Value | Description | | ----- | ----- | ----- | +| constructor | `0x05` | the function type constructor | | param_count | `varuint32` | the number of parameters to the function | -| return_type | `value_type?` | the return type of the function, with `0` indicating no return type | | param_types | `value_type*` | the parameter types of the function | +| return_count | `uint8` | the number of results from the function (0 or 1) | +| return_type | `value_type?` | the result type of the function (if return_count is 1) | + +(Note: In the future, this section may contain other forms of type entries as well.) ### Import section