tests/cli/table-opt-idx.wast
raw| 1 | ;; RUN: wast --assert default --snapshot tests/snapshots % |
| 2 | |
| 3 | (; table indices are optional for backwards compatibility ;) |
| 4 | (module |
| 5 | (table 1 funcref) |
| 6 | (elem $a func $f) |
| 7 | (func $f) |
| 8 | (func |
| 9 | i32.const 0 |
| 10 | table.get |
| 11 | drop) |
| 12 | (func |
| 13 | i32.const 0 |
| 14 | ref.func $f |
| 15 | table.set) |
| 16 | (func |
| 17 | table.size |
| 18 | drop) |
| 19 | (func |
| 20 | ref.func $f |
| 21 | i32.const 0 |
| 22 | table.grow |
| 23 | drop) |
| 24 | (func |
| 25 | i32.const 0 |
| 26 | ref.func $f |
| 27 | i32.const 0 |
| 28 | table.fill) |
| 29 | (func |
| 30 | i32.const 0 |
| 31 | i32.const 0 |
| 32 | i32.const 0 |
| 33 | table.copy) |
| 34 | (func |
| 35 | i32.const 0 |
| 36 | i32.const 0 |
| 37 | i32.const 0 |
| 38 | table.init $a) |
| 39 | ) |