From 797f4d7d7d9d2f93f52890bf7f200c6911a0597f Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Thu, 27 Jun 2024 16:43:23 -0700 Subject: [PATCH] Remove type() method from Tag object This method mirrors the type methods on the other interfaces (Global, Memory, etc) as defined in the JS type reflection proposal (https://github.com/WebAssembly/js-types/blob/main/proposals/js-types/Overview.md) Since this proposal will be standardized first, JS types should be rebased on top of exception-handling, and this method should be moved there. --- document/js-api/index.bs | 16 ---------------- test/js-api/tag/type.tentative.any.js | 21 --------------------- 2 files changed, 37 deletions(-) delete mode 100644 test/js-api/tag/type.tentative.any.js diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 6f96f240..c10fbe21 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -1199,7 +1199,6 @@ dictionary TagType { [LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)] interface Tag { constructor(TagType type); - TagType type(); }; @@ -1244,21 +1243,6 @@ The new Tag(|type|) constructor -
- -The type() method steps are: - -1. Let |store| be the [=surrounding agent=]'s [=associated store=]. -1. Let [|parameters|] → [] be [=tag_type=](|store|, **this**.\[[Address]]). -1. Let |idlParameters| be «». -1. [=list/iterate|For each=] |type| of |parameters|, - 1. [=list/Append=] [$FromValueType$](|type|) to |idlParameters|. -1. Return «[ "{{TagType/parameters}}" → |idlParameters| ]». - -Advisement: This method is only expected to be implemented or shipped when both this proposal and the Type Reflection proposal are implemented or shipped (respectively). - -
-

Runtime exceptions

diff --git a/test/js-api/tag/type.tentative.any.js b/test/js-api/tag/type.tentative.any.js
deleted file mode 100644
index 58c96078..00000000
--- a/test/js-api/tag/type.tentative.any.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// META: global=window,dedicatedworker,jsshell,shadowrealm
-// META: script=/wasm/jsapi/assertions.js
-
-function assert_type(argument) {
-  const tag = new WebAssembly.Tag(argument);
-  const tagtype = tag.type();
-
-  assert_array_equals(tagtype.parameters, argument.parameters);
-}
-
-test(() => {
-  assert_type({ parameters: [] });
-}, "[]");
-
-test(() => {
-  assert_type({ parameters: ["i32", "i64"] });
-}, "[i32 i64]");
-
-test(() => {
-  assert_type({ parameters: ["i32", "i64", "f32", "f64"] });
-}, "[i32 i64 f32 f64]");