Improve lua2java code generation.
This commit is contained in:
@@ -34,7 +34,7 @@ public class TailcallVarargs extends Varargs {
|
||||
|
||||
public TailcallVarargs(LuaValue object, LuaValue methodname, Varargs args) {
|
||||
this.func = object.get(methodname);
|
||||
this.args = args;
|
||||
this.args = LuaValue.varargsOf(object, args);
|
||||
}
|
||||
|
||||
public boolean isTailcall() {
|
||||
|
||||
@@ -243,7 +243,7 @@ public class JavaCodeGen {
|
||||
}
|
||||
}
|
||||
|
||||
private void multiAssign(List varsOrNames, List<Exp> exps) {
|
||||
private void multiAssign(final List varsOrNames, List<Exp> exps) {
|
||||
final boolean[] needsTmpvarsMultiAssign = { false };
|
||||
if ( exps.size() > 1 ) {
|
||||
new Visitor() {
|
||||
@@ -252,6 +252,7 @@ public class JavaCodeGen {
|
||||
public void visit(FuncCall exp) { needsTmpvarsMultiAssign[0] = true; }
|
||||
public void visit(IndexExp exp) { needsTmpvarsMultiAssign[0] = true; }
|
||||
public void visit(MethodCall exp) { needsTmpvarsMultiAssign[0] = true; }
|
||||
public void visit(NameExp exp) { needsTmpvarsMultiAssign[0] = true; }
|
||||
}.visitExps(exps);
|
||||
}
|
||||
if ( needsTmpvarsMultiAssign[0] )
|
||||
|
||||
Reference in New Issue
Block a user