diff --git a/ChangeLog b/ChangeLog index 9cfe916..e7e6312 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed May 6 14:54:27 2009 Minero Aoki + + * net/loveruby/cflat/compiler/IRGenerator.java: isStatement() did + not work correctly; e.g. return ++argc failed to return value, + because ++argc was wrongly judged as statemen (is really expr). + Wed May 6 14:19:12 2009 Minero Aoki * net/loveruby/cflat/ir/StringValue.java -> Str.java diff --git a/net/loveruby/cflat/compiler/IRGenerator.java b/net/loveruby/cflat/compiler/IRGenerator.java index f1eb432..0a05cce 100644 --- a/net/loveruby/cflat/compiler/IRGenerator.java +++ b/net/loveruby/cflat/compiler/IRGenerator.java @@ -23,7 +23,7 @@ class IRGenerator implements ASTVisitor { typeTable = ast.typeTable(); for (DefinedVariable var : ast.definedVariables()) { if (var.hasInitializer()) { - var.setIR(transform(var.initializer())); + var.setIR(transformExpr(var.initializer())); } } for (DefinedFunction f : ast.definedFunctions()) { @@ -52,7 +52,7 @@ class IRGenerator implements ASTVisitor { breakStack = new LinkedList