2013-10-18 11:33:46 +00:00
|
|
|
|
// ino.module.This.8654.package
|
|
|
|
|
package mycompiler.mystatement;
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.module.This.8654.import
|
|
|
|
|
import java.util.Hashtable;
|
|
|
|
|
import java.util.Vector;
|
2014-02-09 15:07:31 +00:00
|
|
|
|
|
2014-02-22 03:58:49 +00:00
|
|
|
|
import mycompiler.SyntaxTreeNode;
|
2013-10-18 11:33:46 +00:00
|
|
|
|
import mycompiler.mybytecode.ClassFile;
|
|
|
|
|
import mycompiler.mybytecode.CodeAttribute;
|
|
|
|
|
import mycompiler.mybytecode.JVMCode;
|
|
|
|
|
import mycompiler.myclass.Class;
|
|
|
|
|
import mycompiler.myclass.UsedId;
|
|
|
|
|
import mycompiler.myexception.CTypeReconstructionException;
|
|
|
|
|
import mycompiler.myexception.JVMCodeException;
|
|
|
|
|
import mycompiler.myexception.SCStatementException;
|
|
|
|
|
import mycompiler.mytype.GenericTypeVar;
|
|
|
|
|
import mycompiler.mytype.RefType;
|
|
|
|
|
import mycompiler.mytype.Type;
|
|
|
|
|
import mycompiler.mytypereconstruction.CSupportData;
|
|
|
|
|
import mycompiler.mytypereconstruction.CTriple;
|
|
|
|
|
import mycompiler.mytypereconstruction.set.CSubstitutionSet;
|
|
|
|
|
import mycompiler.mytypereconstruction.set.CTripleSet;
|
|
|
|
|
import mycompiler.mytypereconstruction.set.CTypeAssumptionSet;
|
|
|
|
|
import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption;
|
|
|
|
|
|
|
|
|
|
import org.apache.log4j.Logger;
|
|
|
|
|
// ino.end
|
|
|
|
|
|
2014-02-09 15:07:31 +00:00
|
|
|
|
|
2014-02-22 03:58:49 +00:00
|
|
|
|
|
2013-10-18 11:33:46 +00:00
|
|
|
|
import typinferenz.ConstraintsSet;
|
|
|
|
|
import typinferenz.JavaCodeResult;
|
|
|
|
|
import typinferenz.ResultSet;
|
2014-02-09 15:07:31 +00:00
|
|
|
|
import typinferenz.assumptions.TypeAssumptions;
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ino.class.This.26261.declaration
|
|
|
|
|
public class This extends Expr
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.class.This.26261.body
|
|
|
|
|
{
|
|
|
|
|
// ino.method.This.26265.definition
|
|
|
|
|
public This(int offset,int variableLength)
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.This.26265.body
|
|
|
|
|
{
|
|
|
|
|
super(offset,variableLength);
|
|
|
|
|
}
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
// ino.attribute.arglist.26268.declaration
|
|
|
|
|
public ArgumentList arglist;
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
// ino.attribute.parserlog.26271.declaration
|
|
|
|
|
protected static Logger parserlog = Logger.getLogger("parser");
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ino.method.set_ArgumentList.26274.definition
|
|
|
|
|
public void set_ArgumentList(ArgumentList al)
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.set_ArgumentList.26274.body
|
|
|
|
|
{
|
|
|
|
|
this.arglist = al;
|
|
|
|
|
}
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
public ArgumentList getArgumentList()
|
|
|
|
|
{
|
|
|
|
|
return this.arglist;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ino.method.set_UsedId.26277.definition
|
|
|
|
|
public void set_UsedId(UsedId ui)
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.set_UsedId.26277.body
|
|
|
|
|
{
|
|
|
|
|
this.usedid = ui;
|
|
|
|
|
}
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ino.method.sc_check.26280.definition
|
|
|
|
|
public void sc_check(Vector<Class> classname, Hashtable ch, Hashtable<String, String> bh, boolean ext, Hashtable parach, Hashtable<String, Hashtable> parabh)
|
|
|
|
|
throws SCStatementException
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.sc_check.26280.body
|
|
|
|
|
{
|
|
|
|
|
if(ext)
|
|
|
|
|
parserlog.debug(" ---This---");
|
|
|
|
|
}
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
// ino.method.codegen.26283.definition
|
|
|
|
|
public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist)
|
|
|
|
|
throws JVMCodeException
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.codegen.26283.body
|
|
|
|
|
{
|
|
|
|
|
code.add_code(JVMCode.aload_0);
|
|
|
|
|
}
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
// ino.method.get_Name.26286.definition
|
|
|
|
|
public String get_Name()
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.get_Name.26286.body
|
|
|
|
|
{ return null; }
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
// ino.method.TRExp.26289.defdescription type=javadoc
|
|
|
|
|
/**
|
|
|
|
|
* Implementierung des Algorithmus 5.35 von Martin Pl<EFBFBD>micke
|
|
|
|
|
* <br>Author: J<EFBFBD>rg B<EFBFBD>uerle
|
|
|
|
|
* @param sigma
|
|
|
|
|
* @param V
|
|
|
|
|
* @param supportData
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.TRExp.26289.definition
|
|
|
|
|
public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData)
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.TRExp.26289.body
|
|
|
|
|
{
|
|
|
|
|
CTripleSet ret = new CTripleSet();
|
|
|
|
|
RefType newType;
|
|
|
|
|
Type supportDataType=supportData.getCurrentClassType();
|
|
|
|
|
if(supportDataType instanceof RefType){
|
|
|
|
|
newType=(RefType)supportDataType;
|
|
|
|
|
}else{
|
|
|
|
|
newType=new RefType(supportData.getCurrentClass(),getOffset());
|
|
|
|
|
}
|
|
|
|
|
this.type=newType;
|
|
|
|
|
ret.addElement(new CTriple(sigma, newType,V));
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
// ino.method.TRStatement.26292.definition
|
|
|
|
|
public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData)
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.TRStatement.26292.body
|
|
|
|
|
{
|
|
|
|
|
throw CTypeReconstructionException.createNotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
// ino.method.wandleRefTypeAttributes2GenericAttributes.26295.definition
|
|
|
|
|
public void wandleRefTypeAttributes2GenericAttributes(Vector<Type> paralist, Vector<GenericTypeVar> genericMethodParameters)
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.wandleRefTypeAttributes2GenericAttributes.26295.body
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable)
|
|
|
|
|
{
|
|
|
|
|
if(this.arglist.expr!=null){
|
|
|
|
|
for(Expr n : this.arglist.expr)
|
|
|
|
|
{
|
|
|
|
|
n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable);
|
|
|
|
|
}}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) {
|
|
|
|
|
ConstraintsSet ret = new ConstraintsSet();
|
|
|
|
|
//this.set_Type(new);
|
2014-03-18 19:18:57 +00:00
|
|
|
|
//this.setType(assumptions.getThisValue());//Die Assumption f<>r this als TypeVariable setzen.
|
|
|
|
|
this.setType(new RefType(this.getParentClass().getName(),0));
|
2013-10-18 11:33:46 +00:00
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String toString()
|
|
|
|
|
// ino.end
|
|
|
|
|
// ino.method.toString.25738.body
|
|
|
|
|
{
|
|
|
|
|
//return receiver/*.toString()*/ + " " + usedid.toString();
|
|
|
|
|
return type + " (" + "this" +"(" + this.getArgumentList() + "))";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
|
|
|
|
return new JavaCodeResult("this");
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-22 03:58:49 +00:00
|
|
|
|
@Override
|
|
|
|
|
public Vector<SyntaxTreeNode> getChildren() {
|
|
|
|
|
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
2014-03-17 16:55:55 +00:00
|
|
|
|
|
2013-10-18 11:33:46 +00:00
|
|
|
|
}
|
|
|
|
|
// ino.end
|