File: tables.wast

package info (click to toggle)
binaryen 120-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 41,284 kB
  • sloc: cpp: 189,449; javascript: 62,189; ansic: 14,087; python: 5,379; pascal: 441; sh: 77; makefile: 30; asm: 27
file content (46 lines) | stat: -rw-r--r-- 971 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
(module
  (import "env" "table" (table $table 7 funcref))

  (elem (i32.const 1) $table.get)

  (func $table.get (export "table.get") (result funcref)
    (table.get $table
      (i32.const 1)
    )
  )

  (func $table.set (export "table.set")
    (table.set $table
      (i32.const 1)
      (ref.func $table.set)
    )
  )

  (func $table.size (export "table.size") (result i32)
    (table.size $table)
  )

  (func $table.grow (export "table.grow") (result i32)
    (table.grow $table
      (ref.func $table.grow)
      (i32.const 42)
    )
  )

  (func $table.fill (export "table.fill") (param $dest i32) (param $value funcref) (param $size i32)
    (table.fill $table
      (local.get $dest)
      (local.get $value)
      (local.get $size)
    )
  )

  (func $table.copy (export "table.copy") (param $dest i32) (param $source i32) (param $size i32)
    (table.copy $table $table
      (local.get $dest)
      (local.get $source)
      (local.get $size)
    )
  )
)