summaryrefslogtreecommitdiff
path: root/output/ex51.vapor
diff options
context:
space:
mode:
Diffstat (limited to 'output/ex51.vapor')
-rw-r--r--output/ex51.vapor111
1 files changed, 111 insertions, 0 deletions
diff --git a/output/ex51.vapor b/output/ex51.vapor
new file mode 100644
index 0000000..6046fae
--- /dev/null
+++ b/output/ex51.vapor
@@ -0,0 +1,111 @@
+func Main()
+ t.3 = HeapAllocZ(24)
+ [t.3+0] = :functable_Test
+ t.4 = t.3
+ t.5 = t.4
+ t.6 = [t.5+0]
+ t.7 = [t.6+8]
+ t.2 = call t.7(t.5)
+ t.8 = t.2
+ t.9 = t.8
+ PrintIntS(t.9)
+ ret
+
+const functable_Test
+ :Test_setval
+ :Test_getval
+ :Test_start
+ :Test_next
+
+func Test_setval(this t.0 t.1 )
+ t.2 = [this+20]
+ t.4 = t.0
+ t.5 = t.4
+ t.3 = MulS(t.5 4)
+ t.3 = Add(t.3 4)
+ t.3 = Add(t.2 t.3)
+ t.6 = t.1
+ t.7 = t.6
+ [t.3] = t.7
+ t.8 = 0
+ t.9 = t.8
+ t.10 = t.9
+ ret t.10
+
+func Test_getval(this t.0 )
+ t.4 = [this+20]
+ t.3 = t.4
+ t.6 = t.0
+ t.5 = MulS(t.6 4)
+ t.5 = Add(t.5 4)
+ t.5 = Add(t.3 t.5)
+ t.2 = [t.5]
+ t.7 = t.2
+ t.1 = t.7
+ t.8 = t.1
+ t.9 = t.8
+ t.10 = t.9
+ ret t.10
+
+func Test_start(this )
+ t.2 = this
+ t.3 = t.2
+ t.1 = t.3
+ t.4 = 10
+ t.5 = t.4
+ t.6 = call :AllocArray(t.5)
+ t.7 = t.6
+ t.8 = t.7
+ [this+20] = t.8
+ t.10 = HeapAllocZ(24)
+ [t.10+0] = :functable_Test
+ t.11 = t.10
+ t.12 = t.11
+ t.13 = t.12
+ t.14 = t.13
+ t.15 = [t.14+0]
+ t.16 = [t.15+12]
+ t.9 = call t.16(t.14)
+ t.17 = t.9
+ [this+16] = t.17
+ t.20 = t.1
+ t.1 = t.20
+ t.21 = [t.1+0]
+ t.22 = [t.21+0]
+ t.23 = 2
+ t.24 = t.23
+ t.25 = 42
+ t.26 = t.25
+ t.19 = call t.22(t.1 t.24 t.26)
+ t.27 = t.19
+ t.18 = t.27
+ t.28 = this
+ t.29 = t.28
+ [this+16] = t.29
+ t.31 = [this+16]
+ t.32 = t.31
+ t.33 = [t.32+0]
+ t.34 = [t.33+4]
+ t.35 = 2
+ t.36 = t.35
+ t.30 = call t.34(t.32 t.36)
+ t.37 = t.30
+ t.18 = t.37
+ t.38 = t.18
+ t.39 = t.38
+ t.40 = t.39
+ ret t.40
+
+func Test_next(this )
+ t.0 = [this+16]
+ t.1 = t.0
+ t.2 = t.1
+ ret t.2
+
+func AllocArray(size)
+ bytes = MulS(size 4)
+ bytes = Add(bytes 4)
+ v = HeapAllocZ(bytes)
+ [v] = size
+ ret v
+