diff options
author | Thomas Lively <tlively@google.com> | 2024-07-13 19:51:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-13 16:51:59 -0700 |
commit | aec516f1259c3fec92982db92dc0e4e67ab2251a (patch) | |
tree | 6637ddd3c559f00abe373576859686e98cffe600 /test/spec | |
parent | 65ee5b95743e4ee984643923c2d88a8b320cd51d (diff) | |
download | binaryen-aec516f1259c3fec92982db92dc0e4e67ab2251a.tar.gz binaryen-aec516f1259c3fec92982db92dc0e4e67ab2251a.tar.bz2 binaryen-aec516f1259c3fec92982db92dc0e4e67ab2251a.zip |
[threads] Test that array ops work with shared nulls (#6743)
Diffstat (limited to 'test/spec')
-rw-r--r-- | test/spec/shared-array.wast | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/test/spec/shared-array.wast b/test/spec/shared-array.wast index 7aa387731..8c748fd20 100644 --- a/test/spec/shared-array.wast +++ b/test/spec/shared-array.wast @@ -73,9 +73,10 @@ (type $i8 (shared (array (mut i8)))) (type $i32 (shared (array (mut i32)))) (type $unshared (array (mut i8))) + (type $funcs (shared (array (mut (ref null (shared any)))))) (data) - (elem) + (elem (ref null (shared any))) (func (array.new $i8 (i32.const 0) (i32.const 0)) (drop)) @@ -110,6 +111,29 @@ (func (param (ref null $i8)) (array.init_data $i8 0 (local.get 0) (i32.const 0) (i32.const 0) (i32.const 0))) + (func (param (ref null $funcs)) + (array.init_elem $funcs 0 (local.get 0) (i32.const 0) (i32.const 0) (i32.const 0))) +) + +;; Bottom types +(module + (type $i8 (shared (array (mut i8)))) + (type $i32 (shared (array (mut i32)))) + (type $funcs (shared (array (mut (ref null (shared func)))))) + + (data) + (elem (ref null (shared any))) + + (func (array.get_s $i8 (ref.null (shared none)) (i32.const 0)) (drop)) + (func (array.get_u $i8 (ref.null (shared none)) (i32.const 0)) (drop)) + (func (array.get $i32 (ref.null (shared none)) (i32.const 0)) (drop)) + (func (array.set $i8 (ref.null (shared none)) (i32.const 0) (i32.const 0))) (func (param (ref null $i8)) - (array.init_data $i8 0 (local.get 0) (i32.const 0) (i32.const 0) (i32.const 0))) + (array.copy $i8 $i8 (ref.null (shared none)) (i32.const 0) (local.get 0) (i32.const 0) (i32.const 0))) + (func (param (ref null $i8)) + (array.copy $i8 $i8 (local.get 0) (i32.const 0) (ref.null (shared none)) (i32.const 0) (i32.const 0))) + (func (array.copy $i8 $i8 (ref.null (shared none)) (i32.const 0) (ref.null (shared none)) (i32.const 0) (i32.const 0))) + (func (array.fill $i8 (ref.null (shared none)) (i32.const 0) (i32.const 0) (i32.const 0))) + (func (array.init_data $i8 0 (ref.null (shared none)) (i32.const 0) (i32.const 0) (i32.const 0))) + (func (array.init_elem $funcs 0 (ref.null (shared none)) (i32.const 0) (i32.const 0) (i32.const 0))) ) |