forked from JavaTX/JavaCompilerCore
57 lines
2.0 KiB
Java
Executable File
57 lines
2.0 KiB
Java
Executable File
// ino.module.MulOp.8605.package
|
|
package de.dhbwstuttgart.syntaxtree.operator;
|
|
// ino.end
|
|
|
|
// ino.module.MulOp.8605.import
|
|
import java.util.HashMap;
|
|
import java.util.Hashtable;
|
|
import java.util.Iterator;
|
|
import java.util.Vector;
|
|
|
|
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
|
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.MulOp.24231.declaration
|
|
public abstract class MulOp extends Operator
|
|
// ino.end
|
|
// ino.class.MulOp.24231.body
|
|
{
|
|
// ino.method.MulOp.24235.definition
|
|
public MulOp(int offset, int variableLength)
|
|
// ino.end
|
|
// ino.method.MulOp.24235.body
|
|
{
|
|
super(offset, variableLength);
|
|
}
|
|
// ino.end
|
|
|
|
@Override
|
|
protected Hashtable<RefType, RefType> getOperatorTypes() {
|
|
Hashtable<RefType, RefType> types = new Hashtable<RefType, RefType>();
|
|
|
|
|
|
return types;
|
|
}
|
|
|
|
@Override
|
|
public HashMap<ConstraintType,ConstraintType> getReturnTypes(TypeAssumptions ass) {
|
|
HashMap<ConstraintType,ConstraintType> ret = new HashMap<>();
|
|
ret.put(ass.getTypeFor(new RefType("java.lang.Integer",this,-1), this), ass.getTypeFor(new RefType("java.lang.Integer",this,-1), this));
|
|
ret.put(ass.getTypeFor(new RefType("java.lang.Double",this,-1), this), ass.getTypeFor(new RefType("java.lang.Double",this,-1), this));
|
|
ret.put(ass.getTypeFor(new RefType("java.lang.Float",this,-1), this), ass.getTypeFor(new RefType("java.lang.Float",this,-1), this));
|
|
ret.put(ass.getTypeFor(new RefType("java.lang.Long",this,-1), this), ass.getTypeFor(new RefType("java.lang.Long",this,-1), this));
|
|
|
|
return ret;
|
|
}
|
|
|
|
|
|
}
|
|
// ino.end
|