From 20374e5c165155fb662693d4158170b12b915a36 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 8 Feb 2022 16:27:23 -0800 Subject: [PATCH 1/4] [js-api] Few small fixes These are few small fixes or typos. Some fixes can be wrong if I'm miunderstanding something, in which case please let me know! --- document/js-api/index.bs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index b359979d..544fd17c 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -443,12 +443,11 @@ The verification of WebAssembly type requirements is deferred to the 1. Let [=external value|table=] |tableaddr| be |externval|. 1. Let |table| be [=create a Table object|a new Table object=] created from |tableaddr|. 1. Let |value| be |table|. - 1. If |externtype| is of the form [=externtype/tag=] |attribute| functype, - 1. Assert: |attribute| is [=tagtype/attribute/exception=]. + 1. If |externtype| is of the form [=externtype/tag=] |attribute| tagtype, 1. Assert: |externval| is of the form [=external value/tag=] |tagaddr|. 1. Let [=external value/tag=] |tagaddr| be |externval|. - 1. Let |exception| be [=create a Tag object|a new Tag object=] created from |tagaddr|. - 1. Let |value| be |exception|. + 1. Let |tag| be [=create a Tag object|a new Tag object=] created from |tagaddr|. + 1. Let |value| be |tag|. 1. Let |status| be ! [=CreateDataProperty=](|exportsObject|, |name|, |value|). 1. Assert: |status| is true. @@ -1101,12 +1100,12 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not 1. [=Clean up after running script=] with |relevant settings|. 1. Assert: |result|.\[[Type]] is throw or normal. 1. If |result|.\[[Type]] is throw, then: - 1. If |v| [=implements=] {{Exception}}, - 1. Let |type| be |v|.\[[Type]]. - 1. Let |payload| be |v|.\[[Payload]]. + 1. If |result| [=implements=] {{Exception}}, + 1. Let |type| be |result|.\[[Type]]. + 1. Let |payload| be |result|.\[[Payload]]. 1. Otherwise, 1. Let |type| be the [=JavaScript exception tag=]. - 1. Let |payload| be [=ToWebAssemblyValue=](|v|, [=externref=]). + 1. Let |payload| be [=ToWebAssemblyValue=](|result|.\[[Payload]], [=externref=]). 1. [=WebAssembly/Throw=] with |type| and |payload|. 1. Otherwise, return |result|.\[[Value]]. 1. Let |store| be the [=surrounding agent=]'s [=associated store=]. @@ -1198,7 +1197,7 @@ interface Tag { }; -An {{Tag}} value represents a type of exception. +A {{Tag}} value represents a type of exception.
From 37c701542912522ead340855d5037818b93e0ad6 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 11 Feb 2022 18:33:03 -0800 Subject: [PATCH 2/4] Revert attribute change --- document/js-api/index.bs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 544fd17c..4edb6710 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -443,7 +443,8 @@ The verification of WebAssembly type requirements is deferred to the 1. Let [=external value|table=] |tableaddr| be |externval|. 1. Let |table| be [=create a Table object|a new Table object=] created from |tableaddr|. 1. Let |value| be |table|. - 1. If |externtype| is of the form [=externtype/tag=] |attribute| tagtype, + 1. If |externtype| is of the form [=externtype/tag=] |attribute| functype, + 1. Assert: |attribute| is [=tagtype/attribute/exception=]. 1. Assert: |externval| is of the form [=external value/tag=] |tagaddr|. 1. Let [=external value/tag=] |tagaddr| be |externval|. 1. Let |tag| be [=create a Tag object|a new Tag object=] created from |tagaddr|. From bd8db6cf35bef4608def964530a863f903ebce5b Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 14 Feb 2022 21:45:07 -0800 Subject: [PATCH 3/4] Revert more --- document/js-api/index.bs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 4edb6710..718228aa 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -1101,12 +1101,13 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not 1. [=Clean up after running script=] with |relevant settings|. 1. Assert: |result|.\[[Type]] is throw or normal. 1. If |result|.\[[Type]] is throw, then: - 1. If |result| [=implements=] {{Exception}}, - 1. Let |type| be |result|.\[[Type]]. - 1. Let |payload| be |result|.\[[Payload]]. + 1. Let |v| be |result|.\[[Value]]. + 1. If |v| [=implements=] {{Exception}}, + 1. Let |type| be |v|.\[[Type]]. + 1. Let |payload| be |v|.\[[Payload]]. 1. Otherwise, 1. Let |type| be the [=JavaScript exception tag=]. - 1. Let |payload| be [=ToWebAssemblyValue=](|result|.\[[Payload]], [=externref=]). + 1. Let |payload| be [=ToWebAssemblyValue=](|v|.\[[Payload]], [=externref=]). 1. [=WebAssembly/Throw=] with |type| and |payload|. 1. Otherwise, return |result|.\[[Value]]. 1. Let |store| be the [=surrounding agent=]'s [=associated store=]. From 1c4364ab00946c979db3edba97e87ea19fdfb759 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 14 Feb 2022 21:47:01 -0800 Subject: [PATCH 4/4] Revert --- document/js-api/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 718228aa..1ab296af 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -1107,7 +1107,7 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not 1. Let |payload| be |v|.\[[Payload]]. 1. Otherwise, 1. Let |type| be the [=JavaScript exception tag=]. - 1. Let |payload| be [=ToWebAssemblyValue=](|v|.\[[Payload]], [=externref=]). + 1. Let |payload| be [=ToWebAssemblyValue=](|v|, [=externref=]). 1. [=WebAssembly/Throw=] with |type| and |payload|. 1. Otherwise, return |result|.\[[Value]]. 1. Let |store| be the [=surrounding agent=]'s [=associated store=].