summaryrefslogtreecommitdiff
path: root/test/passes/emit-js-wrapper=a.js.txt
blob: 2044d0f48fcec7266be64c8303b60bc2c314ebab (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
(module
 (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
 (type $FUNCSIG$vi (func (param i32)))
 (type $FUNCSIG$vijfd (func (param i32 i64 f32 f64)))
 (type $FUNCSIG$vifd (func (param i32 f32 f64)))
 (type $FUNCSIG$jifd (func (param i32 f32 f64) (result i64)))
 (import "env" "setTempRet0" (func $setTempRet0 (param i32)))
 (memory $0 256 256)
 (export "add" (func $add))
 (export "no_return" (func $no-return))
 (export "types" (func $legalstub$types))
 (export "types2" (func $types2))
 (export "types3" (func $legalstub$types3))
 (func $add (; 1 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32)
  (i32.add
   (local.get $x)
   (local.get $y)
  )
 )
 (func $unexported (; 2 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32)
  (i32.add
   (local.get $x)
   (local.get $y)
  )
 )
 (func $no-return (; 3 ;) (type $FUNCSIG$vi) (param $x i32)
  (drop
   (i32.add
    (local.get $x)
    (local.get $x)
   )
  )
 )
 (func $types (; 4 ;) (type $FUNCSIG$vijfd) (param $x i32) (param $y i64) (param $z f32) (param $w f64)
  (nop)
 )
 (func $types2 (; 5 ;) (type $FUNCSIG$vifd) (param $x i32) (param $z f32) (param $w f64)
  (nop)
 )
 (func $types3 (; 6 ;) (type $FUNCSIG$jifd) (param $x i32) (param $z f32) (param $w f64) (result i64)
  (i64.const 1)
 )
 (func $legalstub$types (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f32) (param $4 f64)
  (call $types
   (local.get $0)
   (i64.or
    (i64.extend_i32_u
     (local.get $1)
    )
    (i64.shl
     (i64.extend_i32_u
      (local.get $2)
     )
     (i64.const 32)
    )
   )
   (local.get $3)
   (local.get $4)
  )
 )
 (func $legalstub$types3 (; 8 ;) (param $0 i32) (param $1 f32) (param $2 f64) (result i32)
  (local $3 i64)
  (local.set $3
   (call $types3
    (local.get $0)
    (local.get $1)
    (local.get $2)
   )
  )
  (call $setTempRet0
   (i32.wrap_i64
    (i64.shr_u
     (local.get $3)
     (i64.const 32)
    )
   )
  )
  (i32.wrap_i64
   (local.get $3)
  )
 )
)