TPH.fresh() kann nicht mehr ohne die Übergabe eines TypeReplacementListeners erfolgen. Keine Lauffähige Version
This commit is contained in:
parent
3cd6b2f792
commit
7a556fbafb
@ -1393,10 +1393,10 @@ formalparameter : type variabledeclaratorid
|
||||
|
||||
// #JB# 31.03.2005
|
||||
// ###########################################################
|
||||
Type T = TypePlaceholder.fresh();
|
||||
//Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier
|
||||
// Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet */
|
||||
// ###########################################################
|
||||
org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());
|
||||
//org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());
|
||||
|
||||
//auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T );
|
||||
FP.set_DeclId($1);
|
||||
|
File diff suppressed because one or more lines are too long
@ -349,7 +349,7 @@ public class MyCompiler implements MyCompilerAPI
|
||||
|
||||
// #JB# 31.03.2005
|
||||
// ###########################################################
|
||||
Methode.setReturnType(TypePlaceholder.fresh());
|
||||
Methode.setReturnType(TypePlaceholder.fresh(Methode));
|
||||
//Methode.setReturnType( new TypePlaceholder("###NEU###") );
|
||||
// ###########################################################
|
||||
|
||||
|
@ -19,6 +19,7 @@ import mycompiler.mystatement.Expr;
|
||||
import mycompiler.mystatement.Literal;
|
||||
import mycompiler.mytype.Type;
|
||||
// ino.end
|
||||
import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent;
|
||||
|
||||
// ino.class.Constant.23212.description type=javadoc
|
||||
/**
|
||||
@ -221,5 +222,17 @@ public class Constant extends FieldDecl
|
||||
//return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replaceType(CReplaceTypeEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTypeLineNumber() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
// ino.end
|
||||
|
@ -77,7 +77,7 @@ public class FieldInitialization extends InstVarDecl {
|
||||
* TODO: Der Feld-Assumption muss ein TPH als Typ hinzugefügt werden, falls er Typlos initialisiert wurde. Dies kann auch der Type-Algorithmus der Inst/FieldVar - Klasse machen.
|
||||
* Wird das Feld mit einem Typ initialisiert so muss dieser auch in die Assumptions.
|
||||
*/
|
||||
if(this.getType() == null)this.setType(TypePlaceholder.fresh());
|
||||
if(this.getType() == null)this.setType(TypePlaceholder.fresh(this));
|
||||
assumptions.add(TypeAssumptions.createFieldVarAssumption(classmember.getName(), this.getName(), this.getType()));
|
||||
classmember.get_ClassBody().addFieldInitialization(this);
|
||||
return assumptions;
|
||||
|
@ -1957,10 +1957,10 @@ case 148:
|
||||
|
||||
/* #JB# 31.03.2005*/
|
||||
/* ###########################################################*/
|
||||
Type T = TypePlaceholder.fresh();
|
||||
/*Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier*/
|
||||
/* Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet * /*/
|
||||
/* ###########################################################*/
|
||||
org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());
|
||||
//org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());
|
||||
|
||||
/*auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T );*/
|
||||
FP.set_DeclId(((DeclId)yyVals[0+yyTop]));
|
||||
|
@ -1393,10 +1393,10 @@ formalparameter : type variabledeclaratorid
|
||||
|
||||
// #JB# 31.03.2005
|
||||
// ###########################################################
|
||||
Type T = TypePlaceholder.fresh();
|
||||
//Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier
|
||||
// Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet */
|
||||
// ###########################################################
|
||||
org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());
|
||||
//org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());
|
||||
|
||||
//auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T );
|
||||
FP.set_DeclId($1);
|
||||
|
@ -243,7 +243,7 @@ public class Block extends Statement
|
||||
throw new TypinferenzException("Falscher Return Type");
|
||||
}
|
||||
else {
|
||||
TypePlaceholder tph = TypePlaceholder.fresh();
|
||||
TypePlaceholder tph = TypePlaceholder.fresh(this);
|
||||
ret.add(new SingleConstraint(this.getTypeVariable(), tph));
|
||||
ret.add(new SingleConstraint(stmt.getTypeVariable(), tph));
|
||||
this.setTypeVariable(tph);
|
||||
|
@ -7,14 +7,18 @@ import java.util.Enumeration;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Iterator;
|
||||
import java.util.Vector;
|
||||
|
||||
import mycompiler.mybytecode.JVMCode;
|
||||
import mycompiler.myclass.UsedId;
|
||||
import mycompiler.myexception.SCException;
|
||||
import mycompiler.mytypereconstruction.CSubstitutionGenVar;
|
||||
import mycompiler.mytypereconstruction.set.CSubstitutionSet;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
// ino.end
|
||||
|
||||
|
||||
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
|
||||
import typinferenz.JavaCodeResult;
|
||||
import typinferenz.ResultSet;
|
||||
|
||||
@ -163,6 +167,8 @@ public class RefType extends Type implements IMatchable
|
||||
// ino.end
|
||||
// ino.method.GenericTypeVar2TypePlaceholder.26652.body
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
/*
|
||||
CSubstitutionSet sub = new CSubstitutionSet();
|
||||
if(parameter != null)
|
||||
{
|
||||
@ -182,6 +188,7 @@ public class RefType extends Type implements IMatchable
|
||||
}
|
||||
}
|
||||
return sub;
|
||||
*/
|
||||
}
|
||||
// ino.end
|
||||
|
||||
|
@ -87,7 +87,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.fresh.26800.definition
|
||||
public static TypePlaceholder fresh()
|
||||
private static TypePlaceholder fresh()
|
||||
// ino.end
|
||||
// ino.method.fresh.26800.body
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
package typinferenz;
|
||||
|
||||
import mycompiler.mytype.Type;
|
||||
import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener;
|
||||
|
||||
public interface Typable {
|
||||
/**
|
||||
|
@ -1,5 +1,7 @@
|
||||
package typinferenz;
|
||||
|
||||
public interface TypeInsertable {
|
||||
import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener;
|
||||
|
||||
public interface TypeInsertable extends ITypeReplacementListener {
|
||||
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ public class TypeAssumptions implements Iterable<CTypeAssumption> {
|
||||
* @return
|
||||
*/
|
||||
public TypeAssumptions add(CTypeAssumption ass){
|
||||
if(ass.getAssumedType()==null)ass.setAssumedType(TypePlaceholder.fresh());
|
||||
if(ass.getAssumedType()==null)throw new NullPointerException();//ass.setAssumedType(TypePlaceholder.fresh());
|
||||
|
||||
//if(ass instanceof CParaTypeAssumption)throw new TypinferenzException("ParameterAssumptions müssen einer Methode zugewiesen sein");
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user