2013-10-18 11:33:46 +00:00
|
|
|
// ino.module.RelOp.8610.package
|
2014-09-02 08:33:54 +00:00
|
|
|
package de.dhbwstuttgart.syntaxtree.operator;
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.end
|
|
|
|
|
|
|
|
// ino.module.RelOp.8610.import
|
2014-05-07 06:10:55 +00:00
|
|
|
import java.util.HashMap;
|
2013-10-18 11:33:46 +00:00
|
|
|
import java.util.Hashtable;
|
|
|
|
import java.util.Iterator;
|
|
|
|
import java.util.Vector;
|
2014-04-23 15:59:39 +00:00
|
|
|
|
2014-09-02 08:33:54 +00:00
|
|
|
import de.dhbwstuttgart.syntaxtree.statement.Binary;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.Pair;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.Type;
|
|
|
|
import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
|
|
|
|
import de.dhbwstuttgart.typeinference.exceptions.DebugException;
|
2014-09-02 09:07:16 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.unify.Unify;
|
2013-10-18 11:33:46 +00:00
|
|
|
import mycompiler.mybytecode.ClassFile;
|
|
|
|
import mycompiler.mybytecode.CodeAttribute;
|
|
|
|
import mycompiler.myexception.CTypeReconstructionException;
|
|
|
|
import mycompiler.myexception.JVMCodeException;
|
|
|
|
import mycompiler.mytypereconstruction.CSupportData;
|
|
|
|
import mycompiler.mytypereconstruction.CTriple;
|
|
|
|
import mycompiler.mytypereconstruction.set.CSubstitutionSet;
|
|
|
|
import mycompiler.mytypereconstruction.set.CTripleSet;
|
|
|
|
import mycompiler.mytypereconstruction.set.CTypeAssumptionSet;
|
|
|
|
|
|
|
|
// ino.class.RelOp.24299.declaration
|
|
|
|
public abstract class RelOp extends Operator
|
|
|
|
// ino.end
|
|
|
|
// ino.class.RelOp.24299.body
|
|
|
|
{
|
|
|
|
// ino.method.RelOp.24303.definition
|
|
|
|
public RelOp(int offset, int variableLength)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.RelOp.24303.body
|
|
|
|
{
|
|
|
|
super(offset, variableLength);
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
// ino.method.if_codegen.24306.declaration
|
|
|
|
public abstract void if_codegen(ClassFile classfile, CodeAttribute code, String type, boolean not)
|
|
|
|
throws JVMCodeException;
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
protected Hashtable<RefType, RefType> getOperatorTypes() {
|
|
|
|
Hashtable<RefType, RefType> types = new Hashtable<RefType, RefType>();
|
|
|
|
|
|
|
|
types.put(new RefType("java.lang.Integer",-1), new RefType("java.lang.Boolean",-1));
|
|
|
|
types.put(new RefType("java.lang.Double",-1), new RefType("java.lang.Boolean",-1));
|
|
|
|
types.put(new RefType("java.lang.Float",-1), new RefType("java.lang.Boolean",-1));
|
|
|
|
types.put(new RefType("java.lang.Long",-1), new RefType("java.lang.Boolean",-1));
|
|
|
|
|
|
|
|
return types;
|
|
|
|
}
|
|
|
|
|
2014-04-23 15:59:39 +00:00
|
|
|
@Override
|
2014-05-07 06:10:55 +00:00
|
|
|
public HashMap<Type,Type> getReturnTypes(TypeAssumptions ass) {
|
|
|
|
HashMap<Type,Type> ret = new HashMap<Type,Type>();
|
2014-08-11 12:35:33 +00:00
|
|
|
ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this));
|
|
|
|
ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this));
|
|
|
|
ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this));
|
|
|
|
ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Long",-1), this));
|
2014-05-07 06:10:55 +00:00
|
|
|
|
2014-04-23 15:59:39 +00:00
|
|
|
return ret;
|
2014-04-24 10:42:10 +00:00
|
|
|
}
|
2014-05-07 06:10:55 +00:00
|
|
|
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
// ino.end
|