[FIR] Support assignment operators

This commit is contained in:
Dmitriy Novozhilov
2019-10-28 16:10:10 +03:00
parent 6298889358
commit b93357be48
26 changed files with 354 additions and 68 deletions
@@ -19,24 +19,44 @@ FILE fqName:<root> fileName:/augmentedAssignment1.kt
VAR name:x type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
SET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=1
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=1
SET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=2
CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=2
SET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=3
CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=3
SET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=4
CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=4
SET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=5
CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int [var] declared in <root>.testVariable' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=5
FUN name:testProperty visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: CONST Int type=kotlin.Int value=1
value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=1
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: CONST Int type=kotlin.Int value=2
value: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=2
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: CONST Int type=kotlin.Int value=3
value: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=3
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: CONST Int type=kotlin.Int value=4
value: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=4
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: CONST Int type=kotlin.Int value=5
value: CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=5