[FIR-TEST] Move analysis tests to separate module

This commit is contained in:
Dmitriy Novozhilov
2020-03-18 15:10:46 +03:00
parent 3a479d5d16
commit cc07ae96b3
1477 changed files with 1001 additions and 980 deletions
@@ -0,0 +1,136 @@
digraph overridenOpenVal_kt {
graph [nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function <init>" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
2 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
subgraph cluster_1 {
color=red
3 [label="Enter function getter" style="filled" fillcolor=red];
4 [label="Exit function getter" style="filled" fillcolor=red];
}
3 -> {4};
subgraph cluster_2 {
color=red
5 [label="Enter property" style="filled" fillcolor=red];
6 [label="Access variable R|<local>/x|"];
7 [label="Exit property" style="filled" fillcolor=red];
}
5 -> {6};
6 -> {7};
subgraph cluster_3 {
color=red
8 [label="Enter function <init>" style="filled" fillcolor=red];
9 [label="Access variable R|<local>/x|"];
10 [label="Delegated constructor call: super<R|A|>(...)"];
11 [label="Exit function <init>" style="filled" fillcolor=red];
}
8 -> {9};
9 -> {10};
10 -> {11};
subgraph cluster_4 {
color=red
12 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
13 [label="Enter when"];
subgraph cluster_6 {
color=blue
14 [label="Enter when branch condition "];
15 [label="Access variable R|/A.x|"];
16 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"];
17 [label="Exit when branch condition"];
}
18 [label="Synthetic else branch"];
19 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
20 [label="Enter block"];
21 [label="Access variable R|/A.x|"];
22 [label="Access variable R|kotlin/String.length|"];
23 [label="Exit block"];
}
24 [label="Exit when branch result"];
25 [label="Exit when"];
}
26 [label="Exit function test_1" style="filled" fillcolor=red];
}
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {19 18};
18 -> {25};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
subgraph cluster_8 {
color=red
27 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
28 [label="Enter when"];
subgraph cluster_10 {
color=blue
29 [label="Enter when branch condition "];
30 [label="Access variable R|<local>/b|"];
31 [label="Access variable R|/A.x|"];
32 [label="Type operator: (R|<local>/b|.R|/A.x| is R|kotlin/String|)"];
33 [label="Exit when branch condition"];
}
34 [label="Synthetic else branch"];
35 [label="Enter when branch result"];
subgraph cluster_11 {
color=blue
36 [label="Enter block"];
37 [label="Access variable R|<local>/b|"];
38 [label="Access variable R|/A.x|"];
39 [label="Access variable R|kotlin/String.length|"];
40 [label="Exit block"];
}
41 [label="Exit when branch result"];
42 [label="Exit when"];
}
43 [label="Exit function test_2" style="filled" fillcolor=red];
}
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {35 34};
34 -> {42};
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
}
@@ -0,0 +1,16 @@
// !DUMP_CFG
open class A(open val x: Any)
class B(x: Any) : A(x) {
fun test_1() {
if (x is String) {
x.length
}
}
}
fun test_2(b: B) {
if (b.x is String) {
b.x.length
}
}
@@ -0,0 +1,33 @@
FILE: overridenOpenVal.kt
public open class A : R|kotlin/Any| {
public constructor(x: R|kotlin/Any|): R|A| {
super<R|kotlin/Any|>()
}
public open val x: R|kotlin/Any| = R|<local>/x|
public get(): R|kotlin/Any|
}
public final class B : R|A| {
public constructor(x: R|kotlin/Any|): R|B| {
super<R|A|>(R|<local>/x|)
}
public final fun test_1(): R|kotlin/Unit| {
when () {
(this@R|/B|.R|/A.x| is R|kotlin/String|) -> {
this@R|/B|.R|/A.x|.R|kotlin/String.length|
}
}
}
}
public final fun test_2(b: R|B|): R|kotlin/Unit| {
when () {
(R|<local>/b|.R|/A.x| is R|kotlin/String|) -> {
R|<local>/b|.R|/A.x|.R|kotlin/String.length|
}
}
}