aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/wasm/test/linker/file0.wast
blob: 0fd44fea9be184f54c5a4602ac2abc96a93a70e4 (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(module
 (type $FUNCSIG$ii (func (param i32) (result i32)))
 (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
 (import "env" "printf" (func $printf (param i32 i32) (result i32)))
 (table 0 anyfunc)
 (memory $0 1)
 (data (i32.const 16) "external symbol\00")
 (data (i32.const 32) "\n\00\00\00")
 (data (i32.const 36) "\0b\00\00\00")
 (data (i32.const 40) "\00\00\00\00")
 (data (i32.const 44) "\01\00\00\00")
 (export "memory" (memory $0))
 (export "print" (func $print))
 (export "dummy_f_1_0" (func $dummy_f_1_0))
 (export "dymmy_f_1_1" (func $dymmy_f_1_1))
 (export "dummy_f_0_0" (func $dummy_f_0_0))
 (export "main" (func $main))
 (func $print (; 1 ;)
  (drop
   (call $printf
    (i32.const 16)
    (i32.const 0)
   )
  )
 )
 (func $dummy_f_1_0 (; 2 ;) (param $0 i32) (result i32)
  (local $1 i32)
  (set_local $1
   (i32.const 1)
  )
  (block $label$0
   (loop $label$1
    (br_if $label$0
     (i32.lt_s
      (get_local $0)
      (i32.const 1)
     )
    )
    (set_local $1
     (i32.mul
      (get_local $0)
      (get_local $1)
     )
    )
    (set_local $0
     (i32.add
      (get_local $0)
      (i32.const -1)
     )
    )
    (br $label$1)
   )
  )
  (get_local $1)
 )
 (func $dymmy_f_1_1 (; 3 ;) (param $0 i32) (result i32)
  (i32.shl
   (get_local $0)
   (i32.const 1)
  )
 )
 (func $dummy_f_0_0 (; 4 ;) (param $0 i32) (result i32)
  (i32.shl
   (get_local $0)
   (i32.const 2)
  )
 )
 (func $main (; 5 ;) (param $0 i32) (param $1 i32) (result i32)
  (i32.const 123)
 )
)