forked from JavaTX/JavaCompilerCore
merge
This commit is contained in:
commit
66da1d2638
@ -3,7 +3,7 @@
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry excluding=".classpath|.cvsignore|.externalToolBuilders/|.project|.settings/|Papers/|bin/|doc/|examples/|lib/|notizen/|src/|test/|tools/" including="log4j.xml" kind="src" path=""/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 8 [1.8.0]"/>
|
||||
<classpathentry kind="lib" path="lib/junit-4.0.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
3
bin/.gitignore
vendored
3
bin/.gitignore
vendored
@ -1,2 +1,5 @@
|
||||
/de/
|
||||
/plugindevelopment/
|
||||
=======
|
||||
/syntaxTree/
|
||||
/bytecode/
|
||||
|
@ -250,7 +250,7 @@ public class CodeAttribute extends Attribute
|
||||
|
||||
|
||||
// ino.method.codegen.21757.definition
|
||||
public void codegen(ClassFile classfile, FileOutputStream f)
|
||||
public void codegen(ClassFile classfile, OutputStream f)
|
||||
throws JVMCodeException, IOException
|
||||
// ino.end
|
||||
// ino.method.codegen.21757.body
|
||||
@ -1088,11 +1088,11 @@ public class CodeAttribute extends Attribute
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public void codegen(ClassFile classfile, OutputStream f)
|
||||
throws JVMCodeException, IOException {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
// @Override
|
||||
// public void codegen(ClassFile classfile, OutputStream f)
|
||||
// throws JVMCodeException, IOException {
|
||||
// throw new NotImplementedException();
|
||||
// }
|
||||
|
||||
}
|
||||
// ino.end
|
||||
|
@ -186,7 +186,7 @@ public class SignatureInfo extends Attribute
|
||||
// ino.end
|
||||
|
||||
// ino.method.codegen.22987.definition
|
||||
public void codegen(ClassFile classfile, FileOutputStream f)
|
||||
public void codegen(ClassFile classfile, OutputStream f)
|
||||
throws JVMCodeException, IOException
|
||||
// ino.end
|
||||
// ino.method.codegen.22987.body
|
||||
@ -266,11 +266,11 @@ public class SignatureInfo extends Attribute
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public void codegen(ClassFile classfile, OutputStream f)
|
||||
throws JVMCodeException, IOException {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
// @Override
|
||||
// public void codegen(ClassFile classfile, OutputStream f)
|
||||
// throws JVMCodeException, IOException {
|
||||
// throw new NotImplementedException();
|
||||
// }
|
||||
|
||||
}
|
||||
// ino.end
|
||||
|
@ -16,6 +16,9 @@ public class ConstraintType{
|
||||
public ConstraintType(RefType t){
|
||||
this.t = t;
|
||||
}
|
||||
public ConstraintType(WildcardType t){
|
||||
this.t = t;
|
||||
}
|
||||
public Type getType() {
|
||||
return t;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import de.dhbwstuttgart.syntaxtree.type.WildcardType;
|
||||
import de.dhbwstuttgart.typeinference.ConstraintType;
|
||||
import de.dhbwstuttgart.typeinference.FunN;
|
||||
import de.dhbwstuttgart.typeinference.FunNInterface;
|
||||
@ -285,6 +286,13 @@ public class TypeAssumptions {
|
||||
* @return null, falls der Typ nicht vorhanden ist.
|
||||
*/
|
||||
public ConstraintType getTypeFor(Type t, SyntaxTreeNode inNode){
|
||||
if(t instanceof WildcardType){
|
||||
WildcardType wt = (WildcardType)t;
|
||||
Type innerType = wt.GetWildcardType();
|
||||
innerType = getTypeFor(innerType, t).getType();
|
||||
wt.SetWildcardType(innerType);
|
||||
return new ConstraintType(wt);
|
||||
}
|
||||
|
||||
if(t instanceof TypePlaceholder)
|
||||
return new ConstraintType((TypePlaceholder)t); //Handelt es sich um einen TypePlaceholder kann dieser nicht in den Assumptions vorkommen.
|
||||
|
@ -2400,6 +2400,36 @@ throws MatchException
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//Wildcard ergänzt PL 12-12-05
|
||||
if ( T instanceof ExtendsWildcardType )
|
||||
{
|
||||
Type Temp = ((ExtendsWildcardType) T).get_ExtendsType();
|
||||
if( Temp instanceof TypePlaceholder )
|
||||
{
|
||||
|
||||
if( Temp.getName().equals(a.getName()) )
|
||||
{
|
||||
// Typvariable ersetzen
|
||||
((ExtendsWildcardType) T).SetWildcardType(o);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( T instanceof SuperWildcardType )
|
||||
{
|
||||
Type Temp = ((SuperWildcardType) T).get_SuperType();
|
||||
if( Temp instanceof TypePlaceholder )
|
||||
{
|
||||
|
||||
if( Temp.getName().equals(a.getName()) )
|
||||
{
|
||||
// Typvariable ersetzen
|
||||
((SuperWildcardType) T).SetWildcardType(o);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// ino.end
|
||||
|
BIN
tools/jay.darwin
BIN
tools/jay.darwin
Binary file not shown.
Loading…
Reference in New Issue
Block a user