From b3e4eebdc125860d03a9a3b8d1de822c8ba9eac7 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 6 Mar 1999 21:32:16 +0000 Subject: [PATCH] BinaryType doesn't correlate the type anymore git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@303 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/BinaryOperator.java | 36 +++++++++++++----------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/jode/jode/expr/BinaryOperator.java b/jode/jode/expr/BinaryOperator.java index 915f7af..3e1be43 100644 --- a/jode/jode/expr/BinaryOperator.java +++ b/jode/jode/expr/BinaryOperator.java @@ -20,18 +20,14 @@ package jode.expr; import jode.Type; -public class BinaryOperator extends Operator { +public class BinaryOperator extends SimpleOperator { protected Type operandType; public BinaryOperator(Type type, int op) { - super(type, op); + super(type, op, 2); operandType = type; } - public int getOperandCount() { - return 2; - } - public int getPriority() { switch (operator) { case 1: case 2: @@ -61,22 +57,22 @@ public class BinaryOperator extends Operator { return getPriority() + i; } - public Type getOperandType(int i) { - return operandType; - } +// public Type getOperandType(int i) { +// return operandType; +// } - public void setOperandType(Type[] inputTypes) { - operandType = operandType - .intersection(inputTypes[0]).intersection(inputTypes[1]); - type = operandType; - } +// public void setOperandType(Type[] inputTypes) { +// operandType = operandType +// .intersection(inputTypes[0]).intersection(inputTypes[1]); +// type = operandType; +// } - /** - * Sets the return type of this operator. - */ - public void setType(Type newType) { - type = operandType = operandType.intersection(newType); - } +// /** +// * Sets the return type of this operator. +// */ +// public void setType(Type newType) { +// type = operandType = operandType.intersection(newType); +// } public boolean equals(Object o) { return (o instanceof BinaryOperator) &&