From 2fbe510ad2a759e69eef5ac92a519b5607847684 Mon Sep 17 00:00:00 2001 From: "Ioanna M. Dimitriou H" Date: Mon, 10 Feb 2020 10:52:32 +0100 Subject: [PATCH 1/6] Add dependency to multi-value in the proposal text. --- proposals/Exceptions.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/proposals/Exceptions.md b/proposals/Exceptions.md index 8ce962a6..135e33b3 100644 --- a/proposals/Exceptions.md +++ b/proposals/Exceptions.md @@ -10,10 +10,15 @@ on the second proposal, which uses first-class exception types, mainly based on the reasoning that it is more expressive and also more extendible to other kinds of events. -This proposal requires the [reference types -proposal](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md) -as a prerequisite, since the [`exnref`](#the-exception-reference-data-type) type -should be represented as a subtype of `anyref`. +This proposal requires the following proposals as prerequisites. + +- The [reference types proposal](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md), + since the [`exnref`](#the-exception-reference-data-type) type should be represented as a subtype of `anyref`. + +- The [multi value proposal](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md), + since otherwise the [`br_on_exn?`](#Exception data extraction) instruction would only work with exceptions which consume one value. + Moreover, by using [multi value](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md), + the [`try` blocks](#Try and catch blocks) may use values already in the stack. --- @@ -152,7 +157,7 @@ instruction. That is, a try block is sequence of instructions having the following form: ``` -try block_type +try blocktype instruction* catch instruction* @@ -316,7 +321,7 @@ document](https://github.com/WebAssembly/spec/blob/master/document/core/instruct The following rules are added to *instructions*: ``` - try resulttype instruction* catch instruction* end | + try blocktype instruction* catch instruction* end | throw except_index | rethrow | br_on_exn label except_index @@ -487,7 +492,7 @@ throws, and rethrows as follows: | Name | Opcode | Immediates | Description | | ---- | ---- | ---- | ---- | -| `try` | `0x06` | sig : `block_type` | begins a block which can handle thrown exceptions | +| `try` | `0x06` | sig : `blocktype` | begins a block which can handle thrown exceptions | | `catch` | `0x07` | | begins the catch block of the try block | | `throw` | `0x08` | index : `varint32` | Creates an exception defined by the exception `index`and then throws it | | `rethrow` | `0x09` | | Pops the `exnref` on top of the stack and throws it | From 2b663517af10acbc7875afe2b26d46bbd0deb9d7 Mon Sep 17 00:00:00 2001 From: "Ioanna M. Dimitriou H" Date: Mon, 10 Feb 2020 10:55:02 +0100 Subject: [PATCH 2/6] Add multi-value dependency to README --- README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5f17800d..addb2d71 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,15 @@ holds a [proposal](https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md) for adding exception handling to WebAssembly. +The exception handling proposal depends on the [reference-types](https://github.com/WebAssembly/reference-types) proposal +and on the [multi-value](https://github.com/WebAssembly/multi-value) proposal. + The repository is a clone -of [WebAssembly/spec](https://github.com/WebAssembly/spec), and is rebased on the spec of its dependent proposal [WebAssembly/reference-types](https://github.com/WebAssembly/reference-types). +of [WebAssembly/spec](https://github.com/WebAssembly/spec), first rebased on the spec of its dependency [reference-types](https://github.com/WebAssembly/reference-types), and then merged with the other dependency [multi-value](https://github.com/WebAssembly/multi-value). -The remainder of the document is contents of the [README.md](https://github.com/WebAssembly/reference-types/blob/master/README.md) -document of that repository. +The remainder of the document has contents of the two README files of the dependencies: [reference-types/README.md](https://github.com/WebAssembly/reference-types/blob/master/README.md) and [multi-value/README.md](https://github.com/WebAssembly/multi-value/blob/master/README.md). -# Reference Types Proposal for WebAssembly +## Reference Types Proposal for WebAssembly [![Build Status](https://travis-ci.org/WebAssembly/reference-types.svg?branch=master)](https://travis-ci.org/WebAssembly/reference-types) @@ -24,9 +26,20 @@ It is meant for discussion, prototype specification and implementation of a prop * See the [modified spec](https://webassembly.github.io/reference-types/core/) for details. +## Multi-value Proposal for WebAssembly + +[![Build Status](https://travis-ci.org/WebAssembly/multi-value.svg?branch=master)](https://travis-ci.org/WebAssembly/multi-value) + +This repository is a clone of [github.com/WebAssembly/spec/](https://github.com/WebAssembly/spec/). +It is meant for discussion, prototype specification and implementation of a proposal to add support for returning multiple values to WebAssembly. + +* See the [overview](proposals/multi-value/Overview.md) for a summary of the proposal. + +* See the [modified spec](https://webassembly.github.io/multi-value/) for details. + Original `README` from upstream repository follows... -# spec +## spec This repository holds a prototypical reference implementation for WebAssembly, which is currently serving as the official specification. Eventually, we expect From 714d26e4c42d8463bcffcad297d1c980c161f40d Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 11 Feb 2020 09:43:42 -0800 Subject: [PATCH 3/6] Put event section before global section (#100) Addresses #98. --- proposals/Exceptions.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proposals/Exceptions.md b/proposals/Exceptions.md index 8ce962a6..f7c08f7c 100644 --- a/proposals/Exceptions.md +++ b/proposals/Exceptions.md @@ -414,10 +414,10 @@ appear immediately after the global section. ##### Event section The `event` section is the named section 'event'. For ease of validation, this -section comes after the [global -section](https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#global-section) -and before the [export -section](https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#export-section). +section comes after the [memory +section](https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#memory-section) +and before the [global +section](https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#global-section). So the list of all sections will be: | Section Name | Code | Description | @@ -427,8 +427,8 @@ So the list of all sections will be: | Function | `3` | Function declarations | | Table | `4` | Indirect function table and other tables | | Memory | `5` | Memory attributes | -| Global | `6` | Global declarations | | Event | `13` | Event declarations | +| Global | `6` | Global declarations | | Export | `7` | Exports | | Start | `8` | Start function declaration | | Element | `9` | Elements section | From c36f59304388b622fdd0567b3db280e62b655c87 Mon Sep 17 00:00:00 2001 From: "Ioanna M. Dimitriou H" Date: Mon, 10 Feb 2020 10:52:32 +0100 Subject: [PATCH 4/6] Add dependency to multi-value in the proposal text. --- proposals/Exceptions.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/proposals/Exceptions.md b/proposals/Exceptions.md index f7c08f7c..0c59c571 100644 --- a/proposals/Exceptions.md +++ b/proposals/Exceptions.md @@ -10,10 +10,15 @@ on the second proposal, which uses first-class exception types, mainly based on the reasoning that it is more expressive and also more extendible to other kinds of events. -This proposal requires the [reference types -proposal](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md) -as a prerequisite, since the [`exnref`](#the-exception-reference-data-type) type -should be represented as a subtype of `anyref`. +This proposal requires the following proposals as prerequisites. + +- The [reference types proposal](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md), + since the [`exnref`](#the-exception-reference-data-type) type should be represented as a subtype of `anyref`. + +- The [multi value proposal](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md), + since otherwise the [`br_on_exn?`](#Exception data extraction) instruction would only work with exceptions which consume one value. + Moreover, by using [multi value](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md), + the [`try` blocks](#Try and catch blocks) may use values already in the stack. --- @@ -152,7 +157,7 @@ instruction. That is, a try block is sequence of instructions having the following form: ``` -try block_type +try blocktype instruction* catch instruction* @@ -316,7 +321,7 @@ document](https://github.com/WebAssembly/spec/blob/master/document/core/instruct The following rules are added to *instructions*: ``` - try resulttype instruction* catch instruction* end | + try blocktype instruction* catch instruction* end | throw except_index | rethrow | br_on_exn label except_index @@ -487,7 +492,7 @@ throws, and rethrows as follows: | Name | Opcode | Immediates | Description | | ---- | ---- | ---- | ---- | -| `try` | `0x06` | sig : `block_type` | begins a block which can handle thrown exceptions | +| `try` | `0x06` | sig : `blocktype` | begins a block which can handle thrown exceptions | | `catch` | `0x07` | | begins the catch block of the try block | | `throw` | `0x08` | index : `varint32` | Creates an exception defined by the exception `index`and then throws it | | `rethrow` | `0x09` | | Pops the `exnref` on top of the stack and throws it | From fcf0cf9cff424cab25324765e726abf85cbcbb68 Mon Sep 17 00:00:00 2001 From: "Ioanna M. Dimitriou H" Date: Mon, 10 Feb 2020 10:55:02 +0100 Subject: [PATCH 5/6] Add multi-value dependency to README --- README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5f17800d..addb2d71 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,15 @@ holds a [proposal](https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md) for adding exception handling to WebAssembly. +The exception handling proposal depends on the [reference-types](https://github.com/WebAssembly/reference-types) proposal +and on the [multi-value](https://github.com/WebAssembly/multi-value) proposal. + The repository is a clone -of [WebAssembly/spec](https://github.com/WebAssembly/spec), and is rebased on the spec of its dependent proposal [WebAssembly/reference-types](https://github.com/WebAssembly/reference-types). +of [WebAssembly/spec](https://github.com/WebAssembly/spec), first rebased on the spec of its dependency [reference-types](https://github.com/WebAssembly/reference-types), and then merged with the other dependency [multi-value](https://github.com/WebAssembly/multi-value). -The remainder of the document is contents of the [README.md](https://github.com/WebAssembly/reference-types/blob/master/README.md) -document of that repository. +The remainder of the document has contents of the two README files of the dependencies: [reference-types/README.md](https://github.com/WebAssembly/reference-types/blob/master/README.md) and [multi-value/README.md](https://github.com/WebAssembly/multi-value/blob/master/README.md). -# Reference Types Proposal for WebAssembly +## Reference Types Proposal for WebAssembly [![Build Status](https://travis-ci.org/WebAssembly/reference-types.svg?branch=master)](https://travis-ci.org/WebAssembly/reference-types) @@ -24,9 +26,20 @@ It is meant for discussion, prototype specification and implementation of a prop * See the [modified spec](https://webassembly.github.io/reference-types/core/) for details. +## Multi-value Proposal for WebAssembly + +[![Build Status](https://travis-ci.org/WebAssembly/multi-value.svg?branch=master)](https://travis-ci.org/WebAssembly/multi-value) + +This repository is a clone of [github.com/WebAssembly/spec/](https://github.com/WebAssembly/spec/). +It is meant for discussion, prototype specification and implementation of a proposal to add support for returning multiple values to WebAssembly. + +* See the [overview](proposals/multi-value/Overview.md) for a summary of the proposal. + +* See the [modified spec](https://webassembly.github.io/multi-value/) for details. + Original `README` from upstream repository follows... -# spec +## spec This repository holds a prototypical reference implementation for WebAssembly, which is currently serving as the official specification. Eventually, we expect From f5c4f5d99b173dd75687aeab38ae1a5fed0efec2 Mon Sep 17 00:00:00 2001 From: "Ioanna M. Dimitriou H" Date: Mon, 2 Mar 2020 12:27:46 +0100 Subject: [PATCH 6/6] addressed Heejin's comments on PR#99 --- README.md | 12 ++++++------ proposals/Exceptions.md | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index addb2d71..26ff0e4c 100644 --- a/README.md +++ b/README.md @@ -15,31 +15,31 @@ of [WebAssembly/spec](https://github.com/WebAssembly/spec), first rebased on the The remainder of the document has contents of the two README files of the dependencies: [reference-types/README.md](https://github.com/WebAssembly/reference-types/blob/master/README.md) and [multi-value/README.md](https://github.com/WebAssembly/multi-value/blob/master/README.md). -## Reference Types Proposal for WebAssembly +# Reference Types Proposal for WebAssembly [![Build Status](https://travis-ci.org/WebAssembly/reference-types.svg?branch=master)](https://travis-ci.org/WebAssembly/reference-types) This repository is a clone of [github.com/WebAssembly/spec/](https://github.com/WebAssembly/spec/). It is meant for discussion, prototype specification and implementation of a proposal to add support for basic reference types to WebAssembly. -* See the [overview](proposals/reference-types/Overview.md) for a summary of the proposal. +* See the [overview](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md) for a summary of the proposal. -* See the [modified spec](https://webassembly.github.io/reference-types/core/) for details. +* See the [modified spec](https://webassembly.github.io/reference-types/) for details. -## Multi-value Proposal for WebAssembly +# Multi-value Proposal for WebAssembly [![Build Status](https://travis-ci.org/WebAssembly/multi-value.svg?branch=master)](https://travis-ci.org/WebAssembly/multi-value) This repository is a clone of [github.com/WebAssembly/spec/](https://github.com/WebAssembly/spec/). It is meant for discussion, prototype specification and implementation of a proposal to add support for returning multiple values to WebAssembly. -* See the [overview](proposals/multi-value/Overview.md) for a summary of the proposal. +* See the [overview](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md) for a summary of the proposal. * See the [modified spec](https://webassembly.github.io/multi-value/) for details. Original `README` from upstream repository follows... -## spec +# spec This repository holds a prototypical reference implementation for WebAssembly, which is currently serving as the official specification. Eventually, we expect diff --git a/proposals/Exceptions.md b/proposals/Exceptions.md index 0c59c571..0531d7ab 100644 --- a/proposals/Exceptions.md +++ b/proposals/Exceptions.md @@ -15,10 +15,10 @@ This proposal requires the following proposals as prerequisites. - The [reference types proposal](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md), since the [`exnref`](#the-exception-reference-data-type) type should be represented as a subtype of `anyref`. -- The [multi value proposal](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md), - since otherwise the [`br_on_exn?`](#Exception data extraction) instruction would only work with exceptions which consume one value. - Moreover, by using [multi value](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md), - the [`try` blocks](#Try and catch blocks) may use values already in the stack. +- The [multi-value proposal](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md), + since otherwise the [`br_on_exn`](#exception-data-extraction) instruction would only work with exceptions that contain one value. + Moreover, by using [multi-value](https://github.com/WebAssembly/multi-value/blob/master/proposals/multi-value/Overview.md), + the [`try` blocks](#try-and-catch-blocks) may use values already in the stack, and also push multiple values onto the stack. ---