summaryrefslogtreecommitdiff
path: root/output/ex52.vapor
blob: 20de52316f0cfef16e31d46ebcf42d8b32fa75a7 (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
83
84
func Main()
  t.3 = HeapAllocZ(16)
  [t.3+0] = :functable_Test
  t.4 = t.3
  t.5 = t.4
  t.6 = [t.5+0]
  t.7 = [t.6+0]
  t.2 = call t.7(t.5)
  t.8 = t.2
  t.9 = t.8
  PrintIntS(t.9)
  ret

const functable_Test
   :Test_start
   :Test_next

func Test_start(this )
  t.0 = HeapAllocZ(16)
  [t.0+0] = :functable_Test
  t.1 = t.0
  t.2 = t.1
  [this+8] = t.2
  t.3 = 1
  t.4 = t.3
  [this+12] = t.4
  t.6 = [this+8]
  t.7 = t.6
  t.8 = [t.7+0]
  t.9 = [t.8+4]
  t.5 = call t.9(t.7)
  t.10 = t.5
  [this+12] = t.10
  t.12 = [this+12]
  t.13 = t.12
  t.11 = Eq(t.13 0)
  t.14 = t.11
  t.15 = t.14
  t.16 = t.15
  if0 t.16 goto :if17_else
if17_body:
  t.18 = 1
  t.19 = t.18
  t.17 = t.19
  goto :if17_end
if17_else:
  t.20 = 3
  t.21 = t.20
  t.17 = t.21
if17_end:
  t.22 = t.17
  t.23 = t.22
  t.24 = t.23
  ret t.24

func Test_next(this )
  t.2 = 1
  t.4 = 7
  t.5 = 8
  t.3 = LtS(t.4 t.5)
  t.6 = t.3
  t.7 = t.6
  t.8 = Eq(1 t.2)
  t.9 = Eq(1 t.7)
  t.1 = Eq(t.8 t.9)
  t.10 = t.1
  t.11 = t.10
  t.12 = [this+12]
  t.13 = Eq(1 t.11)
  t.14 = Eq(1 t.12)
  t.0 = Eq(t.13 t.14)
  t.15 = t.0
  t.16 = t.15
  t.17 = t.16
  t.18 = t.17
  ret t.18

func AllocArray(size)
  bytes = MulS(size 4)
  bytes = Add(bytes 4)
  v = HeapAllocZ(bytes)
  [v] = size
  ret v