KT-821 and other improvements for ranges

This commit is contained in:
Alex Tkachman
2012-01-05 18:34:32 +02:00
parent 89933439f4
commit 9fbf27eb11
9 changed files with 489 additions and 17 deletions
@@ -30,7 +30,7 @@ public class RangeTo implements IntrinsicMethod {
if (JetTypeMapper.isIntPrimitive(leftType)) {
codegen.gen(expression.getLeft(), Type.INT_TYPE);
codegen.gen(expression.getRight(), Type.INT_TYPE);
v.invokestatic("jet/IntRange", "rangeTo", "(II)Ljet/IntRange;");
v.invokestatic(expectedType.getInternalName(), "rangeTo", "(" + leftType.getDescriptor() + leftType.getDescriptor() + ")" + expectedType.getDescriptor());
return StackValue.onStack(JetTypeMapper.TYPE_INT_RANGE);
}
else {