Introduce IrGetValue as a replacement for IrThisReference / IrGetExtensionReceiver / IrGetVariable.

This commit is contained in:
Dmitry Petrov
2016-09-30 17:45:41 +03:00
parent 8efe326904
commit a51efaacc9
82 changed files with 409 additions and 457 deletions
+16 -16
View File
@@ -12,7 +12,7 @@ FILE /dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
PROPERTY public final val y: kotlin.String
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String
EXPRESSION_BODY
@@ -21,7 +21,7 @@ FILE /dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): String'
GET_FIELD 'y: String' type=kotlin.String origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
PROPERTY public final val z: kotlin.Any
FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Any
EXPRESSION_BODY
@@ -30,22 +30,22 @@ FILE /dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Any'
GET_FIELD 'z: Any' type=kotlin.Any origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='component1(): Int'
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='component2(): String'
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component3(): kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='component3(): Any'
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Int = ..., y: kotlin.String = ..., z: kotlin.Any = ...): Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='copy(Int = ..., String = ..., Any = ...): Test1'
@@ -60,15 +60,15 @@ FILE /dataClasses.kt
CONST String type=kotlin.String value='Test1('
CONST String type=kotlin.String value='x='
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='y='
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='z='
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
CONST String type=kotlin.String value=')'
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
BLOCK_BODY
@@ -77,7 +77,7 @@ FILE /dataClasses.kt
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int origin=null
$this: CALL 'times(Int): Int' type=kotlin.Int origin=null
@@ -85,7 +85,7 @@ FILE /dataClasses.kt
other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int origin=null
$this: CALL 'times(Int): Int' type=kotlin.Int origin=null
@@ -93,7 +93,7 @@ FILE /dataClasses.kt
other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
RETURN type=kotlin.Nothing from='hashCode(): Int'
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
@@ -101,7 +101,7 @@ FILE /dataClasses.kt
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ
arg0: THIS of 'Test1' type=Test1
arg0: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='true'
@@ -119,7 +119,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg1: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -129,7 +129,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg1: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -139,7 +139,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg1: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'