From 1d95fdc7805ef2f29b8b8b0cce8f7c8cc385edd0 Mon Sep 17 00:00:00 2001 From: Jérôme Vouillon Date: Tue, 22 Aug 2023 18:47:37 +0200 Subject: Make the legacy parser follow more closely the standard GC text format (#5889) * Allow empty `then` and `else` clauses * Allow standard syntax for `ref.test` and `ref.cast` Fixes #5795 * Allow size immediate in `array.new_fixed` Fixes #5769 --- test/lit/array-new-fixed.wast | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/lit/array-new-fixed.wast (limited to 'test/lit/array-new-fixed.wast') diff --git a/test/lit/array-new-fixed.wast b/test/lit/array-new-fixed.wast new file mode 100644 index 000000000..ef20bf5f8 --- /dev/null +++ b/test/lit/array-new-fixed.wast @@ -0,0 +1,36 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. +;; RUN: wasm-opt -all %s -S -o - | filecheck %s + +;; Check that we can optionally specify the size of the array. +(module + ;; CHECK: (type $array (array i32)) + (type $array (array i32)) + ;; CHECK: (func $test (type $none_=>_none) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (array.new_fixed $array + ;; CHECK-NEXT: (i32.const 0) + ;; CHECK-NEXT: (i32.const 1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (array.new_fixed $array + ;; CHECK-NEXT: (i32.const 0) + ;; CHECK-NEXT: (i32.const 1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $test + (drop + (array.new_fixed $array + (i32.const 0) + (i32.const 1) + ) + ) + (drop + (array.new_fixed $array 2 + (i32.const 0) + (i32.const 1) + ) + ) + ) +) -- cgit v1.2.3