diff options
author | Alon Zakai <azakai@google.com> | 2024-10-18 16:14:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-18 16:14:01 -0700 |
commit | bc36c02d1a54c91d9fc4bdbffe00608929ec3169 (patch) | |
tree | f6a1276d57df68a34f0626ee7290b832ff6d6c8a /test/lit/validation/closed-world-interface-intrinsics.wast | |
parent | 679c26faec1a714eb220033254f7147ec12b8282 (diff) | |
download | binaryen-bc36c02d1a54c91d9fc4bdbffe00608929ec3169.tar.gz binaryen-bc36c02d1a54c91d9fc4bdbffe00608929ec3169.tar.bz2 binaryen-bc36c02d1a54c91d9fc4bdbffe00608929ec3169.zip |
Remove closed world validation checks (#7019)
These were added to avoid common problems with closed world mode, but
in practice they are causing more harm than good, forcing users to work
around them. In the meantime (until #6965), remove this validation to unblock
current toolchain makers.
Fix GlobalTypeOptimization and AbstractTypeRefining on issues that this
uncovers: without this validation, it is possible to run them on more wasm
files than before, hence these were not previously detected. They are
bundled in this PR because their tests cannot validate before this PR.
Diffstat (limited to 'test/lit/validation/closed-world-interface-intrinsics.wast')
-rw-r--r-- | test/lit/validation/closed-world-interface-intrinsics.wast | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/test/lit/validation/closed-world-interface-intrinsics.wast b/test/lit/validation/closed-world-interface-intrinsics.wast deleted file mode 100644 index 50151b8c0..000000000 --- a/test/lit/validation/closed-world-interface-intrinsics.wast +++ /dev/null @@ -1,46 +0,0 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. - -;; RUN: foreach %s %t wasm-opt -all --closed-world -S -o - | filecheck %s - -;; Test that we do not error on call.without.effects despite it being an import. -;; call.without.effects does not make the types in it public, and so it can -;; validate with --closed-world. - -(module - ;; CHECK: (type $struct (struct (field i32))) - (type $struct (struct i32)) - - ;; CHECK: (type $1 (func (param (ref $struct) funcref))) - - ;; CHECK: (type $2 (func)) - - ;; CHECK: (type $3 (func (param (ref $struct)))) - - ;; CHECK: (import "binaryen-intrinsics" "call.without.effects" (func $cwe (type $1) (param (ref $struct) funcref))) - (import "binaryen-intrinsics" "call.without.effects" (func $cwe (param (ref $struct)) (param funcref))) - - ;; CHECK: (elem declare func $func) - - ;; CHECK: (func $test (type $2) - ;; CHECK-NEXT: (call $cwe - ;; CHECK-NEXT: (struct.new $struct - ;; CHECK-NEXT: (i32.const 100) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (ref.func $func) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $test - (call $cwe - (struct.new $struct - (i32.const 100) - ) - (ref.func $func) - ) - ) - - ;; CHECK: (func $func (type $3) (param $ref (ref $struct)) - ;; CHECK-NEXT: (nop) - ;; CHECK-NEXT: ) - (func $func (param $ref (ref $struct)) - ) -) |