Introduce experimental FIR compiler #KT-31265 Fixed

This commit also includes several FIR2IR fixes which helps FIR compiler
to produce normal results
This commit is contained in:
Mikhail Glukhikh
2019-05-16 11:48:02 +03:00
parent 892419c08a
commit f4fdc66a34
42 changed files with 331 additions and 54 deletions
@@ -64,7 +64,8 @@ FILE fqName:<root> fileName:/forWithImplicitReceivers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun iterator (): <root>.IntCell declared in <root>.IReceiver'
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.Int) [primary] declared in <root>.IntCell' type=<root>.IntCell origin=null
FUN name:hasNext visibility:public modality:OPEN <> ($this:<root>.IReceiver) returnType:kotlin.Boolean
value: CONST Int type=kotlin.Int value=5
FUN name:hasNext visibility:public modality:OPEN <> ($this:<root>.IReceiver) returnType:kotlin.Boolean
$this: VALUE_PARAMETER name:<this> type:<root>.IReceiver
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hasNext (): kotlin.Boolean declared in <root>.IReceiver'
@@ -12,6 +12,13 @@ FILE fqName:<root> fileName:/genericConstructorCallWithTypeArguments.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testArray <T> (n: kotlin.Int, block: kotlin.Function0<T of <root>.testArray>): kotlin.Array<T of <root>.testArray> [inline] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, T of <uninitialized parent>>) declared in kotlin.Array' type=kotlin.Array<T of <root>.testArray> origin=null
size: GET_VAR 'n: kotlin.Int declared in <root>.testArray' type=kotlin.Int origin=null
init: BLOCK type=T of <uninitialized parent> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:T of <uninitialized parent>
VALUE_PARAMETER name:it index:0 type:kotlin.Int
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: block>#' type=IrErrorType
FUNCTION_REFERENCE 'local final fun <anonymous> (it: kotlin.Int): T of <uninitialized parent> declared in <root>.testArray' type=T of <uninitialized parent> origin=LAMBDA
CLASS CLASS name:Box modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Box
TYPE_PARAMETER name:T index:0 variance: superTypes:[]
@@ -25,7 +25,8 @@ FILE fqName:<root> fileName:/memberTypeArguments.kt
RETURN type=kotlin.Nothing from='public final fun withNewValue (newValue: T of <root>.GenericClass): <root>.GenericClass<T of <root>.GenericClass> declared in <root>.GenericClass'
CONSTRUCTOR_CALL 'public constructor <init> (value: T of <uninitialized parent>) [primary] declared in <root>.GenericClass' type=<root>.GenericClass<T of <root>.GenericClass> origin=null
<class: T>: <none>
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
value: GET_VAR 'newValue: T of <root>.GenericClass declared in <root>.GenericClass.withNewValue' type=T of <root>.GenericClass origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -36,3 +36,4 @@ FILE fqName:<root> fileName:/specializedTypeAliasConstructorCall.kt
RETURN type=kotlin.Nothing from='public final fun test (): <root>.Cell<kotlin.Int> declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (value: T of <uninitialized parent>) [primary] declared in <root>.Cell' type=<root>.Cell<kotlin.Int> origin=null
<class: T>: <none>
value: CONST Int type=kotlin.Int value=42