Merge branch 'targetBytecode' of gohorb.ba-horb.de:/bahome/projekt/git/JavaCompilerCore into targetBytecode
This commit is contained in:
commit
6cc40162da
@ -68,7 +68,7 @@ public class JavaTXCompiler {
|
|||||||
|
|
||||||
// public static JavaTXCompiler INSTANCE;
|
// public static JavaTXCompiler INSTANCE;
|
||||||
final CompilationEnvironment environment;
|
final CompilationEnvironment environment;
|
||||||
Boolean resultmodel = false;
|
Boolean resultmodel = true;
|
||||||
public final Map<File, SourceFile> sourceFiles = new HashMap<>();
|
public final Map<File, SourceFile> sourceFiles = new HashMap<>();
|
||||||
|
|
||||||
Boolean log = false; //gibt an ob ein Log-File nach System.getProperty("user.dir")+""/logFiles/"" geschrieben werden soll?
|
Boolean log = false; //gibt an ob ein Log-File nach System.getProperty("user.dir")+""/logFiles/"" geschrieben werden soll?
|
||||||
|
@ -2024,7 +2024,15 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
if (((pairOp == PairOperator.SMALLERDOT) || (pairOp == PairOperator.SMALLERNEQDOT)) && lhsType instanceof PlaceholderType) {
|
if (((pairOp == PairOperator.SMALLERDOT) || (pairOp == PairOperator.SMALLERNEQDOT)) && lhsType instanceof PlaceholderType) {
|
||||||
//System.out.println(pair);
|
//System.out.println(pair);
|
||||||
if (first) { //writeLog(pair.toString()+"\n");
|
if (first) { //writeLog(pair.toString()+"\n");
|
||||||
Set<Set<UnifyPair>> x1 = unifyCase1(pair, fc);
|
Set<Set<UnifyPair>> x1 = new HashSet<>();
|
||||||
|
if (pair.getRhsType().getName().equals("void")) {
|
||||||
|
Set<UnifyPair> resultOne = new HashSet<>();
|
||||||
|
resultOne.add(new UnifyPair (pair.getLhsType(), pair.getRhsType(), PairOperator.EQUALSDOT, pair.getSubstitution(), pair));
|
||||||
|
x1.add(resultOne);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
x1 = unifyCase1(pair, fc);
|
||||||
|
}
|
||||||
if (pairOp == PairOperator.SMALLERNEQDOT) {
|
if (pairOp == PairOperator.SMALLERNEQDOT) {
|
||||||
Set<UnifyPair> remElem = new HashSet<>();
|
Set<UnifyPair> remElem = new HashSet<>();
|
||||||
remElem.add(new UnifyPair(pair.getLhsType(), pair.getRhsType(), PairOperator.EQUALSDOT));
|
remElem.add(new UnifyPair(pair.getLhsType(), pair.getRhsType(), PairOperator.EQUALSDOT));
|
||||||
@ -2156,7 +2164,15 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
// Case 5: (Theta <. a)
|
// Case 5: (Theta <. a)
|
||||||
else if ((pairOp == PairOperator.SMALLERDOT) && rhsType instanceof PlaceholderType)
|
else if ((pairOp == PairOperator.SMALLERDOT) && rhsType instanceof PlaceholderType)
|
||||||
if (first) { //writeLog(pair.toString()+"\n");
|
if (first) { //writeLog(pair.toString()+"\n");
|
||||||
Set<Set<UnifyPair>> x1 = unifyCase5(pair, fc);
|
Set<Set<UnifyPair>> x1 = new HashSet<>();
|
||||||
|
if (pair.getLhsType().getName().equals("void")) {
|
||||||
|
Set<UnifyPair> resultOne = new HashSet<>();
|
||||||
|
resultOne.add(new UnifyPair (pair.getRhsType(), pair.getLhsType(), PairOperator.EQUALSDOT, pair.getSubstitution(), pair));
|
||||||
|
x1.add(resultOne);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
x1 = unifyCase5(pair, fc);
|
||||||
|
}
|
||||||
result.get(4).add(x1);
|
result.get(4).add(x1);
|
||||||
if (x1.isEmpty()) {
|
if (x1.isEmpty()) {
|
||||||
undefined.add(pair); //Theta ist nicht im FC
|
undefined.add(pair); //Theta ist nicht im FC
|
||||||
|
@ -234,6 +234,7 @@ public class TestComplete {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
//@Ignore("This is to complex")
|
||||||
public void matrixTest() throws Exception {
|
public void matrixTest() throws Exception {
|
||||||
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Matrix.jav");
|
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Matrix.jav");
|
||||||
var matrix = classFiles.get("Matrix");
|
var matrix = classFiles.get("Matrix");
|
||||||
|
Loading…
Reference in New Issue
Block a user