diff options
Diffstat (limited to 'output/ex33.vapor')
-rw-r--r-- | output/ex33.vapor | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/output/ex33.vapor b/output/ex33.vapor new file mode 100644 index 0000000..4260958 --- /dev/null +++ b/output/ex33.vapor @@ -0,0 +1,52 @@ +func Main() + t.4 = HeapAllocZ(16) + [t.4+0] = :functable_A + t.3 = t.4 + t.3 = t.3 + t.6 = [t.3+0] + t.7 = [t.6+4] + t.9 = 0 + t.10 = 1 + t.8 = Sub(t.9 t.10) + t.14 = 6 + t.15 = 7 + t.13 = MulS(t.14 t.15) + t.11 = t.8 + t.12 = 400 + t.16 = t.13 + t.5 = call t.7(t.3 t.14 t.15 t.16) + t.17 = t.5 + PrintIntS(t.17) + t.3 = t.3 + t.19 = [t.3+0] + t.20 = [t.19+0] + t.22 = 0 + t.23 = 1 + t.21 = Add(t.22 t.23) + t.24 = t.21 + t.25 = 400 + t.18 = call t.20(t.3 t.24 t.25) + t.26 = t.18 + PrintIntS(t.26) + ret + +const functable_A + :A_foo + :A_bar + +func A_foo(this t.0 t.1 ) + [this+8] = 3 + t.2 = 22 + ret t.2 + +func A_bar(this t.0 t.1 t.2 ) + t.3 = 6 + ret t.3 + +func AllocArray(size) + bytes = MulS(size 4) + bytes = Add(bytes 4) + v = HeapAllocZ(bytes) + [v] = size + ret v + |