kleine Aenderung

This commit is contained in:
Fayez Abu Alia 2017-11-03 14:17:36 +01:00
parent e18439918c
commit 5a026a431c
3 changed files with 5 additions and 3 deletions

View File

@ -175,8 +175,10 @@ public class BytecodeGenMethod implements StatementVisitor{
MethodVisitor mvLambdaBody = cw.visitMethod(Opcodes.ACC_PRIVATE+ Opcodes.ACC_STATIC + Opcodes.ACC_SYNTHETIC,
methodName, arg3.toString(), null, null);
// new BytecodeGenLambda(lambdaExpression, mvLambdaBody);
HashMap<String, Integer> paramsAndLocalsLambda = new HashMap<>();
new BytecodeGenMethod(lambdaExpression, mvLambdaBody, paramsAndLocalsLambda, arg3.toString());
new BytecodeGenMethod(lambdaExpression, mvLambdaBody, new HashMap<>(), arg3.toString());
mv.visitVarInsn(Opcodes.ASTORE, paramsAndLocalsLambda.size());
mvLambdaBody.visitMaxs(0, 0);
mvLambdaBody.visitEnd();
}

View File

@ -51,7 +51,7 @@ public class JavaTXCompilerTest {
byte[] bytecode = classFiles.get(name);
try {
System.out.println("generating .class file");
output = new FileOutputStream(new File(System.getProperty("user.dir") + "/testBytecode/" +name+".class"));
output = new FileOutputStream(new File(System.getProperty("user.dir") + "/testBytecode/generatedBC/" +name+".class"));
output.write(bytecode);
output.close();
System.out.println(".class file generated");

View File

@ -4,6 +4,6 @@ import java.io.File;
public class FiniteClosureTest extends JavaTXCompilerTest{
public FiniteClosureTest() {
this.fileToTest = new File(rootDirectory+"fc.jav");
// this.fileToTest = new File(rootDirectory+"fc.jav");
}
}