// ino.module.RelOp.8610.package package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.RelOp.8610.import import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; // 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 getOperatorTypes() { Hashtable types = new Hashtable(); types.put(new RefType("java.lang.Integer",this,-1), new RefType("java.lang.Boolean",this,-1)); types.put(new RefType("java.lang.Double",this,-1), new RefType("java.lang.Boolean",this,-1)); types.put(new RefType("java.lang.Float",this,-1), new RefType("java.lang.Boolean",this,-1)); types.put(new RefType("java.lang.Long",this,-1), new RefType("java.lang.Boolean",this,-1)); return types; } @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap<>(); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Integer",this,-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Double",this,-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Float",this,-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Long",this,-1), this)); return ret; } } // ino.end