diff options
Diffstat (limited to 'output/TreeVisitor.vapor')
-rw-r--r-- | output/TreeVisitor.vapor | 896 |
1 files changed, 896 insertions, 0 deletions
diff --git a/output/TreeVisitor.vapor b/output/TreeVisitor.vapor new file mode 100644 index 0000000..8cbc9cc --- /dev/null +++ b/output/TreeVisitor.vapor @@ -0,0 +1,896 @@ +func Main() + t.3 = HeapAllocZ(4) + [t.3+0] = :functable_TV + t.4 = t.3 + t.5 = [t.4+0] + t.6 = [t.5+0] + t.2 = call t.6(t.4 ) + t.7 = t.2 + PrintIntS(t.7) + ret + +const functable_TV + :TV_Start + +func TV_Start(this ) + t.3 = HeapAllocZ(108) + [t.3+0] = :functable_Tree + t.2 = t.3 + t.2 = t.2 + t.6 = [t.2+0] + t.7 = [t.6+0] + t.8 = 16 + t.5 = call t.7(t.2 t.8) + t.4 = t.5 + t.2 = t.2 + t.10 = [t.2+0] + t.11 = [t.10+72] + t.9 = call t.11(t.2 ) + t.4 = t.9 + t.12 = 100000000 + PrintIntS(t.12) + t.2 = t.2 + t.14 = [t.2+0] + t.15 = [t.14+48] + t.16 = 8 + t.13 = call t.15(t.2 t.16) + t.4 = t.13 + t.2 = t.2 + t.18 = [t.2+0] + t.19 = [t.18+48] + t.20 = 24 + t.17 = call t.19(t.2 t.20) + t.4 = t.17 + t.2 = t.2 + t.22 = [t.2+0] + t.23 = [t.22+48] + t.24 = 4 + t.21 = call t.23(t.2 t.24) + t.4 = t.21 + t.2 = t.2 + t.26 = [t.2+0] + t.27 = [t.26+48] + t.28 = 12 + t.25 = call t.27(t.2 t.28) + t.4 = t.25 + t.2 = t.2 + t.30 = [t.2+0] + t.31 = [t.30+48] + t.32 = 20 + t.29 = call t.31(t.2 t.32) + t.4 = t.29 + t.2 = t.2 + t.34 = [t.2+0] + t.35 = [t.34+48] + t.36 = 28 + t.33 = call t.35(t.2 t.36) + t.4 = t.33 + t.2 = t.2 + t.38 = [t.2+0] + t.39 = [t.38+48] + t.40 = 14 + t.37 = call t.39(t.2 t.40) + t.4 = t.37 + t.2 = t.2 + t.42 = [t.2+0] + t.43 = [t.42+72] + t.41 = call t.43(t.2 ) + t.4 = t.41 + t.44 = 100000000 + PrintIntS(t.44) + t.46 = HeapAllocZ(16) + [t.46+0] = :functable_MyVisitor + t.45 = t.46 + t.47 = 50000000 + PrintIntS(t.47) + t.2 = t.2 + t.50 = [t.2+0] + t.51 = [t.50+80] + t.52 = t.45 + t.49 = call t.51(t.2 t.52) + t.48 = t.49 + t.53 = 100000000 + PrintIntS(t.53) + t.2 = t.2 + t.55 = [t.2+0] + t.56 = [t.55+68] + t.57 = 24 + t.54 = call t.56(t.2 t.57) + t.58 = t.54 + PrintIntS(t.58) + t.2 = t.2 + t.60 = [t.2+0] + t.61 = [t.60+68] + t.62 = 12 + t.59 = call t.61(t.2 t.62) + t.63 = t.59 + PrintIntS(t.63) + t.2 = t.2 + t.65 = [t.2+0] + t.66 = [t.65+68] + t.67 = 16 + t.64 = call t.66(t.2 t.67) + t.68 = t.64 + PrintIntS(t.68) + t.2 = t.2 + t.70 = [t.2+0] + t.71 = [t.70+68] + t.72 = 50 + t.69 = call t.71(t.2 t.72) + t.73 = t.69 + PrintIntS(t.73) + t.2 = t.2 + t.75 = [t.2+0] + t.76 = [t.75+68] + t.77 = 12 + t.74 = call t.76(t.2 t.77) + t.78 = t.74 + PrintIntS(t.78) + t.2 = t.2 + t.80 = [t.2+0] + t.81 = [t.80+52] + t.82 = 12 + t.79 = call t.81(t.2 t.82) + t.4 = t.79 + t.2 = t.2 + t.84 = [t.2+0] + t.85 = [t.84+72] + t.83 = call t.85(t.2 ) + t.4 = t.83 + t.2 = t.2 + t.87 = [t.2+0] + t.88 = [t.87+68] + t.89 = 12 + t.86 = call t.88(t.2 t.89) + t.90 = t.86 + PrintIntS(t.90) + t.91 = 0 + ret t.91 + +const functable_Tree + :Tree_Init + :Tree_SetRight + :Tree_SetLeft + :Tree_GetRight + :Tree_GetLeft + :Tree_GetKey + :Tree_SetKey + :Tree_GetHas_Right + :Tree_GetHas_Left + :Tree_SetHas_Left + :Tree_SetHas_Right + :Tree_Compare + :Tree_Insert + :Tree_Delete + :Tree_Remove + :Tree_RemoveRight + :Tree_RemoveLeft + :Tree_Search + :Tree_Print + :Tree_RecPrint + :Tree_accept + +func Tree_Init(this t.0 ) + [this+92] = t.0 + [this+96] = 0 + [this+100] = 0 + t.1 = 1 + ret t.1 + +func Tree_SetRight(this t.0 ) + [this+88] = t.0 + t.1 = 1 + ret t.1 + +func Tree_SetLeft(this t.0 ) + [this+84] = t.0 + t.1 = 1 + ret t.1 + +func Tree_GetRight(this ) + t.0 = [this+88] + ret t.0 + +func Tree_GetLeft(this ) + t.0 = [this+84] + ret t.0 + +func Tree_GetKey(this ) + t.0 = [this+92] + ret t.0 + +func Tree_SetKey(this t.0 ) + [this+92] = t.0 + t.1 = 1 + ret t.1 + +func Tree_GetHas_Right(this ) + t.0 = [this+100] + ret t.0 + +func Tree_GetHas_Left(this ) + t.0 = [this+96] + ret t.0 + +func Tree_SetHas_Left(this t.0 ) + [this+96] = t.0 + t.1 = 1 + ret t.1 + +func Tree_SetHas_Right(this t.0 ) + [this+100] = t.0 + t.1 = 1 + ret t.1 + +func Tree_Compare(this t.0 t.1 ) + t.2 = 0 + t.5 = t.1 + t.6 = 1 + t.4 = Add(t.5 t.6) + t.3 = t.4 + t.8 = t.0 + t.9 = t.1 + t.7 = LtS(t.8 t.9) + t.10 = t.7 + if0 t.10 goto :if105_else +if105_body: + t.2 = 0 + goto :if105_end +if105_else: + t.13 = t.0 + t.14 = t.3 + t.12 = LtS(t.13 t.14) + t.11 = Eq(t.12 0) + t.15 = t.11 + if0 t.15 goto :if109_else +if109_body: + t.2 = 0 + goto :if109_end +if109_else: + t.2 = 1 +if109_end: +if105_end: + t.16 = t.2 + ret t.16 + +func Tree_Insert(this t.0 ) + t.3 = HeapAllocZ(108) + [t.3+0] = :functable_Tree + t.2 = t.3 + t.2 = t.2 + t.6 = [t.2+0] + t.7 = [t.6+0] + t.8 = t.0 + t.5 = call t.7(t.2 t.8) + t.4 = t.5 + t.9 = this + t.10 = 1 +while120_test: + t.11 = t.10 + if0 t.11 goto :while120_end +while120_body: + t.9 = t.9 + t.14 = [t.9+0] + t.15 = [t.14+20] + t.13 = call t.15(t.9 ) + t.12 = t.13 + t.17 = t.0 + t.18 = t.12 + t.16 = LtS(t.17 t.18) + t.19 = t.16 + if0 t.19 goto :if125_else +if125_body: + t.9 = t.9 + t.21 = [t.9+0] + t.22 = [t.21+32] + t.20 = call t.22(t.9 ) + t.23 = t.20 + if0 t.23 goto :if129_else +if129_body: + t.9 = t.9 + t.25 = [t.9+0] + t.26 = [t.25+16] + t.24 = call t.26(t.9 ) + t.9 = t.24 + goto :if129_end +if129_else: + t.10 = 0 + t.9 = t.9 + t.28 = [t.9+0] + t.29 = [t.28+36] + t.30 = 1 + t.27 = call t.29(t.9 t.30) + t.4 = t.27 + t.9 = t.9 + t.32 = [t.9+0] + t.33 = [t.32+8] + t.34 = t.2 + t.31 = call t.33(t.9 t.34) + t.4 = t.31 +if129_end: + goto :if125_end +if125_else: + t.9 = t.9 + t.36 = [t.9+0] + t.37 = [t.36+28] + t.35 = call t.37(t.9 ) + t.38 = t.35 + if0 t.38 goto :if144_else +if144_body: + t.9 = t.9 + t.40 = [t.9+0] + t.41 = [t.40+12] + t.39 = call t.41(t.9 ) + t.9 = t.39 + goto :if144_end +if144_else: + t.10 = 0 + t.9 = t.9 + t.43 = [t.9+0] + t.44 = [t.43+40] + t.45 = 1 + t.42 = call t.44(t.9 t.45) + t.4 = t.42 + t.9 = t.9 + t.47 = [t.9+0] + t.48 = [t.47+4] + t.49 = t.2 + t.46 = call t.48(t.9 t.49) + t.4 = t.46 +if144_end: +if125_end: + goto :while120_test +while120_end: + t.50 = 1 + ret t.50 + +func Tree_Delete(this t.0 ) + t.2 = this + t.3 = this + t.4 = 1 + t.5 = 0 + t.6 = 1 +while160_test: + t.7 = t.4 + if0 t.7 goto :while160_end +while160_body: + t.2 = t.2 + t.10 = [t.2+0] + t.11 = [t.10+20] + t.9 = call t.11(t.2 ) + t.8 = t.9 + t.13 = t.0 + t.14 = t.8 + t.12 = LtS(t.13 t.14) + t.15 = t.12 + if0 t.15 goto :if165_else +if165_body: + t.2 = t.2 + t.17 = [t.2+0] + t.18 = [t.17+32] + t.16 = call t.18(t.2 ) + t.19 = t.16 + if0 t.19 goto :if169_else +if169_body: + t.3 = t.2 + t.2 = t.2 + t.21 = [t.2+0] + t.22 = [t.21+16] + t.20 = call t.22(t.2 ) + t.2 = t.20 + goto :if169_end +if169_else: + t.4 = 0 +if169_end: + goto :if165_end +if165_else: + t.24 = t.8 + t.25 = t.0 + t.23 = LtS(t.24 t.25) + t.26 = t.23 + if0 t.26 goto :if176_else +if176_body: + t.2 = t.2 + t.28 = [t.2+0] + t.29 = [t.28+28] + t.27 = call t.29(t.2 ) + t.30 = t.27 + if0 t.30 goto :if180_else +if180_body: + t.3 = t.2 + t.2 = t.2 + t.32 = [t.2+0] + t.33 = [t.32+12] + t.31 = call t.33(t.2 ) + t.2 = t.31 + goto :if180_end +if180_else: + t.4 = 0 +if180_end: + goto :if176_end +if176_else: + t.34 = t.6 + if0 t.34 goto :if187_else +if187_body: + t.2 = t.2 + t.38 = [t.2+0] + t.39 = [t.38+28] + t.37 = call t.39(t.2 ) + t.36 = Eq(t.37 0) + t.40 = t.36 + t.2 = t.2 + t.43 = [t.2+0] + t.44 = [t.43+32] + t.42 = call t.44(t.2 ) + t.41 = Eq(t.42 0) + t.45 = t.41 + t.46 = Eq(1 t.40) + t.47 = Eq(1 t.45) + t.35 = Eq(t.46 t.47) + t.48 = t.35 + if0 t.48 goto :if188_else +if188_body: + t.49 = 1 + goto :if188_end +if188_else: + t.51 = [this] + t.52 = t.3 + t.53 = t.2 + t.51 = [t.51+56] + t.50 = call t.51(this t.52 t.53) + t.49 = t.50 +if188_end: + goto :if187_end +if187_else: + t.55 = [this] + t.56 = t.3 + t.57 = t.2 + t.55 = [t.55+56] + t.54 = call t.55(this t.56 t.57) + t.49 = t.54 +if187_end: + t.5 = 1 + t.4 = 0 +if176_end: +if165_end: + t.6 = 0 + goto :while160_test +while160_end: + t.58 = t.5 + ret t.58 + +func Tree_Remove(this t.0 t.1 ) + t.1 = t.1 + t.3 = [t.1+0] + t.4 = [t.3+32] + t.2 = call t.4(t.1 ) + t.5 = t.2 + if0 t.5 goto :if211_else +if211_body: + t.8 = [this] + t.9 = t.0 + t.10 = t.1 + t.8 = [t.8+64] + t.7 = call t.8(this t.9 t.10) + t.6 = t.7 + goto :if211_end +if211_else: + t.1 = t.1 + t.12 = [t.1+0] + t.13 = [t.12+28] + t.11 = call t.13(t.1 ) + t.14 = t.11 + if0 t.14 goto :if219_else +if219_body: + t.16 = [this] + t.17 = t.0 + t.18 = t.1 + t.16 = [t.16+60] + t.15 = call t.16(this t.17 t.18) + t.6 = t.15 + goto :if219_end +if219_else: + t.1 = t.1 + t.21 = [t.1+0] + t.22 = [t.21+20] + t.20 = call t.22(t.1 ) + t.19 = t.20 + t.0 = t.0 + t.26 = [t.0+0] + t.27 = [t.26+16] + t.25 = call t.27(t.0 ) + t.28 = t.25 + t.29 = [t.28+0] + t.30 = [t.29+20] + t.24 = call t.30(t.28 ) + t.23 = t.24 + t.32 = [this] + t.33 = t.19 + t.34 = t.23 + t.32 = [t.32+44] + t.31 = call t.32(this t.33 t.34) + t.35 = t.31 + if0 t.35 goto :if237_else +if237_body: + t.0 = t.0 + t.37 = [t.0+0] + t.38 = [t.37+8] + t.39 = [this+104] + t.36 = call t.38(t.0 t.39) + t.6 = t.36 + t.0 = t.0 + t.41 = [t.0+0] + t.42 = [t.41+36] + t.43 = 0 + t.40 = call t.42(t.0 t.43) + t.6 = t.40 + goto :if237_end +if237_else: + t.0 = t.0 + t.45 = [t.0+0] + t.46 = [t.45+4] + t.47 = [this+104] + t.44 = call t.46(t.0 t.47) + t.6 = t.44 + t.0 = t.0 + t.49 = [t.0+0] + t.50 = [t.49+40] + t.51 = 0 + t.48 = call t.50(t.0 t.51) + t.6 = t.48 +if237_end: +if219_end: +if211_end: + t.52 = 1 + ret t.52 + +func Tree_RemoveRight(this t.0 t.1 ) +while259_test: + t.1 = t.1 + t.3 = [t.1+0] + t.4 = [t.3+28] + t.2 = call t.4(t.1 ) + t.5 = t.2 + if0 t.5 goto :while259_end +while259_body: + t.1 = t.1 + t.8 = [t.1+0] + t.9 = [t.8+24] + t.1 = t.1 + t.12 = [t.1+0] + t.13 = [t.12+12] + t.11 = call t.13(t.1 ) + t.14 = t.11 + t.15 = [t.14+0] + t.16 = [t.15+20] + t.10 = call t.16(t.14 ) + t.17 = t.10 + t.7 = call t.9(t.1 t.17) + t.6 = t.7 + t.0 = t.1 + t.1 = t.1 + t.19 = [t.1+0] + t.20 = [t.19+12] + t.18 = call t.20(t.1 ) + t.1 = t.18 + goto :while259_test +while259_end: + t.0 = t.0 + t.22 = [t.0+0] + t.23 = [t.22+4] + t.24 = [this+104] + t.21 = call t.23(t.0 t.24) + t.6 = t.21 + t.0 = t.0 + t.26 = [t.0+0] + t.27 = [t.26+40] + t.28 = 0 + t.25 = call t.27(t.0 t.28) + t.6 = t.25 + t.29 = 1 + ret t.29 + +func Tree_RemoveLeft(this t.0 t.1 ) +while287_test: + t.1 = t.1 + t.3 = [t.1+0] + t.4 = [t.3+32] + t.2 = call t.4(t.1 ) + t.5 = t.2 + if0 t.5 goto :while287_end +while287_body: + t.1 = t.1 + t.8 = [t.1+0] + t.9 = [t.8+24] + t.1 = t.1 + t.12 = [t.1+0] + t.13 = [t.12+16] + t.11 = call t.13(t.1 ) + t.14 = t.11 + t.15 = [t.14+0] + t.16 = [t.15+20] + t.10 = call t.16(t.14 ) + t.17 = t.10 + t.7 = call t.9(t.1 t.17) + t.6 = t.7 + t.0 = t.1 + t.1 = t.1 + t.19 = [t.1+0] + t.20 = [t.19+16] + t.18 = call t.20(t.1 ) + t.1 = t.18 + goto :while287_test +while287_end: + t.0 = t.0 + t.22 = [t.0+0] + t.23 = [t.22+8] + t.24 = [this+104] + t.21 = call t.23(t.0 t.24) + t.6 = t.21 + t.0 = t.0 + t.26 = [t.0+0] + t.27 = [t.26+36] + t.28 = 0 + t.25 = call t.27(t.0 t.28) + t.6 = t.25 + t.29 = 1 + ret t.29 + +func Tree_Search(this t.0 ) + t.2 = this + t.3 = 1 + t.4 = 0 +while315_test: + t.5 = t.3 + if0 t.5 goto :while315_end +while315_body: + t.2 = t.2 + t.8 = [t.2+0] + t.9 = [t.8+20] + t.7 = call t.9(t.2 ) + t.6 = t.7 + t.11 = t.0 + t.12 = t.6 + t.10 = LtS(t.11 t.12) + t.13 = t.10 + if0 t.13 goto :if320_else +if320_body: + t.2 = t.2 + t.15 = [t.2+0] + t.16 = [t.15+32] + t.14 = call t.16(t.2 ) + t.17 = t.14 + if0 t.17 goto :if324_else +if324_body: + t.2 = t.2 + t.19 = [t.2+0] + t.20 = [t.19+16] + t.18 = call t.20(t.2 ) + t.2 = t.18 + goto :if324_end +if324_else: + t.3 = 0 +if324_end: + goto :if320_end +if320_else: + t.22 = t.6 + t.23 = t.0 + t.21 = LtS(t.22 t.23) + t.24 = t.21 + if0 t.24 goto :if331_else +if331_body: + t.2 = t.2 + t.26 = [t.2+0] + t.27 = [t.26+28] + t.25 = call t.27(t.2 ) + t.28 = t.25 + if0 t.28 goto :if335_else +if335_body: + t.2 = t.2 + t.30 = [t.2+0] + t.31 = [t.30+12] + t.29 = call t.31(t.2 ) + t.2 = t.29 + goto :if335_end +if335_else: + t.3 = 0 +if335_end: + goto :if331_end +if331_else: + t.4 = 1 + t.3 = 0 +if331_end: +if320_end: + goto :while315_test +while315_end: + t.32 = t.4 + ret t.32 + +func Tree_Print(this ) + t.1 = this + t.4 = [this] + t.5 = t.1 + t.4 = [t.4+76] + t.3 = call t.4(this t.5) + t.2 = t.3 + t.6 = 1 + ret t.6 + +func Tree_RecPrint(this t.0 ) + t.0 = t.0 + t.2 = [t.0+0] + t.3 = [t.2+32] + t.1 = call t.3(t.0 ) + t.4 = t.1 + if0 t.4 goto :if347_else +if347_body: + t.7 = [this] + t.0 = t.0 + t.9 = [t.0+0] + t.10 = [t.9+16] + t.8 = call t.10(t.0 ) + t.11 = t.8 + t.7 = [t.7+76] + t.6 = call t.7(this t.11) + t.5 = t.6 + goto :if347_end +if347_else: + t.5 = 1 +if347_end: + t.0 = t.0 + t.13 = [t.0+0] + t.14 = [t.13+20] + t.12 = call t.14(t.0 ) + t.15 = t.12 + PrintIntS(t.15) + t.0 = t.0 + t.17 = [t.0+0] + t.18 = [t.17+28] + t.16 = call t.18(t.0 ) + t.19 = t.16 + if0 t.19 goto :if361_else +if361_body: + t.21 = [this] + t.0 = t.0 + t.23 = [t.0+0] + t.24 = [t.23+12] + t.22 = call t.24(t.0 ) + t.25 = t.22 + t.21 = [t.21+76] + t.20 = call t.21(this t.25) + t.5 = t.20 + goto :if361_end +if361_else: + t.5 = 1 +if361_end: + t.26 = 1 + ret t.26 + +func Tree_accept(this t.0 ) + t.1 = 333 + PrintIntS(t.1) + t.0 = t.0 + t.4 = [t.0+0] + t.5 = [t.4+0] + t.6 = this + t.3 = call t.5(t.0 t.6) + t.2 = t.3 + t.7 = 0 + ret t.7 + +const functable_Visitor + :Visitor_visit + +func Visitor_visit(this t.0 ) + t.0 = t.0 + t.2 = [t.0+0] + t.3 = [t.2+28] + t.1 = call t.3(t.0 ) + t.4 = t.1 + if0 t.4 goto :if378_else +if378_body: + t.0 = t.0 + t.6 = [t.0+0] + t.7 = [t.6+12] + t.5 = call t.7(t.0 ) + [this+8] = t.5 + t.10 = [this+8] + t.11 = [t.10+0] + t.12 = [t.11+80] + t.13 = this + t.9 = call t.12(t.10 t.13) + t.8 = t.9 + goto :if378_end +if378_else: + t.8 = 0 +if378_end: + t.0 = t.0 + t.15 = [t.0+0] + t.16 = [t.15+32] + t.14 = call t.16(t.0 ) + t.17 = t.14 + if0 t.17 goto :if389_else +if389_body: + t.0 = t.0 + t.19 = [t.0+0] + t.20 = [t.19+16] + t.18 = call t.20(t.0 ) + [this+4] = t.18 + t.22 = [this+4] + t.23 = [t.22+0] + t.24 = [t.23+80] + t.25 = this + t.21 = call t.24(t.22 t.25) + t.8 = t.21 + goto :if389_end +if389_else: + t.8 = 0 +if389_end: + t.26 = 0 + ret t.26 + +const functable_MyVisitor + :MyVisitor_visit + :Visitor_visit + +func MyVisitor_visit(this t.0 ) + t.0 = t.0 + t.2 = [t.0+0] + t.3 = [t.2+28] + t.1 = call t.3(t.0 ) + t.4 = t.1 + if0 t.4 goto :if401_else +if401_body: + t.0 = t.0 + t.6 = [t.0+0] + t.7 = [t.6+12] + t.5 = call t.7(t.0 ) + [this+12] = t.5 + t.10 = [this+12] + t.11 = [t.10+0] + t.12 = [t.11+80] + t.13 = this + t.9 = call t.12(t.10 t.13) + t.8 = t.9 + goto :if401_end +if401_else: + t.8 = 0 +if401_end: + t.0 = t.0 + t.15 = [t.0+0] + t.16 = [t.15+20] + t.14 = call t.16(t.0 ) + t.17 = t.14 + PrintIntS(t.17) + t.0 = t.0 + t.19 = [t.0+0] + t.20 = [t.19+32] + t.18 = call t.20(t.0 ) + t.21 = t.18 + if0 t.21 goto :if416_else +if416_body: + t.0 = t.0 + t.23 = [t.0+0] + t.24 = [t.23+16] + t.22 = call t.24(t.0 ) + [this+8] = t.22 + t.26 = [this+8] + t.27 = [t.26+0] + t.28 = [t.27+80] + t.29 = this + t.25 = call t.28(t.26 t.29) + t.8 = t.25 + goto :if416_end +if416_else: + t.8 = 0 +if416_end: + t.30 = 0 + ret t.30 + +func AllocArray(size) + bytes = MulS(size 4) + bytes = Add(bytes 4) + v = HeapAllocZ(bytes) + [v] = size + ret v + |