Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2

This commit is contained in:
Fayez Abu Alia 2018-06-19 13:32:24 +02:00
commit 162ca3eb27
4 changed files with 12 additions and 9 deletions

View File

@ -2,14 +2,15 @@ import java.lang.Integer;
class Faculty { class Faculty {
Integer mul(Integer x, Integer y) {
return x;
}
m () { m () {
var fact = (Integer x) -> { var fact = (Integer x) -> {
return mul(x, x); if (x == 1) {
return x;
}
else {
return x * fact.apply(x-1);
}
}; };
return fact; return fact;
} }

View File

@ -6,6 +6,6 @@ public class Lambda {
var lam1 = (Integer x) -> { var lam1 = (Integer x) -> {
return x; return x;
}; };
return lam1; return lam1.apply(1);
} }
} }

View File

@ -7,7 +7,7 @@ public class Lambda {
var lam1 = (x) -> { var lam1 = (x) -> {
return x; return x;
}; };
return lam1; return lam1.apply(1);
} }
} }

View File

@ -29,12 +29,12 @@ public class UnifyTest {
execute(new File(rootDirectory+"fc.jav")); execute(new File(rootDirectory+"fc.jav"));
} }
*/ */
/*
@Test @Test
public void lambda() throws IOException, ClassNotFoundException { public void lambda() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"Lambda.jav")); execute(new File(rootDirectory+"Lambda.jav"));
} }
*/
/* /*
@Test @Test
public void lambda2() throws IOException, ClassNotFoundException { public void lambda2() throws IOException, ClassNotFoundException {
@ -74,6 +74,7 @@ public class UnifyTest {
} }
*/ */
/*
@Test @Test
public void matrix() throws IOException, ClassNotFoundException { public void matrix() throws IOException, ClassNotFoundException {
@ -81,6 +82,7 @@ public class UnifyTest {
//JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"Matrix.jav")); //JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"Matrix.jav"));
//compiler.generateBytecode(); //compiler.generateBytecode();
} }
*/
/* /*
@Test @Test