summaryrefslogtreecommitdiff
path: root/test/dylib.wasm.fromBinary
blob: ac2712beee56608f0958f004edb8bc9ea91408eb (plain)
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
47
48
49
50
(module
  (type $0 (func (param i32) (result i32)))
  (type $1 (func (result i32)))
  (type $2 (func))
  (import "env" "memoryBase" (global $import$0 i32))
  (import "env" "_puts" (func $import$1 (param i32) (result i32)))
  (import "env" "memory" (memory $0 256))
  (import "env" "table" (table 0 anyfunc))
  (import "env" "tableBase" (global $import$4 i32))
  (global $global$0 (mut i32) (i32.const 0))
  (global $global$1 (mut i32) (i32.const 0))
  (global $global$2 i32 (i32.const 0))
  (data (get_global $import$0) "hello, world!")
  (export "__post_instantiate" (func $2))
  (export "_main" (func $0))
  (export "runPostSets" (func $1))
  (export "_str" (global $global$2))
  (func $0 (type $1) (result i32)
    (block $label$0 i32
      (drop
        (call $import$1
          (get_global $import$0)
        )
      )
      (i32.const 0)
    )
  )
  (func $1 (type $2)
    (nop)
  )
  (func $2 (type $2)
    (block $label$0
      (set_global $global$0
        (i32.add
          (get_global $import$0)
          (i32.const 16)
        )
      )
      (set_global $global$1
        (i32.add
          (get_global $global$0)
          (i32.const 5242880)
        )
      )
      (call $1)
    )
  )
  ;; custom section "dylink", size 5
)