FIR2IR converter: handle receivers and parents more correctly

This commit is contained in:
Mikhail Glukhikh
2019-05-14 15:58:50 +03:00
parent 90009f002c
commit 26974788e9
59 changed files with 400 additions and 174 deletions
@@ -6,18 +6,22 @@ FILE fqName:<root> fileName:/coercionInLoop.kt
size: CONST Int type=kotlin.Int value=5
VAR name:x type:kotlin.collections.DoubleIterator [val]
CALL 'public final fun iterator (): kotlin.collections.DoubleIterator declared in kotlin.DoubleArray' type=kotlin.collections.DoubleIterator origin=null
VAR name:i type:kotlin.Int [var]
$this: GET_VAR 'val a: kotlin.DoubleArray [val] declared in <root>.box' type=kotlin.DoubleArray origin=null
VAR name:i type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
WHILE label=null origin=WHILE_LOOP
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null
$this: GET_VAR 'val x: kotlin.collections.DoubleIterator [val] declared in <root>.box' type=kotlin.collections.DoubleIterator origin=null
body: BLOCK type=kotlin.Int origin=null
WHEN type=kotlin.String origin=IF
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'public final fun get (index: kotlin.Int): kotlin.Double declared in kotlin.DoubleArray' type=kotlin.Double origin=null
$this: GET_VAR 'val a: kotlin.DoubleArray [val] declared in <root>.box' type=kotlin.DoubleArray origin=null
index: GET_VAR 'var i: kotlin.Int [var] declared in <root>.box' type=kotlin.Int origin=null
arg1: CALL 'public final fun next (): kotlin.Double declared in kotlin.collections.DoubleIterator' type=kotlin.Double origin=null
$this: GET_VAR 'val x: kotlin.collections.DoubleIterator [val] declared in <root>.box' type=kotlin.collections.DoubleIterator origin=null
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Fail "