From c8e863e851f26c5b14ba0c7b09bd077dc422d22c Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Tue, 19 Sep 2023 18:14:10 -0700 Subject: [PATCH 1/2] [test] text format: drop support for some pre-standard keywords --- test/core/renamed-keywords.wast | 82 +++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 test/core/renamed-keywords.wast diff --git a/test/core/renamed-keywords.wast b/test/core/renamed-keywords.wast new file mode 100644 index 0000000000..a90eb96d23 --- /dev/null +++ b/test/core/renamed-keywords.wast @@ -0,0 +1,82 @@ +;; Renamed in https://github.com/WebAssembly/spec/pull/720 +(assert_malformed + (module quote + "(memory 1)" + "(func (drop (current_memory)))" + ) + "unknown operator current_memory" +) + +(assert_malformed + (module quote + "(memory 1)" + "(func (drop (grow_memory (i32.const 0))))" + ) + "unknown operator grow_memory" +) + +;; Renamed in https://github.com/WebAssembly/spec/pull/926 +(assert_malformed + (module quote + "(func (local $i i32) (drop (get_local $i)))" + ) + "unknown operator get_local" +) + +(assert_malformed + (module quote + "(func (local $i i32) (set_local $i (i32.const 0)))" + ) + "unknown operator set_local" +) + +(assert_malformed + (module quote + "(func (local $i i32) (drop (tee_local $i (i32.const 0))))" + ) + "unknown operator tee_local" +) + +(assert_malformed + (module quote + "(global $g anyfunc (ref.null func))" + ) + "unknown operator anyfunc" +) + +(assert_malformed + (module quote + "(global $g i32 (i32.const 0))" + "(func (drop (get_global $g)))" + ) + "unknown operator get_global" +) + +(assert_malformed + (module quote + "(global $g (mut i32) (i32.const 0))" + "(func (set_global $g (i32.const 0)))" + ) + "unknown operator set_global" +) + +(assert_malformed + (module quote + "(func (drop (i32.wrap/i64 (i64.const 0))))" + ) + "unknown operator i32.wrap/i64" +) + +(assert_malformed + (module quote + "(func (drop (i32.trunc_s:sat/f32 (f32.const 0))))" + ) + "unknown operator i32.trunc_s:sat/f32" +) + +(assert_malformed + (module quote + "(func (drop (f32x4.convert_s/i32x4 (v128.const i64x2 0 0))))" + ) + "unknown operator f32x4.convert_s/i32x4" +) From a52bef35308df18c21caccc7ef87153016e3ce62 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Wed, 20 Sep 2023 07:49:01 -0700 Subject: [PATCH 2/2] Rename renamed-keywords.wast -> obsolete-keywords.wast --- test/core/{renamed-keywords.wast => obsolete-keywords.wast} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/core/{renamed-keywords.wast => obsolete-keywords.wast} (100%) diff --git a/test/core/renamed-keywords.wast b/test/core/obsolete-keywords.wast similarity index 100% rename from test/core/renamed-keywords.wast rename to test/core/obsolete-keywords.wast