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

Conflicts:
	test/bytecode/javFiles/Lambda.jav
This commit is contained in:
Martin Plümicke 2018-08-09 15:34:57 +02:00
commit 6bdd347298
6 changed files with 10 additions and 19 deletions

View File

@ -119,7 +119,7 @@ public class Signature {
if(!ret.equals("V")) { if(!ret.equals("V")) {
// TODO TypeToSignature nochmal kontrollieren und schauen ob man dort wirklich // TODO TypeToSignature nochmal kontrollieren und schauen ob man dort wirklich
// T... braucht und L ... // T... braucht und L ...
if(ret.contains("$") && !ret.contains("$$")) { if(ret.contains("$") && !ret.contains("$$") && !ret.contains("<")) {
if(genericsAndBounds.containsKey(ret)) { if(genericsAndBounds.containsKey(ret)) {
genericsAndBoundsMethod.put(ret.substring(1), genericsAndBounds.get(ret.substring(1))); genericsAndBoundsMethod.put(ret.substring(1), genericsAndBounds.get(ret.substring(1)));
}else { }else {
@ -233,6 +233,7 @@ public class Signature {
if(p instanceof WildcardType) { if(p instanceof WildcardType) {
if(((WildcardType) p).getInnerType() instanceof GenericRefType) { if(((WildcardType) p).getInnerType() instanceof GenericRefType) {
String name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType()); String name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType());
System.out.println("NAME WC = " + name);
if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) { if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) {
sw.visitFormalTypeParameter(name); sw.visitFormalTypeParameter(name);
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class)); sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));

View File

@ -34,7 +34,7 @@ public class TypeToSignature implements TypeVisitor<String> {
// params += "L"+param.toString().replace(".", "/"); // params += "L"+param.toString().replace(".", "/");
// } // }
params += param.acceptTV(new TypeToSignature()); params += param.acceptTV(new TypeToSignature());
if(param instanceof TypePlaceholder) if(!(param instanceof RefType))
params += ";"; params += ";";
// if(it.hasNext())params += ";"; // if(it.hasNext())params += ";";
} }

View File

@ -42,7 +42,7 @@ public class GenericsResolverSameName implements GenericsResolver, TypeVisitor<R
@Override @Override
public RefTypeOrTPHOrWildcardOrGeneric visit(ExtendsWildcardType extendsWildcardType) { public RefTypeOrTPHOrWildcardOrGeneric visit(ExtendsWildcardType extendsWildcardType) {
return new SuperWildcardType(extendsWildcardType.getInnerType().acceptTV(this), extendsWildcardType.getOffset()); return new ExtendsWildcardType(extendsWildcardType.getInnerType().acceptTV(this), extendsWildcardType.getOffset());
} }
@Override @Override

View File

@ -7,5 +7,4 @@ public class Lambda {
return x; return x;
}; };
return lam1; return lam1;
}
} }

View File

@ -10,11 +10,11 @@ class Merge {
} }
/*
sort(in){ sort(in){
var firstHalf = in.subList(1,2); var firstHalf = in.subList(1,2);
var secondHalf = in.subList(1,2); var secondHalf = in.subList(1,2);
return merge(sort(firstHalf), sort(secondHalf)); return merge(sort(firstHalf), sort(secondHalf));
} }
*/
} }

View File

@ -1,29 +1,20 @@
import java.lang.String; import java.lang.String;
import java.lang.Integer; import java.lang.Integer;
import java.lang.Double; import java.lang.Double;
import java.lang.String;
<<<<<<< HEAD
public class OL {
m(x) { return x + x; } public class OL {
=======
class OL {
m(x) { return x + x; } m(x) { return x + x; }
>>>>>>> 3fedbcc4a0e015ec8f5f6ccb77081f888135c850
} }
<<<<<<< HEAD
public class OLMain {
=======
class OLMain {
>>>>>>> 3fedbcc4a0e015ec8f5f6ccb77081f888135c850
main(java.lang.Integer x) { public class OLMain {
main(x) {
var ol; var ol;
ol = new OL(); ol = new OL();
return ol.m(x); return ol.m(x);