Files
kotlin-fork/compiler/testData/cfg/expressions/nothingExpr.instructions
T
Dmitriy Novozhilov ae608ea67f [FE 1.0] Always create return value for CallInstruction
This fixes missing `USED_AS_EXPRESSION` recordings
^KT-47527 Fixed
2021-07-02 17:55:20 +03:00

59 lines
2.0 KiB
Plaintext
Vendored

== doSomething ==
fun Any?.doSomething() {}
---------------------
L0:
1 <START>
2 mark({})
read (Unit)
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== bar ==
fun bar(): Nothing = throw Exception()
---------------------
L0:
1 <START>
mark(throw Exception())
mark(Exception())
call(Exception(), <init>) -> <v0>
throw (throw Exception()|<v0>) NEXT:[<ERROR>]
L1:
<END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[throw (throw Exception()|<v0>)]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== foo ==
fun foo() {
null!!.doSomething()
bar().doSomething()
}
---------------------
L0:
1 <START>
2 mark({ null!!.doSomething() bar().doSomething() })
mark(null!!.doSomething())
r(null) -> <v0>
magic[NOT_NULL_ASSERTION](null!!|<v0>) -> <v1>
jmp(error) NEXT:[<ERROR>]
- mark(doSomething()) PREV:[]
- call(doSomething(), doSomething|<v1>) -> <v2> PREV:[]
- mark(bar().doSomething()) PREV:[]
- mark(bar()) PREV:[]
- call(bar(), bar) -> <v3> PREV:[]
- jmp(error) NEXT:[<ERROR>] PREV:[]
- mark(doSomething()) PREV:[]
- call(doSomething(), doSomething|<v3>) -> <v4> PREV:[]
L1:
1 <END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[jmp(error)]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================