Revert "more sane types for StackValue.cmp()"

This reverts commit 5bebb848b6.

Conflicts:

	idea/src/org/jetbrains/jet/codegen/StackValue.java
This commit is contained in:
Dmitry Jemerov
2011-04-08 20:03:42 +02:00
parent 5a0a03c1e4
commit a83643c5e2
2 changed files with 5 additions and 5 deletions
@@ -594,7 +594,7 @@ public class ExpressionCodegen extends JetVisitor {
private void generateCompareOp(JetBinaryExpression expression, IElementType opToken, Type type) {
gen(expression.getLeft(), type);
gen(expression.getRight(), type);
myStack.push(StackValue.cmp(opToken));
myStack.push(StackValue.cmp(opToken, type));
}
private void generateAssignmentExpression(JetBinaryExpression expression) {
@@ -32,8 +32,8 @@ public abstract class StackValue {
return new Constant(value, type);
}
public static StackValue cmp(IElementType opToken) {
return new NumberCompare(opToken);
public static StackValue cmp(IElementType opToken, Type type) {
return new NumberCompare(opToken, type);
}
public static StackValue not(StackValue stackValue) {
@@ -173,8 +173,8 @@ public abstract class StackValue {
private static class NumberCompare extends StackValue {
private final IElementType opToken;
public NumberCompare(IElementType opToken) {
super(Type.BOOLEAN_TYPE);
public NumberCompare(IElementType opToken, Type type) {
super(type);
this.opToken = opToken;
}