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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user