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) {
|
private void generateCompareOp(JetBinaryExpression expression, IElementType opToken, Type type) {
|
||||||
gen(expression.getLeft(), type);
|
gen(expression.getLeft(), type);
|
||||||
gen(expression.getRight(), type);
|
gen(expression.getRight(), type);
|
||||||
myStack.push(StackValue.cmp(opToken));
|
myStack.push(StackValue.cmp(opToken, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateAssignmentExpression(JetBinaryExpression expression) {
|
private void generateAssignmentExpression(JetBinaryExpression expression) {
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ public abstract class StackValue {
|
|||||||
return new Constant(value, type);
|
return new Constant(value, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static StackValue cmp(IElementType opToken) {
|
public static StackValue cmp(IElementType opToken, Type type) {
|
||||||
return new NumberCompare(opToken);
|
return new NumberCompare(opToken, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static StackValue not(StackValue stackValue) {
|
public static StackValue not(StackValue stackValue) {
|
||||||
@@ -173,8 +173,8 @@ public abstract class StackValue {
|
|||||||
private static class NumberCompare extends StackValue {
|
private static class NumberCompare extends StackValue {
|
||||||
private final IElementType opToken;
|
private final IElementType opToken;
|
||||||
|
|
||||||
public NumberCompare(IElementType opToken) {
|
public NumberCompare(IElementType opToken, Type type) {
|
||||||
super(Type.BOOLEAN_TYPE);
|
super(type);
|
||||||
this.opToken = opToken;
|
this.opToken = opToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user