Detailed "operator" convention information (for JS).

This commit is contained in:
Dmitry Petrov
2016-08-18 17:53:04 +03:00
committed by Dmitry Petrov
parent 4a62a6b7c3
commit 64d630faa3
42 changed files with 529 additions and 421 deletions
+6
View File
@@ -1,4 +1,10 @@
fun test() {
val x = intArrayOf(1, 2, 3)
x[1] = 0
}
fun foo() = 1
fun test2() {
intArrayOf(1, 2, 3)[foo()] = 1
}
+16 -3
View File
@@ -1,11 +1,24 @@
IrFile /arrayAssignment.kt
IrFunction public fun test(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
VAR val x: kotlin.IntArray
CALL .intArrayOf type=kotlin.IntArray operator=
CALL .intArrayOf type=kotlin.IntArray operator=null
elements: DUMMY vararg type=kotlin.Int
CALL .set type=kotlin.Unit operator=EQ
$this: GET_VAR x type=kotlin.IntArray
$this: GET_VAR x type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='1'
value: LITERAL Int type=kotlin.Int value='0'
IrFunction public fun foo(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1'
IrFunction public fun test2(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
CALL .set type=kotlin.Unit operator=EQ
$this: CALL .intArrayOf type=kotlin.IntArray operator=null
elements: DUMMY vararg type=kotlin.Int
index: CALL .foo type=kotlin.Int operator=null
value: LITERAL Int type=kotlin.Int value='1'
+2 -1
View File
@@ -1,8 +1,9 @@
fun foo(): IntArray = intArrayOf(1, 2, 3)
fun bar() = 42
fun testVariable() {
var x = foo()
x[0] += 1
foo()[0] *= 2
foo()[bar()] -= 1
}
+42 -22
View File
@@ -1,30 +1,50 @@
IrFile /arrayAugmentedAssignment1.kt
IrFunction public fun foo(): kotlin.IntArray
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .intArrayOf type=kotlin.IntArray operator=
CALL .intArrayOf type=kotlin.IntArray operator=null
elements: DUMMY vararg type=kotlin.Int
IrFunction public fun bar(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='42'
IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator=
CALL .set type=kotlin.Unit operator=PLUSEQ
$this: GET_VAR x type=kotlin.IntArray
index: LITERAL Int type=kotlin.Int value='0'
value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: CALL .get type=kotlin.Int operator=PLUSEQ
$this: GET_VAR x type=kotlin.IntArray
index: LITERAL Int type=kotlin.Int value='0'
other: LITERAL Int type=kotlin.Int value='1'
VAR val tmp0_array: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator=
CALL .set type=kotlin.Unit operator=MULTEQ
$this: GET_VAR tmp0_array type=kotlin.IntArray
index: LITERAL Int type=kotlin.Int value='0'
value: CALL .times type=kotlin.Int operator=MULTEQ
$this: CALL .get type=kotlin.Int operator=MULTEQ
$this: GET_VAR tmp0_array type=kotlin.IntArray
index: LITERAL Int type=kotlin.Int value='0'
other: LITERAL Int type=kotlin.Int value='2'
CALL .foo type=kotlin.IntArray operator=null
BLOCK type=kotlin.Unit hasResult=false operator=PLUSEQ
CALL .set type=kotlin.Unit operator=PLUSEQ
$this: GET_VAR x type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: CALL .get type=kotlin.Int operator=PLUSEQ
$this: GET_VAR x type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
other: LITERAL Int type=kotlin.Int value='1'
BLOCK type=kotlin.Unit hasResult=false operator=MULTEQ
VAR val tmp0_array: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator=null
CALL .set type=kotlin.Unit operator=MULTEQ
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
value: CALL .times type=kotlin.Int operator=MULTEQ
$this: CALL .get type=kotlin.Int operator=MULTEQ
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
other: LITERAL Int type=kotlin.Int value='2'
BLOCK type=kotlin.Unit hasResult=false operator=MINUSEQ
VAR val tmp1_array: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator=null
VAR val tmp2_index0: kotlin.Int
CALL .bar type=kotlin.Int operator=null
CALL .set type=kotlin.Unit operator=MINUSEQ
$this: GET_VAR tmp1_array type=kotlin.IntArray operator=null
index: GET_VAR tmp2_index0 type=kotlin.Int operator=null
value: CALL .minus type=kotlin.Int operator=MINUSEQ
$this: CALL .get type=kotlin.Int operator=MINUSEQ
$this: GET_VAR tmp1_array type=kotlin.IntArray operator=null
index: GET_VAR tmp2_index0 type=kotlin.Int operator=null
other: LITERAL Int type=kotlin.Int value='1'
+11 -10
View File
@@ -3,13 +3,14 @@ IrFile /arrayAugmentedAssignment2.kt
DUMMY IB
IrFunction public fun IB.test(/*0*/ a: IA): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
CALL .set type=kotlin.Unit operator=PLUSEQ
$this: $RECEIVER of: test type=IB
$receiver: GET_VAR a type=IA
index: LITERAL String type=kotlin.String value=''
value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: CALL .get type=kotlin.Int operator=PLUSEQ
$this: GET_VAR a type=IA
index: LITERAL String type=kotlin.String value=''
other: LITERAL Int type=kotlin.Int value='42'
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=PLUSEQ
CALL .set type=kotlin.Unit operator=PLUSEQ
$this: $RECEIVER of: test type=IB
$receiver: GET_VAR a type=IA operator=null
index: LITERAL String type=kotlin.String value=''
value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: CALL .get type=kotlin.Int operator=PLUSEQ
$this: GET_VAR a type=IA operator=null
index: LITERAL String type=kotlin.String value=''
other: LITERAL Int type=kotlin.Int value='42'
+7 -7
View File
@@ -2,18 +2,18 @@ IrFile /assignments.kt
DUMMY Ref
IrFunction public fun test1(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int
LITERAL Int type=kotlin.Int value='0'
SET_VAR x type=<no-type>
SET_VAR x type=<no-type> operator=EQ
LITERAL Int type=kotlin.Int value='1'
SET_VAR x type=<no-type>
SET_VAR x type=<no-type> operator=EQ
CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR x type=kotlin.Int
$this: GET_VAR x type=kotlin.Int operator=null
other: LITERAL Int type=kotlin.Int value='1'
IrFunction public fun test2(/*0*/ r: Ref): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
SET_PROPERTY .xtype=<no-type>
$this: GET_VAR r type=Ref
BLOCK type=<no-type> hasResult=false operator=null
SET_PROPERTY .xtype=<no-type> operator=EQ
$this: GET_VAR r type=Ref operator=null
$value: LITERAL Int type=kotlin.Int value='0'
+22 -22
View File
@@ -4,49 +4,49 @@ IrFile /augmentedAssignment1.kt
LITERAL Int type=kotlin.Int value='0'
IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody
BLOCK type=kotlin.Int hasResult=true isDesugared=false
BLOCK type=kotlin.Int hasResult=true operator=null
VAR var x: kotlin.Int
LITERAL Int type=kotlin.Int value='0'
SET_VAR x type=<no-type>
SET_VAR x type=<no-type> operator=PLUSEQ
CALL .plus type=kotlin.Int operator=PLUSEQ
$this: GET_VAR x type=kotlin.Int
$this: GET_VAR x type=kotlin.Int operator=PLUSEQ
other: LITERAL Int type=kotlin.Int value='1'
SET_VAR x type=<no-type>
SET_VAR x type=<no-type> operator=MINUSEQ
CALL .minus type=kotlin.Int operator=MINUSEQ
$this: GET_VAR x type=kotlin.Int
$this: GET_VAR x type=kotlin.Int operator=MINUSEQ
other: LITERAL Int type=kotlin.Int value='2'
SET_VAR x type=<no-type>
SET_VAR x type=<no-type> operator=MULTEQ
CALL .times type=kotlin.Int operator=MULTEQ
$this: GET_VAR x type=kotlin.Int
$this: GET_VAR x type=kotlin.Int operator=MULTEQ
other: LITERAL Int type=kotlin.Int value='3'
SET_VAR x type=<no-type>
SET_VAR x type=<no-type> operator=DIVEQ
CALL .div type=kotlin.Int operator=DIVEQ
$this: GET_VAR x type=kotlin.Int
$this: GET_VAR x type=kotlin.Int operator=DIVEQ
other: LITERAL Int type=kotlin.Int value='4'
SET_VAR x type=<no-type>
SET_VAR x type=<no-type> operator=PERCEQ
CALL .mod type=kotlin.Int operator=PERCEQ
$this: GET_VAR x type=kotlin.Int
$this: GET_VAR x type=kotlin.Int operator=PERCEQ
other: LITERAL Int type=kotlin.Int value='5'
IrFunction public fun testProperty(): kotlin.Unit
IrExpressionBody
BLOCK type=kotlin.Int hasResult=true isDesugared=false
SET_PROPERTY .ptype=<no-type>
BLOCK type=kotlin.Int hasResult=true operator=null
SET_PROPERTY .ptype=<no-type> operator=PLUSEQ
$value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: GET_PROPERTY .p type=kotlin.Int
$this: GET_PROPERTY .p type=kotlin.Int operator=PLUSEQ
other: LITERAL Int type=kotlin.Int value='1'
SET_PROPERTY .ptype=<no-type>
SET_PROPERTY .ptype=<no-type> operator=MINUSEQ
$value: CALL .minus type=kotlin.Int operator=MINUSEQ
$this: GET_PROPERTY .p type=kotlin.Int
$this: GET_PROPERTY .p type=kotlin.Int operator=MINUSEQ
other: LITERAL Int type=kotlin.Int value='2'
SET_PROPERTY .ptype=<no-type>
SET_PROPERTY .ptype=<no-type> operator=MULTEQ
$value: CALL .times type=kotlin.Int operator=MULTEQ
$this: GET_PROPERTY .p type=kotlin.Int
$this: GET_PROPERTY .p type=kotlin.Int operator=MULTEQ
other: LITERAL Int type=kotlin.Int value='3'
SET_PROPERTY .ptype=<no-type>
SET_PROPERTY .ptype=<no-type> operator=DIVEQ
$value: CALL .div type=kotlin.Int operator=DIVEQ
$this: GET_PROPERTY .p type=kotlin.Int
$this: GET_PROPERTY .p type=kotlin.Int operator=DIVEQ
other: LITERAL Int type=kotlin.Int value='4'
SET_PROPERTY .ptype=<no-type>
SET_PROPERTY .ptype=<no-type> operator=PERCEQ
$value: CALL .mod type=kotlin.Int operator=PERCEQ
$this: GET_PROPERTY .p type=kotlin.Int
$this: GET_PROPERTY .p type=kotlin.Int operator=PERCEQ
other: LITERAL Int type=kotlin.Int value='5'
+1 -1
View File
@@ -22,5 +22,5 @@ fun testProperty() {
p -= "-="
p *= "*="
p /= "/="
p %= "*="
p %= "%="
}
+20 -20
View File
@@ -2,57 +2,57 @@ IrFile /augmentedAssignment2.kt
DUMMY A
IrFunction public operator fun A.plusAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun A.minusAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun A.timesAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun A.divAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun A.modAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
IrProperty public val p: A getter=null setter=null
IrExpressionBody
CALL .<init> type=A operator=
CALL .<init> type=A operator=null
IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
VAR val a: A
CALL .<init> type=A operator=
CALL .<init> type=A operator=null
CALL .plusAssign type=kotlin.Unit operator=PLUSEQ
$receiver: GET_VAR a type=A
$receiver: GET_VAR a type=A operator=PLUSEQ
s: LITERAL String type=kotlin.String value='+='
CALL .minusAssign type=kotlin.Unit operator=MINUSEQ
$receiver: GET_VAR a type=A
$receiver: GET_VAR a type=A operator=MINUSEQ
s: LITERAL String type=kotlin.String value='-='
CALL .timesAssign type=kotlin.Unit operator=MULTEQ
$receiver: GET_VAR a type=A
$receiver: GET_VAR a type=A operator=MULTEQ
s: LITERAL String type=kotlin.String value='*='
CALL .divAssign type=kotlin.Unit operator=DIVEQ
$receiver: GET_VAR a type=A
$receiver: GET_VAR a type=A operator=DIVEQ
s: LITERAL String type=kotlin.String value='/='
CALL .modAssign type=kotlin.Unit operator=PERCEQ
$receiver: GET_VAR a type=A
$receiver: GET_VAR a type=A operator=PERCEQ
s: LITERAL String type=kotlin.String value='*='
IrFunction public fun testProperty(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
CALL .plusAssign type=kotlin.Unit operator=PLUSEQ
$receiver: GET_PROPERTY .p type=A
$receiver: GET_PROPERTY .p type=A operator=PLUSEQ
s: LITERAL String type=kotlin.String value='+='
CALL .minusAssign type=kotlin.Unit operator=MINUSEQ
$receiver: GET_PROPERTY .p type=A
$receiver: GET_PROPERTY .p type=A operator=MINUSEQ
s: LITERAL String type=kotlin.String value='-='
CALL .timesAssign type=kotlin.Unit operator=MULTEQ
$receiver: GET_PROPERTY .p type=A
$receiver: GET_PROPERTY .p type=A operator=MULTEQ
s: LITERAL String type=kotlin.String value='*='
CALL .divAssign type=kotlin.Unit operator=DIVEQ
$receiver: GET_PROPERTY .p type=A
$receiver: GET_PROPERTY .p type=A operator=DIVEQ
s: LITERAL String type=kotlin.String value='/='
CALL .modAssign type=kotlin.Unit operator=PERCEQ
$receiver: GET_PROPERTY .p type=A
s: LITERAL String type=kotlin.String value='*='
$receiver: GET_PROPERTY .p type=A operator=PERCEQ
s: LITERAL String type=kotlin.String value='%='
+1 -1
View File
@@ -1,6 +1,6 @@
IrFile /boxOk.kt
IrFunction public fun box(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK'
+23 -21
View File
@@ -1,42 +1,44 @@
IrFile /callWithReorderedArguments.kt
IrFunction public fun foo(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public fun noReorder1(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1'
IrFunction public fun noReorder2(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='2'
IrFunction public fun reordered1(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1'
IrFunction public fun reordered2(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='2'
IrFunction public fun test(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
CALL .foo type=kotlin.Unit operator=
a: CALL .noReorder1 type=kotlin.Int operator=
b: CALL .noReorder2 type=kotlin.Int operator=
VAR val tmp0_b: kotlin.Int
CALL .reordered1 type=kotlin.Int operator=
VAR val tmp1_a: kotlin.Int
CALL .reordered2 type=kotlin.Int operator=
CALL .foo type=kotlin.Unit operator=
a: GET_VAR tmp1_a type=kotlin.Int
b: GET_VAR tmp0_b type=kotlin.Int
VAR val tmp2_a: kotlin.Int
CALL .reordered2 type=kotlin.Int operator=
CALL .foo type=kotlin.Unit operator=
a: GET_VAR tmp2_a type=kotlin.Int
b: LITERAL Int type=kotlin.Int value='1'
BLOCK type=<no-type> hasResult=false operator=null
CALL .foo type=kotlin.Unit operator=null
a: CALL .noReorder1 type=kotlin.Int operator=null
b: CALL .noReorder2 type=kotlin.Int operator=null
BLOCK type=kotlin.Unit hasResult=false operator=SYNTHETIC_BLOCK
VAR val tmp0_b: kotlin.Int
CALL .reordered1 type=kotlin.Int operator=null
VAR val tmp1_a: kotlin.Int
CALL .reordered2 type=kotlin.Int operator=null
CALL .foo type=kotlin.Unit operator=null
a: GET_VAR tmp1_a type=kotlin.Int operator=null
b: GET_VAR tmp0_b type=kotlin.Int operator=null
BLOCK type=kotlin.Unit hasResult=false operator=SYNTHETIC_BLOCK
VAR val tmp2_a: kotlin.Int
CALL .reordered2 type=kotlin.Int operator=null
CALL .foo type=kotlin.Unit operator=null
a: GET_VAR tmp2_a type=kotlin.Int operator=null
b: LITERAL Int type=kotlin.Int value='1'
+19 -19
View File
@@ -1,42 +1,42 @@
IrFile /calls.kt
IrFunction public fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_VAR x type=kotlin.Int
GET_VAR x type=kotlin.Int operator=null
IrFunction public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .foo type=kotlin.Int operator=
x: GET_VAR x type=kotlin.Int
CALL .foo type=kotlin.Int operator=null
x: GET_VAR x type=kotlin.Int operator=null
y: LITERAL Int type=kotlin.Int value='1'
IrFunction public fun qux(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .foo type=kotlin.Int operator=
x: CALL .foo type=kotlin.Int operator=
x: GET_VAR x type=kotlin.Int
y: GET_VAR x type=kotlin.Int
y: GET_VAR x type=kotlin.Int
CALL .foo type=kotlin.Int operator=null
x: CALL .foo type=kotlin.Int operator=null
x: GET_VAR x type=kotlin.Int operator=null
y: GET_VAR x type=kotlin.Int operator=null
y: GET_VAR x type=kotlin.Int operator=null
IrFunction public fun kotlin.Int.ext1(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
$RECEIVER of: ext1 type=kotlin.Int
IrFunction public fun kotlin.Int.ext2(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .foo type=kotlin.Int operator=
CALL .foo type=kotlin.Int operator=null
x: $RECEIVER of: ext2 type=kotlin.Int
y: GET_VAR x type=kotlin.Int
y: GET_VAR x type=kotlin.Int operator=null
IrFunction public fun kotlin.Int.ext3(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .foo type=kotlin.Int operator=
x: CALL .ext1 type=kotlin.Int operator=
CALL .foo type=kotlin.Int operator=null
x: CALL .ext1 type=kotlin.Int operator=null
$receiver: $RECEIVER of: ext3 type=kotlin.Int
y: GET_VAR x type=kotlin.Int
y: GET_VAR x type=kotlin.Int operator=null
+12 -12
View File
@@ -1,29 +1,29 @@
IrFile /conventionComparisons.kt
IrFunction public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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
GET_VAR b type=kotlin.String
GET_VAR a type=kotlin.String operator=null
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 isDesugared=true
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
GET_VAR b type=kotlin.String
GET_VAR a type=kotlin.String operator=null
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 isDesugared=true
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
GET_VAR b type=kotlin.String
GET_VAR a type=kotlin.String operator=null
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 isDesugared=true
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
GET_VAR b type=kotlin.String
GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String operator=null
+12 -11
View File
@@ -1,13 +1,14 @@
IrFunction public fun B.test(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
VAR val tmp0: A
GET_VAR A type=A
VAR val x: kotlin.Int
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$this: $RECEIVER of: test type=B
$receiver: GET_VAR tmp0 type=A
VAR val y: kotlin.Int
CALL .component2 type=kotlin.Int operator=COMPONENT_N(index=2)
$this: $RECEIVER of: test type=B
$receiver: GET_VAR tmp0 type=A
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=<no-type> hasResult=false operator=SYNTHETIC_BLOCK
VAR val tmp0: A
GET_VAR A type=A operator=null
VAR val x: kotlin.Int
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$this: $RECEIVER of: test type=B
$receiver: GET_VAR tmp0 type=A operator=null
VAR val y: kotlin.Int
CALL .component2 type=kotlin.Int operator=COMPONENT_N(index=2)
$this: $RECEIVER of: test type=B
$receiver: GET_VAR tmp0 type=A operator=null
+6 -6
View File
@@ -1,14 +1,14 @@
IrFile /dotQualified.kt
IrFunction public fun length(/*0*/ s: kotlin.String): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_PROPERTY .length type=kotlin.Int
$this: GET_VAR s type=kotlin.String
GET_PROPERTY .length type=kotlin.Int operator=null
$this: GET_VAR s type=kotlin.String operator=null
IrFunction public fun lengthN(/*0*/ s: kotlin.String?): kotlin.Int?
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_PROPERTY ?.length type=kotlin.Int?
GET_PROPERTY ?.length type=kotlin.Int? operator=null
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR s type=kotlin.String?
GET_VAR s type=kotlin.String? operator=null
+9 -9
View File
@@ -1,26 +1,26 @@
IrFile /elvis.kt
IrFunction public fun test1(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any): kotlin.Any
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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?
GET_VAR b type=kotlin.Any
GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ a: kotlin.String?, /*1*/ b: kotlin.Any): kotlin.Any
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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?
GET_VAR b type=kotlin.Any
GET_VAR a type=kotlin.String? operator=null
GET_VAR b type=kotlin.Any operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit
DUMMY KtIfExpression type=kotlin.Unit
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?
GET_VAR a type=kotlin.Any? operator=null
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR b type=kotlin.Any?
GET_VAR b type=kotlin.Any? operator=null
+9 -9
View File
@@ -1,22 +1,22 @@
IrFile /equality.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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
GET_VAR b type=kotlin.Int
GET_VAR a type=kotlin.Int operator=null
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 isDesugared=true
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
GET_VAR b type=kotlin.Int
GET_VAR a type=kotlin.Int operator=null
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 isDesugared=true
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?
GET_VAR b type=kotlin.Any?
GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any? operator=null
@@ -2,12 +2,12 @@ IrFile /extensionPropertyGetterCall.kt
IrProperty public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null
IrPropertyGetter public fun kotlin.String.<get-okext>(): kotlin.String property=okext
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK'
IrFunction public fun kotlin.String.test5(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_PROPERTY .okext type=kotlin.String
GET_PROPERTY .okext type=kotlin.String operator=null
$receiver: $RECEIVER of: test5 type=kotlin.String
+9 -9
View File
@@ -1,22 +1,22 @@
IrFile /identity.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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
GET_VAR b type=kotlin.Int
GET_VAR a type=kotlin.Int operator=null
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 isDesugared=true
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
GET_VAR b type=kotlin.Int
GET_VAR a type=kotlin.Int operator=null
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 isDesugared=true
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?
GET_VAR b type=kotlin.Any?
GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any? operator=null
+12 -12
View File
@@ -1,31 +1,31 @@
IrFile /in.kt
IrFunction public fun test1(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .contains type=kotlin.Boolean operator=IN
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any>
element: GET_VAR a type=kotlin.Any
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any> operator=null
element: GET_VAR a type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any>
element: GET_VAR a type=kotlin.Any
$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
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .contains type=kotlin.Boolean operator=IN
$this: GET_VAR x type=kotlin.collections.Collection<T>
element: GET_VAR a type=T
$this: GET_VAR x type=kotlin.collections.Collection<T> operator=null
element: GET_VAR a type=T operator=null
IrFunction public fun </*0*/ T> test4(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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
$this: GET_VAR x type=kotlin.collections.Collection<T>
element: GET_VAR a type=T
$this: GET_VAR x type=kotlin.collections.Collection<T> operator=null
element: GET_VAR a type=T operator=null
+36 -36
View File
@@ -4,78 +4,78 @@ IrFile /incrementDecrement.kt
LITERAL Int type=kotlin.Int value='0'
IrProperty public val arr: kotlin.IntArray getter=null setter=null
IrExpressionBody
CALL .intArrayOf type=kotlin.IntArray operator=
CALL .intArrayOf type=kotlin.IntArray operator=null
elements: DUMMY vararg type=kotlin.Int
IrFunction public fun testVar(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int
LITERAL Int type=kotlin.Int value='0'
VAR val x1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true isDesugared=true
BLOCK type=kotlin.Int hasResult=true operator=PREFIX_INCR
VAR val tmp0: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR
$this: GET_VAR x type=kotlin.Int
SET_VAR x type=<no-type>
GET_VAR tmp0 type=kotlin.Int
GET_VAR tmp0 type=kotlin.Int
$this: GET_VAR x type=kotlin.Int operator=PREFIX_INCR
SET_VAR x type=<no-type> operator=PREFIX_INCR
GET_VAR tmp0 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int operator=null
VAR val x2: kotlin.Int
BLOCK type=kotlin.Int hasResult=true isDesugared=true
BLOCK type=kotlin.Int hasResult=true operator=PREFIX_DECR
VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: GET_VAR x type=kotlin.Int
SET_VAR x type=<no-type>
GET_VAR tmp1 type=kotlin.Int
GET_VAR tmp1 type=kotlin.Int
$this: GET_VAR x type=kotlin.Int operator=PREFIX_DECR
SET_VAR x type=<no-type> operator=PREFIX_DECR
GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
IrFunction public fun testProp(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
VAR val p1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true isDesugared=true
BLOCK type=kotlin.Int hasResult=true operator=PREFIX_INCR
VAR val tmp0: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR
$this: GET_PROPERTY .p type=kotlin.Int
SET_PROPERTY .ptype=<no-type>
$value: GET_VAR tmp0 type=kotlin.Int
GET_VAR tmp0 type=kotlin.Int
$this: GET_PROPERTY .p type=kotlin.Int operator=PREFIX_INCR
SET_PROPERTY .ptype=<no-type> operator=PREFIX_INCR
$value: GET_VAR tmp0 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int operator=null
VAR val p2: kotlin.Int
BLOCK type=kotlin.Int hasResult=true isDesugared=true
BLOCK type=kotlin.Int hasResult=true operator=PREFIX_DECR
VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: GET_PROPERTY .p type=kotlin.Int
SET_PROPERTY .ptype=<no-type>
$value: GET_VAR tmp1 type=kotlin.Int
GET_VAR tmp1 type=kotlin.Int
$this: GET_PROPERTY .p type=kotlin.Int operator=PREFIX_DECR
SET_PROPERTY .ptype=<no-type> operator=PREFIX_DECR
$value: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
IrFunction public fun testArray(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
VAR val a1: kotlin.Int
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int
BLOCK type=kotlin.Unit hasResult=true isDesugared=true
BLOCK type=kotlin.Unit hasResult=true operator=PREFIX_INCR
VAR val tmp0_array: kotlin.IntArray
GET_PROPERTY .arr type=kotlin.IntArray
GET_PROPERTY .arr type=kotlin.IntArray operator=null
VAR val tmp1: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR
$this: CALL .get type=kotlin.Int operator=PREFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=PREFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
value: GET_VAR tmp1 type=kotlin.Int
GET_VAR tmp1 type=kotlin.Int
value: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
VAR val a2: kotlin.Int
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int
BLOCK type=kotlin.Unit hasResult=true isDesugared=true
BLOCK type=kotlin.Unit hasResult=true operator=PREFIX_DECR
VAR val tmp2_array: kotlin.IntArray
GET_PROPERTY .arr type=kotlin.IntArray
GET_PROPERTY .arr type=kotlin.IntArray operator=null
VAR val tmp3: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: CALL .get type=kotlin.Int operator=PREFIX_DECR
$this: GET_VAR tmp2_array type=kotlin.IntArray
$this: GET_VAR tmp2_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=PREFIX_DECR
$this: GET_VAR tmp2_array type=kotlin.IntArray
$this: GET_VAR tmp2_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
value: GET_VAR tmp3 type=kotlin.Int
GET_VAR tmp3 type=kotlin.Int
value: GET_VAR tmp3 type=kotlin.Int operator=null
GET_VAR tmp3 type=kotlin.Int operator=null
+12 -12
View File
@@ -1,29 +1,29 @@
IrFile /primitiveComparisons.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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
GET_VAR b type=kotlin.Int
GET_VAR a type=kotlin.Int operator=null
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 isDesugared=true
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
GET_VAR b type=kotlin.Int
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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
GET_VAR b type=kotlin.Int
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
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
GET_VAR b type=kotlin.Int
GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int operator=null
+13 -13
View File
@@ -4,44 +4,44 @@ IrFile /references.kt
LITERAL String type=kotlin.String value='OK'
IrProperty public val ok2: kotlin.String = "OK" getter=null setter=null
IrExpressionBody
GET_PROPERTY .ok type=kotlin.String
GET_PROPERTY .ok type=kotlin.String operator=null
IrProperty public val ok3: kotlin.String getter=<get-ok3> setter=null
IrPropertyGetter public fun <get-ok3>(): kotlin.String property=ok3
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK'
IrFunction public fun test1(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_PROPERTY .ok type=kotlin.String
GET_PROPERTY .ok type=kotlin.String operator=null
IrFunction public fun test2(/*0*/ x: kotlin.String): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_VAR x type=kotlin.String
GET_VAR x type=kotlin.String operator=null
IrFunction public fun test3(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
VAR val x: kotlin.String = "OK"
LITERAL String type=kotlin.String value='OK'
RETURN type=<no-type>
GET_VAR x type=kotlin.String
GET_VAR x type=kotlin.String operator=null
IrFunction public fun test4(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_PROPERTY .ok3 type=kotlin.String
GET_PROPERTY .ok3 type=kotlin.String operator=null
IrProperty public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null
IrPropertyGetter public fun kotlin.String.<get-okext>(): kotlin.String property=okext
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK'
IrFunction public fun kotlin.String.test5(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_PROPERTY .okext type=kotlin.String
GET_PROPERTY .okext type=kotlin.String operator=null
$receiver: $RECEIVER of: test5 type=kotlin.String
+6
View File
@@ -4,3 +4,9 @@ fun test3(a: Int, b: Int) = a * b
fun test4(a: Int, b: Int) = a / b
fun test5(a: Int, b: Int) = a % b
fun test6(a: Int, b: Int) = a .. b
fun test1x(a: Int, b: Int) = a.plus(b)
fun test2x(a: Int, b: Int) = a.minus(b)
fun test3x(a: Int, b: Int) = a.times(b)
fun test4x(a: Int, b: Int) = a.div(b)
fun test5x(a: Int, b: Int) = a.mod(b)
+53 -18
View File
@@ -1,43 +1,78 @@
IrFile /simpleOperators.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR a type=kotlin.Int
other: GET_VAR b type=kotlin.Int
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .minus type=kotlin.Int operator=MINUS
$this: GET_VAR a type=kotlin.Int
other: GET_VAR b type=kotlin.Int
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .times type=kotlin.Int operator=MUL
$this: GET_VAR a type=kotlin.Int
other: GET_VAR b type=kotlin.Int
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .div type=kotlin.Int operator=DIV
$this: GET_VAR a type=kotlin.Int
other: GET_VAR b type=kotlin.Int
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test5(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .mod type=kotlin.Int operator=PERC
$this: GET_VAR a type=kotlin.Int
other: GET_VAR b type=kotlin.Int
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test6(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.ranges.IntRange
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .rangeTo type=kotlin.ranges.IntRange operator=RANGE
$this: GET_VAR a type=kotlin.Int
other: GET_VAR b type=kotlin.Int
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test1x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .plus type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .minus type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .times type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test4x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .div type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test5x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .mod type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
+23 -23
View File
@@ -1,51 +1,51 @@
IrFile /smartCasts.kt
IrFunction public fun expectsString(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public fun expectsInt(/*0*/ i: kotlin.Int): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public fun overloaded(/*0*/ s: kotlin.String): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_VAR s type=kotlin.String
GET_VAR s type=kotlin.String operator=null
IrFunction public fun overloaded(/*0*/ x: kotlin.Any): kotlin.Any
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_VAR x type=kotlin.Any
GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test1(/*0*/ x: kotlin.Any): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit
CALL .println type=kotlin.Unit operator=
message: GET_PROPERTY .length type=kotlin.Int
CALL .println type=kotlin.Unit operator=null
message: GET_PROPERTY .length type=kotlin.Int operator=null
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any
CALL .expectsString type=kotlin.Unit operator=
GET_VAR x type=kotlin.Any operator=null
CALL .expectsString type=kotlin.Unit operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any
CALL .expectsInt type=kotlin.Unit operator=
i: GET_PROPERTY .length type=kotlin.Int
GET_VAR x type=kotlin.Any operator=null
CALL .expectsInt type=kotlin.Unit operator=null
i: GET_PROPERTY .length type=kotlin.Int operator=null
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any
CALL .expectsString type=kotlin.Unit operator=
s: CALL .overloaded type=kotlin.String operator=
GET_VAR x type=kotlin.Any operator=null
CALL .expectsString type=kotlin.Unit operator=null
s: CALL .overloaded type=kotlin.String operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any
GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ x: kotlin.Any): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit
RETURN type=<no-type>
CALL .overloaded type=kotlin.String operator=
CALL .overloaded type=kotlin.String operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any
GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test3(/*0*/ x: kotlin.Any): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit
RETURN type=<no-type>
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any
GET_VAR x type=kotlin.Any operator=null
+13 -12
View File
@@ -3,24 +3,25 @@ IrFile /smartCastsWithDestructuring.kt
DUMMY I2
IrFunction public operator fun I1.component1(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1'
IrFunction public operator fun I2.component2(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL String type=kotlin.String value=''
IrFunction public fun test(/*0*/ x: I1): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit
VAR val tmp0: I1
GET_VAR x type=I1
VAR val c1: kotlin.Int
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$receiver: GET_VAR tmp0 type=I1
VAR val c2: kotlin.String
CALL .component2 type=kotlin.String operator=COMPONENT_N(index=2)
$receiver: TYPE_OP operator=IMPLICIT_CAST typeOperand=I2
GET_VAR tmp0 type=I1
BLOCK type=<no-type> hasResult=false operator=SYNTHETIC_BLOCK
VAR val tmp0: I1
GET_VAR x type=I1 operator=null
VAR val c1: kotlin.Int
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$receiver: GET_VAR tmp0 type=I1 operator=null
VAR val c2: kotlin.String
CALL .component2 type=kotlin.String operator=COMPONENT_N(index=2)
$receiver: TYPE_OP operator=IMPLICIT_CAST typeOperand=I2
GET_VAR tmp0 type=I1 operator=null
+4 -4
View File
@@ -1,7 +1,7 @@
IrFile /smoke.kt
IrFunction public fun testFun(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK'
IrProperty public val testSimpleVal: kotlin.Int = 1 getter=null setter=null
@@ -10,7 +10,7 @@ IrFile /smoke.kt
IrProperty public val testValWithGetter: kotlin.Int getter=<get-testValWithGetter> setter=null
IrPropertyGetter public fun <get-testValWithGetter>(): kotlin.Int property=testValWithGetter
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='42'
IrProperty public var testSimpleVar: kotlin.Int getter=null setter=null
@@ -19,9 +19,9 @@ IrFile /smoke.kt
IrProperty public var testVarWithAccessors: kotlin.Int getter=<get-testVarWithAccessors> setter=<set-testVarWithAccessors>
IrPropertyGetter public fun <get-testVarWithAccessors>(): kotlin.Int property=testVarWithAccessors
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='42'
IrPropertySetter public fun <set-testVarWithAccessors>(/*0*/ v: kotlin.Int): kotlin.Unit property=testVarWithAccessors
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
BLOCK type=<no-type> hasResult=false operator=null
+10 -10
View File
@@ -1,27 +1,27 @@
IrFile /stringPlus.kt
IrFunction public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Any): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String
GET_VAR b type=kotlin.Any
GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String
GET_VAR a type=kotlin.String operator=null
LITERAL String type=kotlin.String value='+'
GET_VAR b type=kotlin.Int
GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String
GET_VAR a type=kotlin.String operator=null
LITERAL String type=kotlin.String value='+'
CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR b type=kotlin.Int
$this: GET_VAR b type=kotlin.Int operator=null
other: LITERAL Int type=kotlin.Int value='1'
GET_VAR a type=kotlin.String
GET_VAR a type=kotlin.String operator=null