Bug in MatrixTest gefixt. Die richtige Descriptor von MethodCalls wird erzeugt
This commit is contained in:
parent
67469bbb84
commit
d010c843df
@ -767,7 +767,7 @@ public class BytecodeGenMethod implements StatementVisitor {
|
||||
System.out.println("Methods of " + receiverName + " ");
|
||||
java.lang.reflect.Method methodRefl = null;
|
||||
String clazz = receiverName.replace("/", ".");
|
||||
if(!receiverName.equals(className)) {
|
||||
// if(!receiverName.equals(className)) {
|
||||
ClassLoader cLoader = ClassLoader.getSystemClassLoader();
|
||||
// This will be used if the class is not standard class (not in API)
|
||||
ClassLoader cLoader2;
|
||||
@ -847,7 +847,7 @@ public class BytecodeGenMethod implements StatementVisitor {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
methodCall.receiver.accept(this);
|
||||
|
||||
@ -861,6 +861,7 @@ public class BytecodeGenMethod implements StatementVisitor {
|
||||
mDesc = method.accept(new DescriptorToString(resultSet));
|
||||
methodCall.arglist.accept(this);
|
||||
} else {
|
||||
System.out.println(methodCall.name + " -> Refl != null");
|
||||
receiverRefl = methodRefl.getAnnotatedReceiverType().getType().toString();
|
||||
for(Parameter p:methodRefl.getParameters()) {
|
||||
System.out.println(p.getName() + " und is Primitive = " + p.getType().isPrimitive());
|
||||
@ -876,7 +877,7 @@ public class BytecodeGenMethod implements StatementVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("Methodcall Desc : " + mDesc);
|
||||
System.out.println("Methodcall ("+ methodCall.name +") Desc : " + mDesc);
|
||||
|
||||
|
||||
// methodCall.arglist.accept(this);
|
||||
|
@ -201,16 +201,20 @@ public class Simplify {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// finder looks for constraints that have the same left hand side
|
||||
// and put them in a list
|
||||
ConstraintsFinder finder = new ConstraintsFinder(allCons);
|
||||
List<List<TPHConstraint>> foundCons = finder.findConstraints();
|
||||
|
||||
ArrayList<TPHConstraint> eqCons = new ArrayList<>();
|
||||
|
||||
for(List<TPHConstraint> list : foundCons) {
|
||||
// generate a new name and replace the right hand side for each constraint
|
||||
// in list with the new name
|
||||
NameReplacer replacer = new NameReplacer(list,allCons,methodTphs);
|
||||
// new name -> [all old names]
|
||||
Map<String, List<String>> replRes = replacer.replaceNames();
|
||||
|
||||
// create an equal constraint for each value in repres
|
||||
String key = replRes.keySet().iterator().next();
|
||||
for(String val : replRes.values().iterator().next()) {
|
||||
EqualConstraint ec = new EqualConstraint(val, key, Relation.EQUAL);
|
||||
|
Loading…
Reference in New Issue
Block a user