From 0d9cdf252d894d173ce37e62bd044036ae2b5a78 Mon Sep 17 00:00:00 2001 From: Minero Aoki Date: Tue, 23 Dec 2008 16:23:14 +0000 Subject: [PATCH] add preproc tags git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4112 1b9489fe-b721-0410-924e-b54b9192deb8 --- .../cflat/compiler/CodeGenerator.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/net/loveruby/cflat/compiler/CodeGenerator.java b/net/loveruby/cflat/compiler/CodeGenerator.java index c9c3638..d32f7c8 100644 --- a/net/loveruby/cflat/compiler/CodeGenerator.java +++ b/net/loveruby/cflat/compiler/CodeGenerator.java @@ -777,7 +777,7 @@ public class CodeGenerator } // #@@} - // #@@range/compile_If{ + // #@@range/compile_CondExpr{ public void visit(CondExprNode node) { compile(node.cond()); testCond(node.cond().type(), reg("ax")); @@ -864,6 +864,7 @@ public class CodeGenerator label(node.endLabel()); } + // #@@range/compile_For{ public void visit(ForNode node) { compileStmt(node.init()); label(node.begLabel()); @@ -876,6 +877,7 @@ public class CodeGenerator jmp(node.begLabel()); label(node.endLabel()); } + // #@@} // #@@range/compile_Break{ public void visit(BreakNode node) { @@ -945,24 +947,19 @@ public class CodeGenerator // #@@} // spills: dx - // #@@range/compileBinaryOp{ + // #@@range/compileBinaryOp_begin{ protected void compileBinaryOp(String op, Type t, AsmOperand right) { - // #@@range/compileBinaryOp_add{ + // #@@range/compileBinaryOp_arithops{ if (op.equals("+")) { add(t, right, reg("ax", t)); } - // #@@} - // #@@range/compileBinaryOp_sub{ else if (op.equals("-")) { sub(t, right, reg("ax", t)); } - // #@@} - // #@@range/compileBinaryOp_mul{ + // #@@} else if (op.equals("*")) { imul(t, right, reg("ax", t)); } - // #@@} - // #@@range/compileBinaryOp_div{ else if (op.equals("/") || op.equals("%")) { if (t.isSigned()) { cltd(); @@ -977,6 +974,7 @@ public class CodeGenerator } } // #@@} + // #@@range/compileBinaryOp_bitops{ else if (op.equals("&")) { and(t, right, reg("ax", t)); } @@ -997,7 +995,8 @@ public class CodeGenerator else if (op.equals("<<")) { sal(t, cl(), reg("ax", t)); } - // #@@range/compileBinaryOp_cmp{ + // #@@} + // #@@range/compileBinaryOp_cmpops{ else { // Comparison operators cmp(t, right, reg("ax", t)); @@ -1026,6 +1025,7 @@ public class CodeGenerator movzb(t, al(), reg("ax", t)); } // #@@} + // #@@range/compileBinaryOp_end{ } // #@@}