Merge branch 'bytecodeGenericsSecond' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecodeGenericsSecond
This commit is contained in:
commit
d8876457db
@ -816,28 +816,15 @@ public class FamilyOfGeneratedGenerics {
|
|||||||
|
|
||||||
public static List<MethodConstraint> methodTypesWithoutClassTypesNEW(String tphToCompute, List<MethodConstraint> cs_m, HashMap<String, List<PairTphMethod<PositionFinder.Position, String>>> posOfTphs) {
|
public static List<MethodConstraint> methodTypesWithoutClassTypesNEW(String tphToCompute, List<MethodConstraint> cs_m, HashMap<String, List<PairTphMethod<PositionFinder.Position, String>>> posOfTphs) {
|
||||||
List<MethodConstraint> tempMC = new ArrayList<>(cs_m);
|
List<MethodConstraint> tempMC = new ArrayList<>(cs_m);
|
||||||
if(tphToCompute==null || tphToCompute.isEmpty()) {
|
List<MethodConstraint> tempMC2 = new ArrayList<>(cs_m);
|
||||||
for(TPHConstraint tphCons: tempMC) {
|
|
||||||
for(String tph: posOfTphs.keySet()){
|
|
||||||
for(PairTphMethod p: posOfTphs.get(tph)) {
|
|
||||||
if(p.fst == PositionFinder.Position.FIELD && tphCons.getLeft() == tph) {
|
|
||||||
String rightTPH = tphCons.getRight();
|
|
||||||
tempMC.remove(tphCons);
|
|
||||||
methodTypesWithoutClassTypesNEW(rightTPH,tempMC,posOfTphs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for(TPHConstraint tphCons: tempMC) {
|
for(TPHConstraint tphCons: tempMC) {
|
||||||
if(tphCons.getLeft() == tphToCompute) {
|
if(tphCons.getLeft() == tphToCompute) {
|
||||||
String newRightTPH = tphCons.getRight();
|
String newRightTPH = tphCons.getRight();
|
||||||
tempMC.remove(tphCons);
|
tempMC2.remove(tphCons);
|
||||||
methodTypesWithoutClassTypesNEW(newRightTPH,tempMC,posOfTphs);
|
tempMC2 = methodTypesWithoutClassTypesNEW(newRightTPH,tempMC2,posOfTphs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
return tempMC2;
|
||||||
return tempMC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -888,7 +875,13 @@ public class FamilyOfGeneratedGenerics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// mcWithoutCc = methodTypesWithoutClassTypes(cs_cl, listToAdd);
|
// mcWithoutCc = methodTypesWithoutClassTypes(cs_cl, listToAdd);
|
||||||
mcWithoutCc = methodTypesWithoutClassTypesNEW(null, listToAdd, posOfTphs);
|
for(String tph: posOfTphs.keySet()) {
|
||||||
|
for (PairTphMethod p : posOfTphs.get(tph)) {
|
||||||
|
if(p.fst == PositionFinder.Position.FIELD) {
|
||||||
|
mcWithoutCc = methodTypesWithoutClassTypesNEW(tph, listToAdd, posOfTphs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tempMethodConstraintsWithPosition.put(currentMethod, mcWithoutCc);
|
tempMethodConstraintsWithPosition.put(currentMethod, mcWithoutCc);
|
||||||
}
|
}
|
||||||
|
@ -65,11 +65,13 @@ public class TestTwoArgs {
|
|||||||
Set<MethodConstraint> lmc;
|
Set<MethodConstraint> lmc;
|
||||||
lmc = new HashSet<>();
|
lmc = new HashSet<>();
|
||||||
lmc.add(new MethodConstraint("P", "AL", Relation.EXTENDS));
|
lmc.add(new MethodConstraint("P", "AL", Relation.EXTENDS));
|
||||||
|
lmc.add(new MethodConstraint("AL", "java/lang/Object", Relation.EXTENDS));
|
||||||
methodConstraintsWithPositionTest.put("TPH ALid(TPH P)", lmc);
|
methodConstraintsWithPositionTest.put("TPH ALid(TPH P)", lmc);
|
||||||
lmc = new HashSet<>();
|
lmc = new HashSet<>();
|
||||||
lmc.add(new MethodConstraint("AL", "AF", Relation.EXTENDS));
|
lmc.add(new MethodConstraint("AL", "AF", Relation.EXTENDS));
|
||||||
lmc.add(new MethodConstraint("Z", "P", Relation.EXTENDS));
|
lmc.add(new MethodConstraint("Z", "P", Relation.EXTENDS));
|
||||||
lmc.add(new MethodConstraint("P", "AL", Relation.EXTENDS));
|
lmc.add(new MethodConstraint("P", "AL", Relation.EXTENDS));
|
||||||
|
lmc.add(new MethodConstraint("AF", "java/lang/Object", Relation.EXTENDS));
|
||||||
methodConstraintsWithPositionTest.put("TPH AFm(TPH AFTPH Z)", lmc);
|
methodConstraintsWithPositionTest.put("TPH AFm(TPH AFTPH Z)", lmc);
|
||||||
lmc = new HashSet<>();
|
lmc = new HashSet<>();
|
||||||
lmc.add(new MethodConstraint("T", "AP", Relation.EXTENDS));
|
lmc.add(new MethodConstraint("T", "AP", Relation.EXTENDS));
|
||||||
|
Loading…
Reference in New Issue
Block a user