Callable references now can have receivers and arguments

(for bound references implementation).
This commit is contained in:
Dmitry Petrov
2016-09-02 17:31:43 +03:00
committed by Dmitry Petrov
parent fe397eddbe
commit a3dadd9e3f
16 changed files with 45 additions and 68 deletions
@@ -8,14 +8,14 @@ FILE /delegatedProperties.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from=<anonymous>
CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE local final fun <anonymous>(): kotlin.Int type=() -> kotlin.Int
CALLABLE_REFERENCE <anonymous> type=() -> kotlin.Int operator=LAMBDA
PROPERTY_GETTER public fun <get-test1>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from=<get-test1>
CALL .getValue type=kotlin.Int operator=null
$receiver: GET_BACKING_FIELD test1$delegate type=kotlin.Lazy<kotlin.Int> operator=null
thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE public val test1: kotlin.Int type=kotlin.reflect.KProperty0<kotlin.Int>
property: CALLABLE_REFERENCE test1 type=kotlin.reflect.KProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE
CLASS CLASS C
CONSTRUCTOR public constructor C(/*0*/ map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>)
BLOCK_BODY
@@ -34,14 +34,14 @@ FILE /delegatedProperties.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from=<anonymous>
CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE local final fun <anonymous>(): kotlin.Int type=() -> kotlin.Int
CALLABLE_REFERENCE <anonymous> type=() -> kotlin.Int operator=LAMBDA
PROPERTY_GETTER public final fun <get-test2>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from=<get-test2>
CALL .getValue type=kotlin.Int operator=null
$receiver: GET_BACKING_FIELD test2$delegate type=kotlin.Lazy<kotlin.Int> operator=null
thisRef: THIS public final class C type=C
property: CALLABLE_REFERENCE public final val test2: kotlin.Int type=kotlin.reflect.KProperty1<C, kotlin.Int>
property: CALLABLE_REFERENCE test2 type=kotlin.reflect.KProperty1<C, kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY public final var test3: kotlin.Any
delegate: PROPERTY val `test3$delegate`: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
EXPRESSION_BODY
@@ -53,14 +53,14 @@ FILE /delegatedProperties.kt
CALL .getValue type=kotlin.Any operator=null
$receiver: GET_BACKING_FIELD test3$delegate type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=null
thisRef: THIS public final class C type=C
property: CALLABLE_REFERENCE public final var test3: kotlin.Any type=kotlin.reflect.KMutableProperty1<C, kotlin.Any>
property: CALLABLE_REFERENCE test3 type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY_SETTER public final fun <set-test3>(/*0*/ <set-?>: kotlin.Any): kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from=<set-test3>
CALL .setValue type=kotlin.Unit operator=null
$receiver: GET_BACKING_FIELD test3$delegate type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=null
thisRef: THIS public final class C type=C
property: CALLABLE_REFERENCE public final var test3: kotlin.Any type=kotlin.reflect.KMutableProperty1<C, kotlin.Any>
property: CALLABLE_REFERENCE test3 type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR <set-?> type=kotlin.Any operator=null
PROPERTY public var test4: kotlin.Any
delegate: PROPERTY val `test4$delegate`: java.util.HashMap<kotlin.String, kotlin.Any>
@@ -72,12 +72,12 @@ FILE /delegatedProperties.kt
CALL .getValue type=kotlin.Any operator=null
$receiver: GET_BACKING_FIELD test4$delegate type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null
thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE public var test4: kotlin.Any type=kotlin.reflect.KMutableProperty0<kotlin.Any>
property: CALLABLE_REFERENCE test4 type=kotlin.reflect.KMutableProperty0<kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY_SETTER public fun <set-test4>(/*0*/ <set-?>: kotlin.Any): kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from=<set-test4>
CALL .setValue type=kotlin.Unit operator=null
$receiver: GET_BACKING_FIELD test4$delegate type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null
thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE public var test4: kotlin.Any type=kotlin.reflect.KMutableProperty0<kotlin.Any>
property: CALLABLE_REFERENCE test4 type=kotlin.reflect.KMutableProperty0<kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR <set-?> type=kotlin.Any operator=null
@@ -9,14 +9,14 @@ FILE /localDelegatedProperties.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from=<anonymous>
CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE local final fun <anonymous>(): kotlin.Int type=() -> kotlin.Int
CALLABLE_REFERENCE <anonymous> type=() -> kotlin.Int operator=LAMBDA
LOCAL_PROPERTY_ACCESSOR <get-x>
BLOCK_BODY
RETURN type=kotlin.Nothing from=<get-x>
CALL .getValue type=kotlin.Int operator=null
$receiver: GET_VAR x$delegate type=kotlin.Lazy<kotlin.Int> operator=null
thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE val x: kotlin.Int type=kotlin.reflect.KProperty0<kotlin.Int>
property: CALLABLE_REFERENCE x type=kotlin.reflect.KProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE
CALL .println type=kotlin.Unit operator=null
message: CALL .<get-x> type=kotlin.Int operator=GET_LOCAL_PROPERTY
FUN public fun test2(): kotlin.Unit
@@ -30,7 +30,7 @@ FILE /localDelegatedProperties.kt
CALL .getValue type=kotlin.Int operator=null
$receiver: GET_VAR x$delegate type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null
thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE var x: kotlin.Int type=kotlin.reflect.KMutableProperty0<kotlin.Int>
property: CALLABLE_REFERENCE x type=kotlin.reflect.KMutableProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE
LOCAL_PROPERTY_ACCESSOR <set-x>
BLOCK_BODY
RETURN type=kotlin.Nothing from=<set-x>
@@ -38,7 +38,7 @@ FILE /localDelegatedProperties.kt
CALL .setValue type=kotlin.Unit operator=null
$receiver: GET_VAR x$delegate type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null
thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE var x: kotlin.Int type=kotlin.reflect.KMutableProperty0<kotlin.Int>
property: CALLABLE_REFERENCE x type=kotlin.reflect.KMutableProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR value type=kotlin.Int operator=null
CALL .<set-x> type=kotlin.Int operator=EQ
value: CONST Int type=kotlin.Int value='0'