diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/passes/signature-refining.wast | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/lit/passes/signature-refining.wast b/test/lit/passes/signature-refining.wast index fcffcc550..a6d4ba53f 100644 --- a/test/lit/passes/signature-refining.wast +++ b/test/lit/passes/signature-refining.wast @@ -624,3 +624,34 @@ (unreachable) ) ) + +;; Exports prevent optimization, so $func's type will not change here. +(module + ;; CHECK: (type $sig (func_subtype (param anyref) func)) + + ;; CHECK: (type $none_=>_none (func_subtype func)) + + ;; CHECK: (type $struct (struct_subtype data)) + (type $struct (struct_subtype data)) + + (type $sig (func_subtype (param anyref) func)) + + ;; CHECK: (export "prevent-opts" (func $func)) + + ;; CHECK: (func $func (type $sig) (param $x anyref) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ) + (func $func (export "prevent-opts") (type $sig) (param $x anyref) + ) + + ;; CHECK: (func $caller (type $none_=>_none) + ;; CHECK-NEXT: (call $func + ;; CHECK-NEXT: (struct.new_default $struct) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $caller + (call $func + (struct.new $struct) + ) + ) +) |