r4626@macbookpro: aamine | 2009-04-30 21:49:44 +0900

* net/loveruby/cflat/ast/*.java: remove unused reference to asm.Label.
 


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4165 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2009-05-03 14:45:57 +00:00
parent e66d1b59d9
commit a5a58d9ef8
15 changed files with 7 additions and 86 deletions

View File

@ -1,3 +1,8 @@
Sun Aug 31 23:59:36 2008 Minero Aoki <aamine@loveruby.net>
* net/loveruby/cflat/ast/*.java: remove unused reference to
asm.Label.
Mon Apr 27 02:55:41 2009 Minero Aoki <aamine@loveruby.net>
* net/loveruby/cflat/entity: new package.

View File

@ -1,15 +1,10 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class BreakNode extends StmtNode {
public BreakNode(Location loc) {
super(loc);
}
public Location location() {
return location;
}
protected void _dump(Dumper d) {
}

View File

@ -1,6 +0,0 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public interface BreakableStmt {
public Label endLabel();
}

View File

@ -1,18 +1,14 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.type.*;
import net.loveruby.cflat.asm.Label;
public class CondExprNode extends ExprNode {
protected ExprNode cond, thenExpr, elseExpr;
protected Label elseLabel, endLabel;
public CondExprNode(ExprNode cond, ExprNode t, ExprNode e) {
super();
this.cond = cond;
this.thenExpr = t;
this.elseExpr = e;
this.elseLabel = new Label();
this.endLabel = new Label();
}
public Type type() {
@ -39,14 +35,6 @@ public class CondExprNode extends ExprNode {
this.elseExpr = expr;
}
public Label elseLabel() {
return elseLabel;
}
public Label endLabel() {
return endLabel;
}
public Location location() {
return cond.location();
}

View File

@ -1,5 +1,4 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class ContinueNode extends StmtNode {
public ContinueNode(Location loc) {

View File

@ -1,6 +0,0 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public interface ContinueableStmt {
public Label continueLabel();
}

View File

@ -1,5 +1,4 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class DoWhileNode extends StmtNode {
protected StmtNode body;

View File

@ -1,5 +1,4 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class ForNode extends StmtNode {
protected StmtNode init;

View File

@ -1,28 +1,17 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class GotoNode extends StmtNode {
protected String target;
protected Label label;
public GotoNode(Location loc, String target) {
super(loc);
this.target = target;
}
public GotoNode(Label target) {
super(null);
label = target;
}
public String target() {
return target;
}
public Label label() {
return label;
}
protected void _dump(Dumper d) {
d.printMember("target", target);
}

View File

@ -1,5 +1,4 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class IfNode extends StmtNode {
protected ExprNode cond;

View File

@ -1,10 +1,8 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class LabelNode extends StmtNode {
protected String name;
protected StmtNode stmt;
protected Label label;
public LabelNode(Location loc, String name, StmtNode stmt) {
super(loc);
@ -12,11 +10,6 @@ public class LabelNode extends StmtNode {
this.stmt = stmt;
}
public LabelNode(Label label) {
super(null);
this.label = label;
}
public String name() {
return name;
}
@ -25,11 +18,6 @@ public class LabelNode extends StmtNode {
return stmt;
}
public Label label() {
if (label == null) throw new Error("label is null");
return label;
}
protected void _dump(Dumper d) {
d.printMember("name", name);
d.printMember("stmt", stmt);

View File

@ -1,19 +1,11 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class LogicalAndNode extends BinaryOpNode {
protected Label endLabel;
public LogicalAndNode(ExprNode left, ExprNode right) {
super(left, "&&", right);
this.endLabel = new Label();
}
public <S,E> E accept(ASTVisitor<S,E> visitor) {
return visitor.visit(this);
}
public Label endLabel() {
return endLabel;
}
}

View File

@ -1,19 +1,11 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class LogicalOrNode extends BinaryOpNode {
protected Label endLabel;
public LogicalOrNode(ExprNode left, ExprNode right) {
super(left, "||", right);
this.endLabel = new Label();
}
public <S,E> E accept(ASTVisitor<S,E> visitor) {
return visitor.visit(this);
}
public Label endLabel() {
return endLabel;
}
}

View File

@ -1,35 +1,24 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
import java.util.*;
import java.util.List;
public class SwitchNode extends StmtNode implements BreakableStmt {
public class SwitchNode extends StmtNode {
protected ExprNode cond;
protected List<CaseNode> cases;
protected Label endLabel;
public SwitchNode(Location loc, ExprNode cond, List<CaseNode> cases) {
super(loc);
this.cond = cond;
this.cases = cases;
this.endLabel = new Label();
}
public ExprNode cond() {
return cond;
}
public void setCond(ExprNode cond) {
this.cond = cond;
}
public List<CaseNode> cases() {
return cases;
}
public Label endLabel() {
return endLabel;
}
protected void _dump(Dumper d) {
d.printMember("cond", cond);
d.printNodeList("cases", cases);

View File

@ -1,5 +1,4 @@
package net.loveruby.cflat.ast;
import net.loveruby.cflat.asm.Label;
public class WhileNode extends StmtNode {
protected StmtNode body;