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

This commit is contained in:
pl@gohorb.ba-horb.de 2021-03-26 20:55:25 +01:00
commit 66a25a56c0

View File

@ -814,14 +814,17 @@ 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(List<String> tphsToCompute, List<MethodConstraint> cs_m, HashMap<String, List<PairTphMethod<PositionFinder.Position, String>>> posOfTphs) {
List<MethodConstraint> tempMC = new ArrayList<>(cs_m);
List<MethodConstraint> tempMC2 = new ArrayList<>(cs_m);
for(TPHConstraint tphCons: tempMC) {
if(tphCons.getLeft() == tphToCompute) {
String newRightTPH = tphCons.getRight();
tempMC2.remove(tphCons);
tempMC2 = methodTypesWithoutClassTypesNEW(newRightTPH,tempMC2,posOfTphs);
List<String> toRemove = new ArrayList<>();
for(String tph: tphsToCompute) {
for(TPHConstraint tphCons: tempMC) {
if(tphCons.getLeft() == tph) {
toRemove.add(tphCons.getRight());
tempMC2.remove(tphCons);
tempMC2 = methodTypesWithoutClassTypesNEW(toRemove,tempMC2,posOfTphs);
}
}
}
return tempMC2;
@ -875,10 +878,12 @@ public class FamilyOfGeneratedGenerics {
}
mcWithoutCc = listToAdd;
List<String> tphs = new ArrayList<>();
for(String tph: posOfTphs.keySet()) {
for (PairTphMethod p : posOfTphs.get(tph)) {
if(p.fst == PositionFinder.Position.FIELD) {
mcWithoutCc = methodTypesWithoutClassTypesNEW(tph, listToAdd, posOfTphs);
tphs.add(tph);
mcWithoutCc = methodTypesWithoutClassTypesNEW(tphs, listToAdd, posOfTphs);
}
}
}