* net/loveruby/cflat/ir/Expr.java: show Expr type on dump.

* net/loveruby/cflat/type/FunctionType.java: FunctionType#toString should separate each argument types by ",".


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4157 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2009-04-26 14:39:59 +00:00
parent 524db547c6
commit 82586f9184
3 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,10 @@
Sun Apr 26 23:39:56 2009 Minero Aoki <aamine@loveruby.net>
* net/loveruby/cflat/ir/Expr.java: show Expr type on dump.
* net/loveruby/cflat/type/FunctionType.java: FunctionType#toString
should separate each argument types by ",".
Sun Apr 26 23:35:07 2009 Minero Aoki <aamine@loveruby.net>
* net/loveruby/cflat/ir: implement IR#dump.

View File

@ -35,6 +35,7 @@ abstract public class Expr implements Dumpable {
public void dump(Dumper d) {
d.printClass(this);
d.printMember("type", type);
_dump(d);
}

View File

@ -65,11 +65,14 @@ public class FunctionType extends Type {
}
public String toString() {
String sep = "";
StringBuffer buf = new StringBuffer();
buf.append(returnType.toString());
buf.append(" (*)(");
for (Type t : paramTypes.types()) {
buf.append(sep);
buf.append(t.toString());
sep = ", ";
}
buf.append(")");
return buf.toString();