| 1 |
;; RUN: wast --assert default --snapshot tests/snapshots % |
| 2 |
|
| 3 |
;; --enable-gc |
| 4 |
|
| 5 |
(module |
| 6 |
(type $a (array i32)) |
| 7 |
(type $b (array (mut i32))) |
| 8 |
(type $c (array (mut (ref null func)))) |
| 9 |
|
| 10 |
(data $data "\\0\\1\\2\\3") |
| 11 |
(elem $elem func $func) |
| 12 |
|
| 13 |
(func $func) |
| 14 |
(func (param (ref $a) (ref $b)) |
| 15 |
i32.const 1 |
| 16 |
i32.const 1 |
| 17 |
array.new $a |
| 18 |
drop |
| 19 |
|
| 20 |
i32.const 1 |
| 21 |
array.new_default $a |
| 22 |
drop |
| 23 |
|
| 24 |
local.get 0 |
| 25 |
i32.const 1 |
| 26 |
array.get $a |
| 27 |
drop |
| 28 |
|
| 29 |
local.get 1 |
| 30 |
i32.const 2 |
| 31 |
i32.const 3 |
| 32 |
array.set $b |
| 33 |
|
| 34 |
i32.const 1 |
| 35 |
i32.const 1 |
| 36 |
array.new_fixed $a 2 |
| 37 |
drop |
| 38 |
|
| 39 |
i32.const 0 |
| 40 |
i32.const 4 |
| 41 |
array.new_data $a $data |
| 42 |
drop |
| 43 |
|
| 44 |
i32.const 0 |
| 45 |
i32.const 1 |
| 46 |
array.new_elem $c $elem |
| 47 |
drop |
| 48 |
|
| 49 |
local.get 1 |
| 50 |
i32.const 0 |
| 51 |
local.get 1 |
| 52 |
i32.const 0 |
| 53 |
i32.const 1 |
| 54 |
array.copy $b $b |
| 55 |
) |
| 56 |
) |