[FE 1.0] Always create return value for CallInstruction

This fixes missing `USED_AS_EXPRESSION` recordings
^KT-47527 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-06-30 16:40:55 +03:00
committed by TeamCityServer
parent b2372ff0b9
commit ae608ea67f
50 changed files with 496 additions and 204 deletions
+3 -3
View File
@@ -45,14 +45,14 @@ L0:
- call(doSomething(), doSomething|<v1>) -> <v2> PREV:[]
- mark(bar().doSomething()) PREV:[]
- mark(bar()) PREV:[]
- call(bar(), bar) PREV:[]
- call(bar(), bar) -> <v3> PREV:[]
- jmp(error) NEXT:[<ERROR>] PREV:[]
- mark(doSomething()) PREV:[]
- call(doSomething(), doSomething|!<v3>) -> <v4> PREV:[]
- call(doSomething(), doSomething|<v3>) -> <v4> PREV:[]
L1:
1 <END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[jmp(error)]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
+8 -8
View File
@@ -13,12 +13,12 @@ fun foo() {
bar().doSomething()
}
---------------------
null <v0>: * NEW: r(null) -> <v0>
null!! <v1>: * NEW: magic[NOT_NULL_ASSERTION](null!!|<v0>) -> <v1>
doSomething() <v2>: * NEW: call(doSomething(), doSomething|<v1>) -> <v2>
null!!.doSomething() <v2>: * COPY
bar() !<v3>: *
doSomething() <v4>: * NEW: call(doSomething(), doSomething|!<v3>) -> <v4>
bar().doSomething() <v4>: * COPY
{ null!!.doSomething() bar().doSomething() } <v4>: * COPY
null <v0>: * NEW: r(null) -> <v0>
null!! <v1>: * NEW: magic[NOT_NULL_ASSERTION](null!!|<v0>) -> <v1>
doSomething() <v2>: * NEW: call(doSomething(), doSomething|<v1>) -> <v2>
null!!.doSomething() <v2>: * COPY
bar() <v3>: * NEW: call(bar(), bar) -> <v3>
doSomething() <v4>: * NEW: call(doSomething(), doSomething|<v3>) -> <v4>
bar().doSomething() <v4>: * COPY
{ null!!.doSomething() bar().doSomething() } <v4>: * COPY
=====================