Refactor desugaring (& operator conventions generation), step 1.

This commit is contained in:
Dmitry Petrov
2016-08-22 12:58:20 +03:00
committed by Dmitry Petrov
parent c0d521266b
commit f787f8ecbf
48 changed files with 986 additions and 768 deletions
+8 -6
View File
@@ -3,16 +3,18 @@ IrFile /booleanOperators.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=ANDAND type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Boolean operator=null
GET_VAR b type=kotlin.Boolean operator=null
IF type=kotlin.Boolean operator=ANDAND
if: GET_VAR a type=kotlin.Boolean operator=null
then: GET_VAR b type=kotlin.Boolean operator=null
else: LITERAL Boolean type=kotlin.Boolean value='false'
IrFunction public fun test2(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=OROR type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Boolean operator=null
GET_VAR b type=kotlin.Boolean operator=null
IF type=kotlin.Boolean operator=OROR
if: GET_VAR a type=kotlin.Boolean operator=null
then: LITERAL Boolean type=kotlin.Boolean value='true'
else: GET_VAR b type=kotlin.Boolean operator=null
IrFunction public fun test1x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
+8 -12
View File
@@ -5,39 +5,35 @@ IrFile /conventionComparisons.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=null
CALL .compareTo type=kotlin.Int operator=GT
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: $RECEIVER of: test1 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
LITERAL Int type=kotlin.Int value='0'
IrFunction public fun IB.test2(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=null
CALL .compareTo type=kotlin.Int operator=GTEQ
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: $RECEIVER of: test2 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
LITERAL Int type=kotlin.Int value='0'
IrFunction public fun IB.test3(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=null
CALL .compareTo type=kotlin.Int operator=LT
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: $RECEIVER of: test3 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
LITERAL Int type=kotlin.Int value='0'
IrFunction public fun IB.test4(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=null
CALL .compareTo type=kotlin.Int operator=LTEQ
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: $RECEIVER of: test4 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
LITERAL Int type=kotlin.Int value='0'
+3 -11
View File
@@ -3,16 +3,12 @@ IrFile /elvis.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=ELVIS type=kotlin.Any related=null
GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any operator=null
DUMMY elvis type=kotlin.Any
IrFunction public fun test2(/*0*/ a: kotlin.String?, /*1*/ b: kotlin.Any): kotlin.Any
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=ELVIS type=kotlin.Any related=null
GET_VAR a type=kotlin.String? operator=null
GET_VAR b type=kotlin.Any operator=null
DUMMY elvis type=kotlin.Any
IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
@@ -27,8 +23,4 @@ IrFile /elvis.kt
then: RETURN type=<no-type>
LITERAL String type=kotlin.String value=''
RETURN type=<no-type>
BINARY_OP operator=ELVIS type=kotlin.String related=null
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String?
GET_VAR a type=kotlin.Any? operator=null
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR b type=kotlin.Any? operator=null
DUMMY elvis type=kotlin.String
+10 -9
View File
@@ -3,20 +3,21 @@ IrFile /equality.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=EQEQ type=kotlin.Boolean related=public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=EXCLEQ type=kotlin.Boolean related=public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
CALL .NOT type=kotlin.Boolean operator=EXCLEQ
arg0: CALL .EQEQ type=kotlin.Boolean operator=EXCLEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=EQEQ type=kotlin.Boolean related=public open operator fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any? operator=null
CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: GET_VAR b type=kotlin.Any? operator=null
+10 -9
View File
@@ -3,20 +3,21 @@ IrFile /identity.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=EQEQEQ type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=EXCLEQEQ type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
CALL .NOT type=kotlin.Boolean operator=EXCL
arg0: CALL .EQEQEQ type=kotlin.Boolean operator=EXCLEQEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=EQEQEQ type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any? operator=null
CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: GET_VAR b type=kotlin.Any? operator=null
+8 -6
View File
@@ -4,13 +4,15 @@ IrFile /ifElseIf.kt
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
IF type=kotlin.Int operator=IF
if: BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR i type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='0'
if: CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR i type=kotlin.Int operator=null
other: LITERAL Int type=kotlin.Int value='0'
then: LITERAL Int type=kotlin.Int value='1'
else: IF type=kotlin.Int operator=IF
if: BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR i type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='0'
if: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR i type=kotlin.Int operator=null
other: LITERAL Int type=kotlin.Int value='0'
then: DUMMY MINUS type=kotlin.Int
else: LITERAL Int type=kotlin.Int value='0'
+2 -2
View File
@@ -3,6 +3,6 @@ IrFile /implicitCastOnPlatformType.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
UNARY_OP operator=IMPLICIT_NOTNULL type=kotlin.String related=null
CALL .getProperty type=kotlin.String! operator=null
CALL .IMPLICIT_NOT_NULL type=kotlin.Any operator=IMPLICIT_NOTNULL
arg0: CALL .getProperty type=kotlin.String! operator=null
p0: LITERAL String type=kotlin.String value='test'
+4 -4
View File
@@ -10,8 +10,8 @@ IrFile /in.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
UNARY_OP operator=EXCL type=kotlin.Boolean related=null
CALL .contains type=kotlin.Boolean operator=NOT_IN
CALL .NOT type=kotlin.Boolean operator=EXCL
arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any> operator=null
element: GET_VAR a type=kotlin.Any operator=null
IrFunction public fun </*0*/ T> test3(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean
@@ -25,7 +25,7 @@ IrFile /in.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
UNARY_OP operator=EXCL type=kotlin.Boolean related=null
CALL .contains type=kotlin.Boolean operator=NOT_IN
CALL .NOT type=kotlin.Boolean operator=EXCL
arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN
$this: GET_VAR x type=kotlin.collections.Collection<T> operator=null
element: GET_VAR a type=T operator=null
+96 -72
View File
@@ -3,167 +3,191 @@ IrFile /primitiveComparisons.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int
GET_VAR a type=kotlin.Byte operator=null
GET_VAR b type=kotlin.Byte operator=null
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
IrFunction public fun btest2(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int
GET_VAR a type=kotlin.Byte operator=null
GET_VAR b type=kotlin.Byte operator=null
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
IrFunction public fun btest3(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int
GET_VAR a type=kotlin.Byte operator=null
GET_VAR b type=kotlin.Byte operator=null
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
IrFunction public fun btest4(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int
GET_VAR a type=kotlin.Byte operator=null
GET_VAR b type=kotlin.Byte operator=null
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
IrFunction public fun stest1(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int
GET_VAR a type=kotlin.Short operator=null
GET_VAR b type=kotlin.Short operator=null
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
IrFunction public fun stest2(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int
GET_VAR a type=kotlin.Short operator=null
GET_VAR b type=kotlin.Short operator=null
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
IrFunction public fun stest3(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int
GET_VAR a type=kotlin.Short operator=null
GET_VAR b type=kotlin.Short operator=null
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
IrFunction public fun stest4(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int
GET_VAR a type=kotlin.Short operator=null
GET_VAR b type=kotlin.Short operator=null
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
IrFunction public fun itest1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun itest2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun itest3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun itest4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun ltest1(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Long): kotlin.Int
GET_VAR a type=kotlin.Long operator=null
GET_VAR b type=kotlin.Long operator=null
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
IrFunction public fun ltest2(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Long): kotlin.Int
GET_VAR a type=kotlin.Long operator=null
GET_VAR b type=kotlin.Long operator=null
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
IrFunction public fun ltest3(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Long): kotlin.Int
GET_VAR a type=kotlin.Long operator=null
GET_VAR b type=kotlin.Long operator=null
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
IrFunction public fun ltest4(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Long): kotlin.Int
GET_VAR a type=kotlin.Long operator=null
GET_VAR b type=kotlin.Long operator=null
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
IrFunction public fun ftest1(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int
GET_VAR a type=kotlin.Float operator=null
GET_VAR b type=kotlin.Float operator=null
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
IrFunction public fun ftest2(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int
GET_VAR a type=kotlin.Float operator=null
GET_VAR b type=kotlin.Float operator=null
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
IrFunction public fun ftest3(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int
GET_VAR a type=kotlin.Float operator=null
GET_VAR b type=kotlin.Float operator=null
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
IrFunction public fun ftest4(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int
GET_VAR a type=kotlin.Float operator=null
GET_VAR b type=kotlin.Float operator=null
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
IrFunction public fun dtest1(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int
GET_VAR a type=kotlin.Double operator=null
GET_VAR b type=kotlin.Double operator=null
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
IrFunction public fun dtest2(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int
GET_VAR a type=kotlin.Double operator=null
GET_VAR b type=kotlin.Double operator=null
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
IrFunction public fun dtest3(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int
GET_VAR a type=kotlin.Double operator=null
GET_VAR b type=kotlin.Double operator=null
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
IrFunction public fun dtest4(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int
GET_VAR a type=kotlin.Double operator=null
GET_VAR b type=kotlin.Double operator=null
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
+16 -12
View File
@@ -3,27 +3,31 @@ IrFile /stringComparisons.kt
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String operator=null
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
IrFunction public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String operator=null
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
IrFunction public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String operator=null
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
IrFunction public fun test4(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String operator=null
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
+39 -39
View File
@@ -8,14 +8,14 @@ IrFile /when.kt
VAR val tmp0_subject: kotlin.Any?
GET_VAR x type=kotlin.Any? operator=null
IF type=kotlin.String operator=WHEN
if: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Any? operator=null
LITERAL Null type=kotlin.Nothing? value='null'
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Any? operator=null
arg1: LITERAL Null type=kotlin.Nothing? value='null'
then: LITERAL String type=kotlin.String value='null'
else: IF type=kotlin.String operator=WHEN
if: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Any? operator=null
GET_OBJECT A type=A
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Any? operator=null
arg1: GET_OBJECT A type=A
then: LITERAL String type=kotlin.String value='A'
else: IF type=kotlin.String operator=WHEN
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.String
@@ -33,14 +33,14 @@ IrFile /when.kt
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
IF type=kotlin.String operator=WHEN
if: BINARY_OP operator=EQEQ type=kotlin.Boolean related=public open operator fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
GET_VAR x type=kotlin.Any? operator=null
LITERAL Null type=kotlin.Nothing? value='null'
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.Any? operator=null
arg1: LITERAL Null type=kotlin.Nothing? value='null'
then: LITERAL String type=kotlin.String value='null'
else: IF type=kotlin.String operator=WHEN
if: BINARY_OP operator=EQEQ type=kotlin.Boolean related=public open operator fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
GET_VAR x type=kotlin.Any? operator=null
GET_OBJECT A type=A
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.Any? operator=null
arg1: GET_OBJECT A type=A
then: LITERAL String type=kotlin.String value='A'
else: IF type=kotlin.String operator=WHEN
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.String
@@ -64,45 +64,45 @@ IrFile /when.kt
if: IF type=kotlin.Boolean operator=WHEN_COMMA
if: IF type=kotlin.Boolean operator=WHEN_COMMA
if: IF type=kotlin.Boolean operator=WHEN_COMMA
if: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='1'
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='1'
then: LITERAL Boolean type=kotlin.Boolean value='true'
else: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='2'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='2'
then: LITERAL Boolean type=kotlin.Boolean value='true'
else: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='3'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='3'
then: LITERAL Boolean type=kotlin.Boolean value='true'
else: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='4'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='4'
then: LITERAL String type=kotlin.String value='1234'
else: IF type=kotlin.String operator=WHEN
if: IF type=kotlin.Boolean operator=WHEN_COMMA
if: IF type=kotlin.Boolean operator=WHEN_COMMA
if: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='5'
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='5'
then: LITERAL Boolean type=kotlin.Boolean value='true'
else: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='6'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='6'
then: LITERAL Boolean type=kotlin.Boolean value='true'
else: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='7'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='7'
then: LITERAL String type=kotlin.String value='567'
else: IF type=kotlin.String operator=WHEN
if: IF type=kotlin.Boolean operator=WHEN_COMMA
if: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='8'
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='8'
then: LITERAL Boolean type=kotlin.Boolean value='true'
else: BINARY_OP operator=EQEQ type=kotlin.Boolean related=null
GET_VAR tmp0_subject type=kotlin.Int operator=null
LITERAL Int type=kotlin.Int value='9'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: LITERAL Int type=kotlin.Int value='9'
then: LITERAL String type=kotlin.String value='89'
else: LITERAL String type=kotlin.String value='?'