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