diff options
Diffstat (limited to 'output/ex52.vapor')
-rw-r--r-- | output/ex52.vapor | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/output/ex52.vapor b/output/ex52.vapor new file mode 100644 index 0000000..20de523 --- /dev/null +++ b/output/ex52.vapor @@ -0,0 +1,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 + |