FIR: don't flatten for loop blocks in raw FIR builder
This commit is contained in:
+61
-54
@@ -191,63 +191,68 @@ digraph complex_kt {
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
56 [label="Enter block"];
|
||||
57 [label="Access variable this@R|/firstIsInstanceOrNull|"];
|
||||
58 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()"];
|
||||
59 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
60 [label="Enter while loop"];
|
||||
57 [label="Enter block"];
|
||||
58 [label="Access variable this@R|/firstIsInstanceOrNull|"];
|
||||
59 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()"];
|
||||
60 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
61 [label="Enter loop condition"];
|
||||
62 [label="Access variable R|<local>/<iterator>|"];
|
||||
63 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
64 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
65 [label="Enter loop block"];
|
||||
61 [label="Enter while loop"];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
62 [label="Enter loop condition"];
|
||||
63 [label="Access variable R|<local>/<iterator>|"];
|
||||
64 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
65 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
66 [label="Enter block"];
|
||||
67 [label="Access variable R|<local>/<iterator>|"];
|
||||
68 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
|
||||
69 [label="Variable declaration: lval element: R|kotlin/Any?|"];
|
||||
66 [label="Enter loop block"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
70 [label="Enter when"];
|
||||
67 [label="Enter block"];
|
||||
68 [label="Access variable R|<local>/<iterator>|"];
|
||||
69 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
|
||||
70 [label="Variable declaration: lval element: R|kotlin/Any?|"];
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
71 [label="Enter when branch condition "];
|
||||
72 [label="Access variable R|<local>/element|"];
|
||||
73 [label="Type operator: (R|<local>/element| is R|T|)"];
|
||||
74 [label="Exit when branch condition"];
|
||||
71 [label="Enter when"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
72 [label="Enter when branch condition "];
|
||||
73 [label="Access variable R|<local>/element|"];
|
||||
74 [label="Type operator: (R|<local>/element| is R|T|)"];
|
||||
75 [label="Exit when branch condition"];
|
||||
}
|
||||
76 [label="Synthetic else branch"];
|
||||
77 [label="Enter when branch result"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
78 [label="Enter block"];
|
||||
79 [label="Access variable R|<local>/element|"];
|
||||
80 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
|
||||
81 [label="Stub" style="filled" fillcolor=gray];
|
||||
82 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
83 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
84 [label="Exit when"];
|
||||
}
|
||||
75 [label="Synthetic else branch"];
|
||||
76 [label="Enter when branch result"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
77 [label="Enter block"];
|
||||
78 [label="Access variable R|<local>/element|"];
|
||||
79 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
|
||||
80 [label="Stub" style="filled" fillcolor=gray];
|
||||
81 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
82 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
83 [label="Exit when"];
|
||||
85 [label="Exit block"];
|
||||
}
|
||||
84 [label="Exit block"];
|
||||
86 [label="Exit loop block"];
|
||||
}
|
||||
85 [label="Exit loop block"];
|
||||
87 [label="Exit whileloop"];
|
||||
}
|
||||
86 [label="Exit whileloop"];
|
||||
88 [label="Exit block"];
|
||||
}
|
||||
87 [label="Const: Null(null)"];
|
||||
88 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
|
||||
89 [label="Stub" style="filled" fillcolor=gray];
|
||||
90 [label="Exit block" style="filled" fillcolor=gray];
|
||||
89 [label="Const: Null(null)"];
|
||||
90 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
|
||||
91 [label="Stub" style="filled" fillcolor=gray];
|
||||
92 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
91 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
|
||||
93 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
|
||||
}
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
@@ -258,8 +263,8 @@ digraph complex_kt {
|
||||
61 -> {62};
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
64 -> {86 65};
|
||||
65 -> {66};
|
||||
64 -> {65};
|
||||
65 -> {87 66};
|
||||
66 -> {67};
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
@@ -268,24 +273,26 @@ digraph complex_kt {
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {74};
|
||||
74 -> {76 75};
|
||||
75 -> {83};
|
||||
76 -> {77};
|
||||
74 -> {75};
|
||||
75 -> {77 76};
|
||||
76 -> {84};
|
||||
77 -> {78};
|
||||
78 -> {79};
|
||||
79 -> {91};
|
||||
79 -> {80} [style=dotted];
|
||||
79 -> {80};
|
||||
80 -> {93};
|
||||
80 -> {81} [style=dotted];
|
||||
81 -> {82} [style=dotted];
|
||||
82 -> {83} [style=dotted];
|
||||
83 -> {84};
|
||||
83 -> {84} [style=dotted];
|
||||
84 -> {85};
|
||||
85 -> {61} [color=green style=dashed];
|
||||
86 -> {87};
|
||||
85 -> {86};
|
||||
86 -> {62} [color=green style=dashed];
|
||||
87 -> {88};
|
||||
88 -> {91};
|
||||
88 -> {89} [style=dotted];
|
||||
89 -> {90} [style=dotted];
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {93};
|
||||
90 -> {91} [style=dotted];
|
||||
91 -> {92} [style=dotted];
|
||||
92 -> {93} [style=dotted];
|
||||
|
||||
}
|
||||
|
||||
@@ -25,13 +25,16 @@ FILE: complex.kt
|
||||
|
||||
}
|
||||
public final inline fun <reified T : R|kotlin/Any|> R|kotlin/collections/List<*>|.firstIsInstanceOrNull(): R|T?| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>| = this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval element: R|kotlin/Any?| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()
|
||||
when () {
|
||||
(R|<local>/element| is R|T|) -> {
|
||||
^firstIsInstanceOrNull R|<local>/element|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>| = this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval element: R|kotlin/Any?| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()
|
||||
when () {
|
||||
(R|<local>/element| is R|T|) -> {
|
||||
^firstIsInstanceOrNull R|<local>/element|
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+276
-269
@@ -118,44 +118,49 @@ digraph loops_kt {
|
||||
subgraph cluster_13 {
|
||||
color=blue
|
||||
37 [label="Enter block"];
|
||||
38 [label="Const: Int(0)"];
|
||||
39 [label="Const: Int(5)"];
|
||||
40 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
|
||||
41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
|
||||
42 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
|
||||
subgraph cluster_14 {
|
||||
color=blue
|
||||
43 [label="Enter while loop"];
|
||||
38 [label="Enter block"];
|
||||
39 [label="Const: Int(0)"];
|
||||
40 [label="Const: Int(5)"];
|
||||
41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
|
||||
42 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
|
||||
43 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
44 [label="Enter loop condition"];
|
||||
45 [label="Access variable R|<local>/<iterator>|"];
|
||||
46 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
47 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
48 [label="Enter loop block"];
|
||||
44 [label="Enter while loop"];
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
45 [label="Enter loop condition"];
|
||||
46 [label="Access variable R|<local>/<iterator>|"];
|
||||
47 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
48 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
49 [label="Enter block"];
|
||||
50 [label="Access variable R|<local>/<iterator>|"];
|
||||
51 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
|
||||
52 [label="Variable declaration: lval i: R|kotlin/Int|"];
|
||||
53 [label="Access variable R|<local>/x|"];
|
||||
54 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
55 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
|
||||
56 [label="Exit block"];
|
||||
49 [label="Enter loop block"];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
50 [label="Enter block"];
|
||||
51 [label="Access variable R|<local>/<iterator>|"];
|
||||
52 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
|
||||
53 [label="Variable declaration: lval i: R|kotlin/Int|"];
|
||||
54 [label="Access variable R|<local>/x|"];
|
||||
55 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
56 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
|
||||
57 [label="Exit block"];
|
||||
}
|
||||
58 [label="Exit loop block"];
|
||||
}
|
||||
57 [label="Exit loop block"];
|
||||
59 [label="Exit whileloop"];
|
||||
}
|
||||
58 [label="Exit whileloop"];
|
||||
60 [label="Exit block"];
|
||||
}
|
||||
59 [label="Access variable R|<local>/x|"];
|
||||
60 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
61 [label="Exit block"];
|
||||
61 [label="Access variable R|<local>/x|"];
|
||||
62 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
63 [label="Exit block"];
|
||||
}
|
||||
62 [label="Exit function testFor" style="filled" fillcolor=red];
|
||||
64 [label="Exit function testFor" style="filled" fillcolor=red];
|
||||
}
|
||||
36 -> {37};
|
||||
37 -> {38};
|
||||
@@ -168,8 +173,8 @@ digraph loops_kt {
|
||||
44 -> {45};
|
||||
45 -> {46};
|
||||
46 -> {47};
|
||||
47 -> {58 48};
|
||||
48 -> {49};
|
||||
47 -> {48};
|
||||
48 -> {59 49};
|
||||
49 -> {50};
|
||||
50 -> {51};
|
||||
51 -> {52};
|
||||
@@ -178,226 +183,226 @@ digraph loops_kt {
|
||||
54 -> {55};
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
57 -> {44} [color=green style=dashed];
|
||||
58 -> {59};
|
||||
57 -> {58};
|
||||
58 -> {45} [color=green style=dashed];
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
|
||||
subgraph cluster_18 {
|
||||
subgraph cluster_19 {
|
||||
color=red
|
||||
63 [label="Enter function testWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_19 {
|
||||
65 [label="Enter function testWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
64 [label="Enter block"];
|
||||
subgraph cluster_20 {
|
||||
66 [label="Enter block"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
65 [label="Enter while loop"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
66 [label="Enter loop condition"];
|
||||
67 [label="Const: Boolean(true)"];
|
||||
68 [label="Exit loop condition"];
|
||||
}
|
||||
67 [label="Enter while loop"];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
69 [label="Enter loop block"];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
70 [label="Enter block"];
|
||||
71 [label="Const: Int(1)"];
|
||||
72 [label="Exit block"];
|
||||
}
|
||||
73 [label="Exit loop block"];
|
||||
68 [label="Enter loop condition"];
|
||||
69 [label="Const: Boolean(true)"];
|
||||
70 [label="Exit loop condition"];
|
||||
}
|
||||
74 [label="Exit whileloop" style="filled" fillcolor=gray];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
71 [label="Enter loop block"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
72 [label="Enter block"];
|
||||
73 [label="Const: Int(1)"];
|
||||
74 [label="Exit block"];
|
||||
}
|
||||
75 [label="Exit loop block"];
|
||||
}
|
||||
76 [label="Exit whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
75 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
76 [label="Exit block" style="filled" fillcolor=gray];
|
||||
77 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
78 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
77 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
79 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
63 -> {64};
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
66 -> {67};
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
68 -> {74} [style=dotted];
|
||||
69 -> {70};
|
||||
70 -> {71};
|
||||
70 -> {76} [style=dotted];
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {66} [color=green style=dashed];
|
||||
74 -> {75} [style=dotted];
|
||||
75 -> {76} [style=dotted];
|
||||
73 -> {74};
|
||||
74 -> {75};
|
||||
75 -> {68} [color=green style=dashed];
|
||||
76 -> {77} [style=dotted];
|
||||
77 -> {78} [style=dotted];
|
||||
78 -> {79} [style=dotted];
|
||||
|
||||
subgraph cluster_24 {
|
||||
subgraph cluster_25 {
|
||||
color=red
|
||||
78 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_25 {
|
||||
80 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
79 [label="Enter block"];
|
||||
subgraph cluster_26 {
|
||||
81 [label="Enter block"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
80 [label="Enter while loop"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
81 [label="Enter loop condition"];
|
||||
82 [label="Const: Boolean(true)"];
|
||||
83 [label="Exit loop condition"];
|
||||
}
|
||||
82 [label="Enter while loop"];
|
||||
subgraph cluster_28 {
|
||||
color=blue
|
||||
84 [label="Enter loop block"];
|
||||
subgraph cluster_29 {
|
||||
83 [label="Enter loop condition"];
|
||||
84 [label="Const: Boolean(true)"];
|
||||
85 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_29 {
|
||||
color=blue
|
||||
86 [label="Enter loop block"];
|
||||
subgraph cluster_30 {
|
||||
color=blue
|
||||
85 [label="Enter block"];
|
||||
subgraph cluster_30 {
|
||||
87 [label="Enter block"];
|
||||
subgraph cluster_31 {
|
||||
color=blue
|
||||
86 [label="Enter when"];
|
||||
subgraph cluster_31 {
|
||||
color=blue
|
||||
87 [label="Enter when branch condition "];
|
||||
88 [label="Access variable R|<local>/b|"];
|
||||
89 [label="Exit when branch condition"];
|
||||
}
|
||||
90 [label="Synthetic else branch"];
|
||||
91 [label="Enter when branch result"];
|
||||
88 [label="Enter when"];
|
||||
subgraph cluster_32 {
|
||||
color=blue
|
||||
92 [label="Enter block"];
|
||||
93 [label="Jump: break@@@[Boolean(true)] "];
|
||||
94 [label="Stub" style="filled" fillcolor=gray];
|
||||
95 [label="Exit block" style="filled" fillcolor=gray];
|
||||
89 [label="Enter when branch condition "];
|
||||
90 [label="Access variable R|<local>/b|"];
|
||||
91 [label="Exit when branch condition"];
|
||||
}
|
||||
96 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
97 [label="Exit when"];
|
||||
92 [label="Synthetic else branch"];
|
||||
93 [label="Enter when branch result"];
|
||||
subgraph cluster_33 {
|
||||
color=blue
|
||||
94 [label="Enter block"];
|
||||
95 [label="Jump: break@@@[Boolean(true)] "];
|
||||
96 [label="Stub" style="filled" fillcolor=gray];
|
||||
97 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
98 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
99 [label="Exit when"];
|
||||
}
|
||||
98 [label="Exit block"];
|
||||
100 [label="Exit block"];
|
||||
}
|
||||
99 [label="Exit loop block"];
|
||||
101 [label="Exit loop block"];
|
||||
}
|
||||
100 [label="Exit whileloop"];
|
||||
102 [label="Exit whileloop"];
|
||||
}
|
||||
101 [label="Const: Int(1)"];
|
||||
102 [label="Exit block"];
|
||||
103 [label="Const: Int(1)"];
|
||||
104 [label="Exit block"];
|
||||
}
|
||||
103 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
105 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
}
|
||||
78 -> {79};
|
||||
79 -> {80};
|
||||
80 -> {81};
|
||||
81 -> {82};
|
||||
82 -> {83};
|
||||
83 -> {84};
|
||||
83 -> {100} [style=dotted];
|
||||
84 -> {85};
|
||||
85 -> {86};
|
||||
85 -> {102} [style=dotted];
|
||||
86 -> {87};
|
||||
87 -> {88};
|
||||
88 -> {89};
|
||||
89 -> {91 90};
|
||||
90 -> {97};
|
||||
91 -> {92};
|
||||
92 -> {93};
|
||||
93 -> {100};
|
||||
93 -> {94} [style=dotted];
|
||||
94 -> {95} [style=dotted];
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
91 -> {93 92};
|
||||
92 -> {99};
|
||||
93 -> {94};
|
||||
94 -> {95};
|
||||
95 -> {102};
|
||||
95 -> {96} [style=dotted];
|
||||
96 -> {97} [style=dotted];
|
||||
97 -> {98};
|
||||
98 -> {99};
|
||||
99 -> {81} [color=green style=dashed];
|
||||
97 -> {98} [style=dotted];
|
||||
98 -> {99} [style=dotted];
|
||||
99 -> {100};
|
||||
100 -> {101};
|
||||
101 -> {102};
|
||||
101 -> {83} [color=green style=dashed];
|
||||
102 -> {103};
|
||||
103 -> {104};
|
||||
104 -> {105};
|
||||
|
||||
subgraph cluster_33 {
|
||||
subgraph cluster_34 {
|
||||
color=red
|
||||
104 [label="Enter function testWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_34 {
|
||||
106 [label="Enter function testWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_35 {
|
||||
color=blue
|
||||
105 [label="Enter block"];
|
||||
subgraph cluster_35 {
|
||||
107 [label="Enter block"];
|
||||
subgraph cluster_36 {
|
||||
color=blue
|
||||
106 [label="Enter while loop"];
|
||||
subgraph cluster_36 {
|
||||
color=blue
|
||||
107 [label="Enter loop condition"];
|
||||
108 [label="Const: Boolean(false)"];
|
||||
109 [label="Exit loop condition"];
|
||||
}
|
||||
108 [label="Enter while loop"];
|
||||
subgraph cluster_37 {
|
||||
color=blue
|
||||
110 [label="Enter loop block" style="filled" fillcolor=gray];
|
||||
subgraph cluster_38 {
|
||||
color=blue
|
||||
111 [label="Enter block" style="filled" fillcolor=gray];
|
||||
112 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
113 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
114 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
109 [label="Enter loop condition"];
|
||||
110 [label="Const: Boolean(false)"];
|
||||
111 [label="Exit loop condition"];
|
||||
}
|
||||
115 [label="Exit whileloop"];
|
||||
subgraph cluster_38 {
|
||||
color=blue
|
||||
112 [label="Enter loop block" style="filled" fillcolor=gray];
|
||||
subgraph cluster_39 {
|
||||
color=blue
|
||||
113 [label="Enter block" style="filled" fillcolor=gray];
|
||||
114 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
115 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
116 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
}
|
||||
117 [label="Exit whileloop"];
|
||||
}
|
||||
116 [label="Const: Int(1)"];
|
||||
117 [label="Exit block"];
|
||||
118 [label="Const: Int(1)"];
|
||||
119 [label="Exit block"];
|
||||
}
|
||||
118 [label="Exit function testWhileFalse" style="filled" fillcolor=red];
|
||||
120 [label="Exit function testWhileFalse" style="filled" fillcolor=red];
|
||||
}
|
||||
104 -> {105};
|
||||
105 -> {106};
|
||||
106 -> {107};
|
||||
107 -> {108};
|
||||
108 -> {109};
|
||||
109 -> {115};
|
||||
109 -> {110} [style=dotted];
|
||||
110 -> {111} [style=dotted];
|
||||
109 -> {110};
|
||||
110 -> {111};
|
||||
111 -> {117};
|
||||
111 -> {112} [style=dotted];
|
||||
112 -> {113} [style=dotted];
|
||||
113 -> {114} [style=dotted];
|
||||
114 -> {107} [color=green style=dotted];
|
||||
115 -> {116};
|
||||
116 -> {117};
|
||||
114 -> {115} [style=dotted];
|
||||
115 -> {116} [style=dotted];
|
||||
116 -> {109} [color=green style=dotted];
|
||||
117 -> {118};
|
||||
|
||||
subgraph cluster_39 {
|
||||
color=red
|
||||
119 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_40 {
|
||||
color=blue
|
||||
120 [label="Enter block"];
|
||||
subgraph cluster_41 {
|
||||
color=blue
|
||||
121 [label="Enter do-while loop"];
|
||||
subgraph cluster_42 {
|
||||
color=blue
|
||||
122 [label="Enter loop block"];
|
||||
subgraph cluster_43 {
|
||||
color=blue
|
||||
123 [label="Enter block"];
|
||||
124 [label="Const: Int(1)"];
|
||||
125 [label="Exit block"];
|
||||
}
|
||||
126 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_44 {
|
||||
color=blue
|
||||
127 [label="Enter loop condition"];
|
||||
128 [label="Const: Boolean(true)"];
|
||||
129 [label="Exit loop condition"];
|
||||
}
|
||||
130 [label="Exit do-whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
131 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
132 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
133 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
118 -> {119};
|
||||
119 -> {120};
|
||||
120 -> {121};
|
||||
|
||||
subgraph cluster_40 {
|
||||
color=red
|
||||
121 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_41 {
|
||||
color=blue
|
||||
122 [label="Enter block"];
|
||||
subgraph cluster_42 {
|
||||
color=blue
|
||||
123 [label="Enter do-while loop"];
|
||||
subgraph cluster_43 {
|
||||
color=blue
|
||||
124 [label="Enter loop block"];
|
||||
subgraph cluster_44 {
|
||||
color=blue
|
||||
125 [label="Enter block"];
|
||||
126 [label="Const: Int(1)"];
|
||||
127 [label="Exit block"];
|
||||
}
|
||||
128 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_45 {
|
||||
color=blue
|
||||
129 [label="Enter loop condition"];
|
||||
130 [label="Const: Boolean(true)"];
|
||||
131 [label="Exit loop condition"];
|
||||
}
|
||||
132 [label="Exit do-whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
133 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
134 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
135 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
121 -> {122};
|
||||
122 -> {123};
|
||||
123 -> {124};
|
||||
@@ -406,128 +411,128 @@ digraph loops_kt {
|
||||
126 -> {127};
|
||||
127 -> {128};
|
||||
128 -> {129};
|
||||
129 -> {130} [style=dotted];
|
||||
129 -> {122} [color=green style=dashed];
|
||||
130 -> {131} [style=dotted];
|
||||
129 -> {130};
|
||||
130 -> {131};
|
||||
131 -> {132} [style=dotted];
|
||||
131 -> {124} [color=green style=dashed];
|
||||
132 -> {133} [style=dotted];
|
||||
133 -> {134} [style=dotted];
|
||||
134 -> {135} [style=dotted];
|
||||
|
||||
subgraph cluster_45 {
|
||||
subgraph cluster_46 {
|
||||
color=red
|
||||
134 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_46 {
|
||||
136 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_47 {
|
||||
color=blue
|
||||
135 [label="Enter block"];
|
||||
subgraph cluster_47 {
|
||||
137 [label="Enter block"];
|
||||
subgraph cluster_48 {
|
||||
color=blue
|
||||
136 [label="Enter do-while loop"];
|
||||
subgraph cluster_48 {
|
||||
138 [label="Enter do-while loop"];
|
||||
subgraph cluster_49 {
|
||||
color=blue
|
||||
137 [label="Enter loop block"];
|
||||
subgraph cluster_49 {
|
||||
139 [label="Enter loop block"];
|
||||
subgraph cluster_50 {
|
||||
color=blue
|
||||
138 [label="Enter block"];
|
||||
subgraph cluster_50 {
|
||||
140 [label="Enter block"];
|
||||
subgraph cluster_51 {
|
||||
color=blue
|
||||
139 [label="Enter when"];
|
||||
subgraph cluster_51 {
|
||||
color=blue
|
||||
140 [label="Enter when branch condition "];
|
||||
141 [label="Access variable R|<local>/b|"];
|
||||
142 [label="Exit when branch condition"];
|
||||
}
|
||||
143 [label="Synthetic else branch"];
|
||||
144 [label="Enter when branch result"];
|
||||
141 [label="Enter when"];
|
||||
subgraph cluster_52 {
|
||||
color=blue
|
||||
145 [label="Enter block"];
|
||||
146 [label="Jump: break@@@[Boolean(true)] "];
|
||||
147 [label="Stub" style="filled" fillcolor=gray];
|
||||
148 [label="Exit block" style="filled" fillcolor=gray];
|
||||
142 [label="Enter when branch condition "];
|
||||
143 [label="Access variable R|<local>/b|"];
|
||||
144 [label="Exit when branch condition"];
|
||||
}
|
||||
149 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
150 [label="Exit when"];
|
||||
145 [label="Synthetic else branch"];
|
||||
146 [label="Enter when branch result"];
|
||||
subgraph cluster_53 {
|
||||
color=blue
|
||||
147 [label="Enter block"];
|
||||
148 [label="Jump: break@@@[Boolean(true)] "];
|
||||
149 [label="Stub" style="filled" fillcolor=gray];
|
||||
150 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
151 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
152 [label="Exit when"];
|
||||
}
|
||||
151 [label="Exit block"];
|
||||
153 [label="Exit block"];
|
||||
}
|
||||
152 [label="Exit loop block"];
|
||||
154 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_53 {
|
||||
subgraph cluster_54 {
|
||||
color=blue
|
||||
153 [label="Enter loop condition"];
|
||||
154 [label="Const: Boolean(true)"];
|
||||
155 [label="Exit loop condition"];
|
||||
155 [label="Enter loop condition"];
|
||||
156 [label="Const: Boolean(true)"];
|
||||
157 [label="Exit loop condition"];
|
||||
}
|
||||
156 [label="Exit do-whileloop"];
|
||||
158 [label="Exit do-whileloop"];
|
||||
}
|
||||
157 [label="Const: Int(1)"];
|
||||
158 [label="Exit block"];
|
||||
159 [label="Const: Int(1)"];
|
||||
160 [label="Exit block"];
|
||||
}
|
||||
159 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
161 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
}
|
||||
134 -> {135};
|
||||
135 -> {136};
|
||||
136 -> {137};
|
||||
137 -> {138};
|
||||
138 -> {139};
|
||||
139 -> {140};
|
||||
140 -> {141};
|
||||
141 -> {142};
|
||||
142 -> {144 143};
|
||||
143 -> {150};
|
||||
144 -> {145};
|
||||
145 -> {146};
|
||||
146 -> {156};
|
||||
146 -> {147} [style=dotted];
|
||||
147 -> {148} [style=dotted];
|
||||
142 -> {143};
|
||||
143 -> {144};
|
||||
144 -> {146 145};
|
||||
145 -> {152};
|
||||
146 -> {147};
|
||||
147 -> {148};
|
||||
148 -> {158};
|
||||
148 -> {149} [style=dotted];
|
||||
149 -> {150} [style=dotted];
|
||||
150 -> {151};
|
||||
151 -> {152};
|
||||
150 -> {151} [style=dotted];
|
||||
151 -> {152} [style=dotted];
|
||||
152 -> {153};
|
||||
153 -> {154};
|
||||
154 -> {155};
|
||||
155 -> {156} [style=dotted];
|
||||
155 -> {137} [color=green style=dashed];
|
||||
155 -> {156};
|
||||
156 -> {157};
|
||||
157 -> {158};
|
||||
157 -> {158} [style=dotted];
|
||||
157 -> {139} [color=green style=dashed];
|
||||
158 -> {159};
|
||||
|
||||
subgraph cluster_54 {
|
||||
color=red
|
||||
160 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_55 {
|
||||
color=blue
|
||||
161 [label="Enter block"];
|
||||
subgraph cluster_56 {
|
||||
color=blue
|
||||
162 [label="Enter do-while loop"];
|
||||
subgraph cluster_57 {
|
||||
color=blue
|
||||
163 [label="Enter loop block"];
|
||||
subgraph cluster_58 {
|
||||
color=blue
|
||||
164 [label="Enter block"];
|
||||
165 [label="Const: Int(1)"];
|
||||
166 [label="Exit block"];
|
||||
}
|
||||
167 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_59 {
|
||||
color=blue
|
||||
168 [label="Enter loop condition"];
|
||||
169 [label="Const: Boolean(false)"];
|
||||
170 [label="Exit loop condition"];
|
||||
}
|
||||
171 [label="Exit do-whileloop"];
|
||||
}
|
||||
172 [label="Const: Int(1)"];
|
||||
173 [label="Exit block"];
|
||||
}
|
||||
174 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
}
|
||||
159 -> {160};
|
||||
160 -> {161};
|
||||
161 -> {162};
|
||||
|
||||
subgraph cluster_55 {
|
||||
color=red
|
||||
162 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_56 {
|
||||
color=blue
|
||||
163 [label="Enter block"];
|
||||
subgraph cluster_57 {
|
||||
color=blue
|
||||
164 [label="Enter do-while loop"];
|
||||
subgraph cluster_58 {
|
||||
color=blue
|
||||
165 [label="Enter loop block"];
|
||||
subgraph cluster_59 {
|
||||
color=blue
|
||||
166 [label="Enter block"];
|
||||
167 [label="Const: Int(1)"];
|
||||
168 [label="Exit block"];
|
||||
}
|
||||
169 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_60 {
|
||||
color=blue
|
||||
170 [label="Enter loop condition"];
|
||||
171 [label="Const: Boolean(false)"];
|
||||
172 [label="Exit loop condition"];
|
||||
}
|
||||
173 [label="Exit do-whileloop"];
|
||||
}
|
||||
174 [label="Const: Int(1)"];
|
||||
175 [label="Exit block"];
|
||||
}
|
||||
176 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
}
|
||||
162 -> {163};
|
||||
163 -> {164};
|
||||
164 -> {165};
|
||||
@@ -537,9 +542,11 @@ digraph loops_kt {
|
||||
168 -> {169};
|
||||
169 -> {170};
|
||||
170 -> {171};
|
||||
170 -> {163} [color=green style=dotted];
|
||||
171 -> {172};
|
||||
172 -> {173};
|
||||
172 -> {165} [color=green style=dotted];
|
||||
173 -> {174};
|
||||
174 -> {175};
|
||||
175 -> {176};
|
||||
|
||||
}
|
||||
|
||||
@@ -14,10 +14,13 @@ FILE: loops.kt
|
||||
(R|<local>/x| is R|kotlin/String|)
|
||||
}
|
||||
public final fun testFor(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval y: R|kotlin/Boolean| = (R|<local>/x| is R|kotlin/String|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval y: R|kotlin/Boolean| = (R|<local>/x| is R|kotlin/String|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
(R|<local>/x| is R|kotlin/String|)
|
||||
|
||||
+7
-4
@@ -20,10 +20,13 @@ FILE: enumValues.kt
|
||||
}
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval values: R|kotlin/Array<MyEnum>| = Q|MyEnum|.R|/MyEnum.values|()
|
||||
lval <iterator>: R|kotlin/collections/Iterator<MyEnum>| = R|<local>/values|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<MyEnum>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval value: R|MyEnum| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|MyEnum|>|()
|
||||
R|<local>/value|.R|/MyEnum.bar|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<MyEnum>| = R|<local>/values|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<MyEnum>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval value: R|MyEnum| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|MyEnum|>|()
|
||||
R|<local>/value|.R|/MyEnum.bar|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval first: R|MyEnum| = Q|MyEnum|.R|/MyEnum.valueOf|(String(FIRST))
|
||||
|
||||
+7
-4
@@ -66,10 +66,13 @@ FILE: CanBeValChecker.kt
|
||||
public final fun stackOverflowBug(): R|kotlin/Unit| {
|
||||
lvar a: R|kotlin/Int|
|
||||
R|<local>/a| = Int(1)
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(10)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
R|kotlin/io/print|(R|<local>/i|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(10)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
R|kotlin/io/print|(R|<local>/i|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Vendored
+18
-9
@@ -1,8 +1,11 @@
|
||||
FILE: NoWarning.kt
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntRange| = Int(3).R|kotlin/Int.rangeTo|(Int(4))
|
||||
@@ -14,9 +17,12 @@ FILE: NoWarning.kt
|
||||
|
||||
}
|
||||
public final fun backward(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/ranges/downTo|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/ranges/downTo|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntProgression| = Int(4).R|kotlin/ranges/downTo|(Int(3))
|
||||
@@ -28,9 +34,12 @@ FILE: NoWarning.kt
|
||||
|
||||
}
|
||||
public final fun until(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/until|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/until|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntRange| = Int(3).R|kotlin/ranges/until|(Int(4))
|
||||
|
||||
Vendored
+18
-9
@@ -1,8 +1,11 @@
|
||||
FILE: Warning.kt
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntRange| = Int(10).R|kotlin/Int.rangeTo|(Int(0))
|
||||
@@ -14,9 +17,12 @@ FILE: Warning.kt
|
||||
|
||||
}
|
||||
public final fun backward(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/downTo|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/downTo|(Int(2)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntProgression| = Int(-3).R|kotlin/ranges/downTo|(Int(4))
|
||||
@@ -28,9 +34,12 @@ FILE: Warning.kt
|
||||
|
||||
}
|
||||
public final fun until(): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/until|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/ranges/until|(Int(1)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval a: R|kotlin/ranges/IntRange| = Int(4).R|kotlin/ranges/until|(Int(3))
|
||||
|
||||
Vendored
+14
-11
@@ -3,18 +3,21 @@ FILE: manyLocalVariables.kt
|
||||
lvar a: R|kotlin/Int| = Int(1)
|
||||
lvar b: R|kotlin/Int| = Int(2)
|
||||
lvar c: R|kotlin/Int| = Int(3)
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
when () {
|
||||
==(R|<local>/a|, Int(2)) -> {
|
||||
R|<local>/b| = R|<local>/c|
|
||||
R|<local>/c| = R|<local>/a|
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b| = R|<local>/a|
|
||||
R|<local>/c| = R|<local>/b|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
when () {
|
||||
==(R|<local>/a|, Int(2)) -> {
|
||||
R|<local>/b| = R|<local>/c|
|
||||
R|<local>/c| = R|<local>/a|
|
||||
}
|
||||
else -> {
|
||||
R|<local>/b| = R|<local>/a|
|
||||
R|<local>/c| = R|<local>/b|
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,12 +8,15 @@ FILE: fib.kt
|
||||
|
||||
lvar current: R|kotlin/Int| = Int(1)
|
||||
lvar prev: R|kotlin/Int| = Int(1)
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(R|<local>/n|).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval temp: R|kotlin/Int| = R|<local>/current|
|
||||
R|<local>/current| = R|<local>/current|.R|kotlin/Int.plus|(R|<local>/prev|)
|
||||
R|<local>/prev| = R|<local>/temp|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(R|<local>/n|).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval temp: R|kotlin/Int| = R|<local>/current|
|
||||
R|<local>/current| = R|<local>/current|.R|kotlin/Int.plus|(R|<local>/prev|)
|
||||
R|<local>/prev| = R|<local>/temp|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
^fibIterative R|<local>/current|
|
||||
|
||||
+14
-8
@@ -5,18 +5,24 @@ FILE: nestedExtensionFunctionType.kt
|
||||
R|<local>/f|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
}
|
||||
public final fun test_1(a: R|A|, ys: R|kotlin/collections/List<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/ys|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval y: R|(A) -> kotlin/Unit| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|(A) -> kotlin/Unit|>|()
|
||||
R|<local>/y|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/ys|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval y: R|(A) -> kotlin/Unit| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|(A) -> kotlin/Unit|>|()
|
||||
R|<local>/y|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_2(a: R|A|, vararg zs: @R|kotlin/ExtensionFunctionType|() R|kotlin/Array<out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/zs|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval z: R|(A) -> kotlin/Unit| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|(A) -> kotlin/Unit|>|()
|
||||
R|<local>/z|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<@ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>>| = R|<local>/zs|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out @ExtensionFunctionType kotlin/Function1<A, kotlin/Unit>)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval z: R|(A) -> kotlin/Unit| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|(A) -> kotlin/Unit|>|()
|
||||
R|<local>/z|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/a|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+442
-435
File diff suppressed because it is too large
Load Diff
+11
-8
@@ -10,17 +10,20 @@ FILE: boundSmartcastsInBranches.kt
|
||||
}
|
||||
public final fun test_0(list: R|kotlin/collections/List<A>|): R|kotlin/Unit| {
|
||||
lvar goodA: R|A?| = Null(null)
|
||||
lval <iterator>: R|kotlin/collections/Iterator<A>| = R|<local>/list|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<A>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval a: R|A| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|A|>|()
|
||||
when () {
|
||||
==(R|<local>/goodA|, Null(null)) -> {
|
||||
R|<local>/goodA| = R|<local>/a|
|
||||
continue@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()]
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<A>| = R|<local>/list|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<A>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval a: R|A| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|A|>|()
|
||||
when () {
|
||||
==(R|<local>/goodA|, Null(null)) -> {
|
||||
R|<local>/goodA| = R|<local>/a|
|
||||
continue@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()]
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/goodA|.R|/A.s|
|
||||
}
|
||||
|
||||
R|<local>/goodA|.R|/A.s|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+88
-81
@@ -166,83 +166,88 @@ digraph smartcastToNothing_kt {
|
||||
52 [label="Enter block"];
|
||||
53 [label="Const: Null(null)"];
|
||||
54 [label="Variable declaration: lvar s: R|A?|"];
|
||||
55 [label="Access variable R|<local>/results|"];
|
||||
56 [label="Function call: R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()"];
|
||||
57 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>|"];
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
58 [label="Enter while loop"];
|
||||
55 [label="Enter block"];
|
||||
56 [label="Access variable R|<local>/results|"];
|
||||
57 [label="Function call: R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()"];
|
||||
58 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>|"];
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
59 [label="Enter loop condition"];
|
||||
60 [label="Access variable R|<local>/<iterator>|"];
|
||||
61 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
62 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
63 [label="Enter loop block"];
|
||||
59 [label="Enter while loop"];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
60 [label="Enter loop condition"];
|
||||
61 [label="Access variable R|<local>/<iterator>|"];
|
||||
62 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
63 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
64 [label="Enter block"];
|
||||
65 [label="Access variable R|<local>/<iterator>|"];
|
||||
66 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()"];
|
||||
67 [label="Stub" style="filled" fillcolor=gray];
|
||||
68 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray];
|
||||
69 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
|
||||
70 [label="Stub" style="filled" fillcolor=gray];
|
||||
71 [label="Assignment: R|<local>/s|" style="filled" fillcolor=gray];
|
||||
64 [label="Enter loop block"];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
72 [label="Enter when" style="filled" fillcolor=gray];
|
||||
65 [label="Enter block"];
|
||||
66 [label="Access variable R|<local>/<iterator>|"];
|
||||
67 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()"];
|
||||
68 [label="Stub" style="filled" fillcolor=gray];
|
||||
69 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray];
|
||||
70 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
|
||||
71 [label="Stub" style="filled" fillcolor=gray];
|
||||
72 [label="Assignment: R|<local>/s|" style="filled" fillcolor=gray];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
73 [label="Enter when branch condition " style="filled" fillcolor=gray];
|
||||
74 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
|
||||
75 [label="Stub" style="filled" fillcolor=gray];
|
||||
76 [label="Access variable <Unresolved name: b>#" style="filled" fillcolor=gray];
|
||||
77 [label="Exit when branch condition" style="filled" fillcolor=gray];
|
||||
73 [label="Enter when" style="filled" fillcolor=gray];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
74 [label="Enter when branch condition " style="filled" fillcolor=gray];
|
||||
75 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
|
||||
76 [label="Stub" style="filled" fillcolor=gray];
|
||||
77 [label="Access variable <Unresolved name: b>#" style="filled" fillcolor=gray];
|
||||
78 [label="Exit when branch condition" style="filled" fillcolor=gray];
|
||||
}
|
||||
79 [label="Synthetic else branch" style="filled" fillcolor=gray];
|
||||
80 [label="Enter when branch result" style="filled" fillcolor=gray];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
81 [label="Enter block" style="filled" fillcolor=gray];
|
||||
82 [label="Jump: break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()] " style="filled" fillcolor=gray];
|
||||
83 [label="Stub" style="filled" fillcolor=gray];
|
||||
84 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
85 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
86 [label="Exit when" style="filled" fillcolor=gray];
|
||||
}
|
||||
78 [label="Synthetic else branch" style="filled" fillcolor=gray];
|
||||
79 [label="Enter when branch result" style="filled" fillcolor=gray];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
80 [label="Enter block" style="filled" fillcolor=gray];
|
||||
81 [label="Jump: break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()] " style="filled" fillcolor=gray];
|
||||
82 [label="Stub" style="filled" fillcolor=gray];
|
||||
83 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
84 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
85 [label="Exit when" style="filled" fillcolor=gray];
|
||||
87 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
86 [label="Exit block" style="filled" fillcolor=gray];
|
||||
88 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
}
|
||||
87 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
89 [label="Exit whileloop"];
|
||||
}
|
||||
88 [label="Exit whileloop"];
|
||||
90 [label="Exit block"];
|
||||
}
|
||||
89 [label="Access variable R|<local>/s|"];
|
||||
90 [label="Enter safe call"];
|
||||
91 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_23 {
|
||||
91 [label="Access variable R|<local>/s|"];
|
||||
92 [label="Enter safe call"];
|
||||
93 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
98 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_24 {
|
||||
100 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
99 [label="Enter block"];
|
||||
100 [label="Access variable R|<local>/it|"];
|
||||
101 [label="Access variable R|/A.a|"];
|
||||
102 [label="Exit block"];
|
||||
101 [label="Enter block"];
|
||||
102 [label="Access variable R|<local>/it|"];
|
||||
103 [label="Access variable R|/A.a|"];
|
||||
104 [label="Exit block"];
|
||||
}
|
||||
103 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
105 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
92 [label="Call arguments union" style="filled" fillcolor=yellow];
|
||||
93 [label="Postponed exit from lambda"];
|
||||
94 [label="Function call: $subj$.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)"];
|
||||
95 [label="Exit safe call"];
|
||||
96 [label="Exit block"];
|
||||
94 [label="Call arguments union" style="filled" fillcolor=yellow];
|
||||
95 [label="Postponed exit from lambda"];
|
||||
96 [label="Function call: $subj$.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)"];
|
||||
97 [label="Exit safe call"];
|
||||
98 [label="Exit block"];
|
||||
}
|
||||
97 [label="Exit function test_0" style="filled" fillcolor=red];
|
||||
99 [label="Exit function test_0" style="filled" fillcolor=red];
|
||||
}
|
||||
51 -> {52};
|
||||
52 -> {53};
|
||||
@@ -255,52 +260,54 @@ digraph smartcastToNothing_kt {
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
62 -> {88 63};
|
||||
63 -> {64};
|
||||
62 -> {63};
|
||||
63 -> {89 64};
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
66 -> {97} [label=onUncaughtException];
|
||||
66 -> {67} [style=dotted];
|
||||
66 -> {67};
|
||||
67 -> {99} [label=onUncaughtException];
|
||||
67 -> {68} [style=dotted];
|
||||
68 -> {69} [style=dotted];
|
||||
69 -> {70} [style=dotted];
|
||||
69 -> {97} [style=dotted] [label=onUncaughtException];
|
||||
70 -> {71} [style=dotted];
|
||||
70 -> {99} [style=dotted] [label=onUncaughtException];
|
||||
71 -> {72} [style=dotted];
|
||||
72 -> {73} [style=dotted];
|
||||
73 -> {74} [style=dotted];
|
||||
74 -> {75} [style=dotted];
|
||||
74 -> {97} [style=dotted] [label=onUncaughtException];
|
||||
75 -> {76} [style=dotted];
|
||||
75 -> {99} [style=dotted] [label=onUncaughtException];
|
||||
76 -> {77} [style=dotted];
|
||||
77 -> {79 78} [style=dotted];
|
||||
78 -> {85} [style=dotted];
|
||||
79 -> {80} [style=dotted];
|
||||
77 -> {78} [style=dotted];
|
||||
78 -> {80 79} [style=dotted];
|
||||
79 -> {86} [style=dotted];
|
||||
80 -> {81} [style=dotted];
|
||||
81 -> {88 82} [style=dotted];
|
||||
82 -> {83} [style=dotted];
|
||||
81 -> {82} [style=dotted];
|
||||
82 -> {89 83} [style=dotted];
|
||||
83 -> {84} [style=dotted];
|
||||
84 -> {85} [style=dotted];
|
||||
85 -> {86} [style=dotted];
|
||||
86 -> {87} [style=dotted];
|
||||
87 -> {59} [color=green style=dotted];
|
||||
88 -> {89};
|
||||
89 -> {90 95};
|
||||
87 -> {88} [style=dotted];
|
||||
88 -> {60} [color=green style=dotted];
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
91 -> {98};
|
||||
91 -> {93} [color=red];
|
||||
91 -> {98} [style=dashed];
|
||||
92 -> {94} [color=red];
|
||||
93 -> {94} [color=green];
|
||||
94 -> {95};
|
||||
95 -> {96};
|
||||
91 -> {92 97};
|
||||
92 -> {93};
|
||||
93 -> {100};
|
||||
93 -> {95} [color=red];
|
||||
93 -> {100} [style=dashed];
|
||||
94 -> {96} [color=red];
|
||||
95 -> {96} [color=green];
|
||||
96 -> {97};
|
||||
97 -> {98};
|
||||
98 -> {99};
|
||||
99 -> {100};
|
||||
100 -> {101};
|
||||
101 -> {102};
|
||||
102 -> {103};
|
||||
103 -> {92} [color=red];
|
||||
103 -> {93} [color=green];
|
||||
103 -> {104};
|
||||
104 -> {105};
|
||||
105 -> {94} [color=red];
|
||||
105 -> {95} [color=green];
|
||||
|
||||
}
|
||||
|
||||
+10
-7
@@ -30,14 +30,17 @@ FILE: smartcastToNothing.kt
|
||||
}
|
||||
public final fun test_0(results: R|kotlin/collections/List<kotlin/Nothing>|): R|kotlin/Unit| {
|
||||
lvar s: R|A?| = Null(null)
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>| = R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval result: R|kotlin/Nothing| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()
|
||||
R|<local>/s| = R|<local>/result|
|
||||
when () {
|
||||
R|<local>/result|.<Unresolved name: b># -> {
|
||||
break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()]
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>| = R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval result: R|kotlin/Nothing| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()
|
||||
R|<local>/s| = R|<local>/result|
|
||||
when () {
|
||||
R|<local>/result|.<Unresolved name: b># -> {
|
||||
break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+14
-8
@@ -9,18 +9,24 @@ FILE: varargInPrimaryConstructor.kt
|
||||
|
||||
}
|
||||
public final fun test_1(foo: R|Foo|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/foo|.R|/Foo.strings|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out kotlin/String)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval s: R|kotlin/String| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/String|>|()
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/foo|.R|/Foo.strings|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out kotlin/String)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval s: R|kotlin/String| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/String|>|()
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_2(vararg strings: R|kotlin/Array<out kotlin/String>|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/strings|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out kotlin/String)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval s: R|kotlin/String| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/String|>|()
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/strings|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<CapturedType(out kotlin/String)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval s: R|kotlin/String| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/String|>|()
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,11 +18,14 @@ FILE: components.kt
|
||||
|
||||
}
|
||||
public final fun foo(list: R|kotlin/collections/List<D>|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<D>| = R|<local>/list|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<D>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval <destruct>: R|D| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|D|>|()
|
||||
lval x: R|kotlin/Int| = R|<local>/<destruct>|.R|/D.component1|()
|
||||
lval y: R|kotlin/String| = R|<local>/<destruct>|.R|/D.component2|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<D>| = R|<local>/list|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<D>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval <destruct>: R|D| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|D|>|()
|
||||
lval x: R|kotlin/Int| = R|<local>/<destruct>|.R|/D.component1|()
|
||||
lval y: R|kotlin/String| = R|<local>/<destruct>|.R|/D.component2|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <destruct>: R|D| = R|<local>/list|.R|kotlin/collections/first|<R|D|>()
|
||||
|
||||
+61
-54
@@ -128,71 +128,76 @@ digraph flow_kt {
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
56 [label="Enter block"];
|
||||
57 [label="Const: Int(0)"];
|
||||
58 [label="Const: Int(0)"];
|
||||
59 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
|
||||
60 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
|
||||
61 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
62 [label="Enter while loop"];
|
||||
57 [label="Enter block"];
|
||||
58 [label="Const: Int(0)"];
|
||||
59 [label="Const: Int(0)"];
|
||||
60 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
|
||||
61 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
|
||||
62 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
63 [label="Enter loop condition"];
|
||||
64 [label="Access variable R|<local>/<iterator>|"];
|
||||
65 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
66 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
67 [label="Enter loop block"];
|
||||
63 [label="Enter while loop"];
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
64 [label="Enter loop condition"];
|
||||
65 [label="Access variable R|<local>/<iterator>|"];
|
||||
66 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
67 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
68 [label="Enter block"];
|
||||
69 [label="Access variable R|<local>/<iterator>|"];
|
||||
70 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
|
||||
71 [label="Variable declaration: lval i: R|kotlin/Int|"];
|
||||
72 [label="Access variable R|<local>/x|"];
|
||||
73 [label="Function call: R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
74 [label="Exit block"];
|
||||
68 [label="Enter loop block"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
69 [label="Enter block"];
|
||||
70 [label="Access variable R|<local>/<iterator>|"];
|
||||
71 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
|
||||
72 [label="Variable declaration: lval i: R|kotlin/Int|"];
|
||||
73 [label="Access variable R|<local>/x|"];
|
||||
74 [label="Function call: R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
75 [label="Exit block"];
|
||||
}
|
||||
76 [label="Exit loop block"];
|
||||
}
|
||||
75 [label="Exit loop block"];
|
||||
77 [label="Exit whileloop"];
|
||||
}
|
||||
76 [label="Exit whileloop"];
|
||||
78 [label="Exit block"];
|
||||
}
|
||||
77 [label="Access variable R|<local>/y|"];
|
||||
78 [label="Function call: R|<local>/y|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
79 [label="Exit block"];
|
||||
79 [label="Access variable R|<local>/y|"];
|
||||
80 [label="Function call: R|<local>/y|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
81 [label="Exit block"];
|
||||
}
|
||||
80 [label="Exit when branch result"];
|
||||
81 [label="Exit when"];
|
||||
82 [label="Exit when branch result"];
|
||||
83 [label="Exit when"];
|
||||
}
|
||||
subgraph cluster_21 {
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
82 [label="Enter do-while loop"];
|
||||
subgraph cluster_22 {
|
||||
84 [label="Enter do-while loop"];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
83 [label="Enter loop block"];
|
||||
subgraph cluster_23 {
|
||||
85 [label="Enter loop block"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
84 [label="Enter block"];
|
||||
85 [label="Access variable R|<local>/z|"];
|
||||
86 [label="Function call: R|/bar|(...)"];
|
||||
87 [label="Exit block"];
|
||||
86 [label="Enter block"];
|
||||
87 [label="Access variable R|<local>/z|"];
|
||||
88 [label="Function call: R|/bar|(...)"];
|
||||
89 [label="Exit block"];
|
||||
}
|
||||
88 [label="Exit loop block"];
|
||||
90 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_24 {
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
89 [label="Enter loop condition"];
|
||||
90 [label="Const: Boolean(true)"];
|
||||
91 [label="Exit loop condition"];
|
||||
91 [label="Enter loop condition"];
|
||||
92 [label="Const: Boolean(true)"];
|
||||
93 [label="Exit loop condition"];
|
||||
}
|
||||
92 [label="Exit do-whileloop" style="filled" fillcolor=gray];
|
||||
94 [label="Exit do-whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
93 [label="Exit block" style="filled" fillcolor=gray];
|
||||
95 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
94 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
96 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
}
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
@@ -216,7 +221,7 @@ digraph flow_kt {
|
||||
39 -> {40};
|
||||
40 -> {41};
|
||||
41 -> {42};
|
||||
42 -> {94};
|
||||
42 -> {96};
|
||||
42 -> {43} [style=dotted];
|
||||
43 -> {44} [style=dotted];
|
||||
44 -> {45} [style=dotted];
|
||||
@@ -229,7 +234,7 @@ digraph flow_kt {
|
||||
51 -> {52};
|
||||
52 -> {53};
|
||||
53 -> {54};
|
||||
54 -> {81};
|
||||
54 -> {83};
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
57 -> {58};
|
||||
@@ -241,8 +246,8 @@ digraph flow_kt {
|
||||
63 -> {64};
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
66 -> {76 67};
|
||||
67 -> {68};
|
||||
66 -> {67};
|
||||
67 -> {77 68};
|
||||
68 -> {69};
|
||||
69 -> {70};
|
||||
70 -> {71};
|
||||
@@ -250,8 +255,8 @@ digraph flow_kt {
|
||||
72 -> {73};
|
||||
73 -> {74};
|
||||
74 -> {75};
|
||||
75 -> {63} [color=green style=dashed];
|
||||
76 -> {77};
|
||||
75 -> {76};
|
||||
76 -> {64} [color=green style=dashed];
|
||||
77 -> {78};
|
||||
78 -> {79};
|
||||
79 -> {80};
|
||||
@@ -266,9 +271,11 @@ digraph flow_kt {
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
91 -> {92} [style=dotted];
|
||||
91 -> {83} [color=green style=dashed];
|
||||
92 -> {93} [style=dotted];
|
||||
91 -> {92};
|
||||
92 -> {93};
|
||||
93 -> {94} [style=dotted];
|
||||
93 -> {85} [color=green style=dashed];
|
||||
94 -> {95} [style=dotted];
|
||||
95 -> {96} [style=dotted];
|
||||
|
||||
}
|
||||
|
||||
+7
-4
@@ -26,10 +26,13 @@ FILE: flow.kt
|
||||
[StubStatement]
|
||||
when () {
|
||||
Boolean(true) -> {
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(0)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(0)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
R|<local>/y|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
|
||||
+66
-33
@@ -171,59 +171,92 @@ FILE: forLoopChecker.kt
|
||||
|
||||
}
|
||||
public final fun test(notRange1: R|NotRange1|, notRange2: R|NotRange2|, notRange3: R|NotRange3|, notRange4: R|NotRange4|, notRange5: R|NotRange5|, notRange6: R|NotRange6|, notRange7: R|NotRange7|, notRange8: R|NotRange8|, notRange9: R|NotRange9|, range0: R|Range0|, range1: R|Range1|): R|kotlin/Unit| {
|
||||
lval <iterator>: R|ERROR CLASS: Unresolved name: iterator| = R|<local>/notRange1|.<Unresolved name: iterator>#()
|
||||
while(R|<local>/<iterator>|.<Unresolved name: hasNext>#()) {
|
||||
lval i: R|ERROR CLASS: Unresolved name: next| = R|<local>/<iterator>|.<Unresolved name: next>#()
|
||||
{
|
||||
lval <iterator>: R|ERROR CLASS: Unresolved name: iterator| = R|<local>/notRange1|.<Unresolved name: iterator>#()
|
||||
while(R|<local>/<iterator>|.<Unresolved name: hasNext>#()) {
|
||||
lval i: R|ERROR CLASS: Unresolved name: next| = R|<local>/<iterator>|.<Unresolved name: next>#()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|kotlin/Unit| = R|<local>/notRange2|.R|/NotRange2.iterator|()
|
||||
while(R|<local>/<iterator>|.<Unresolved name: hasNext>#()) {
|
||||
lval i: R|ERROR CLASS: Unresolved name: next| = R|<local>/<iterator>|.<Unresolved name: next>#()
|
||||
{
|
||||
lval <iterator>: R|kotlin/Unit| = R|<local>/notRange2|.R|/NotRange2.iterator|()
|
||||
while(R|<local>/<iterator>|.<Unresolved name: hasNext>#()) {
|
||||
lval i: R|ERROR CLASS: Unresolved name: next| = R|<local>/<iterator>|.<Unresolved name: next>#()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|ImproperIterator1| = R|<local>/notRange3|.R|/NotRange3.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/ImproperIterator1.hasNext|()) {
|
||||
lval i: R|ERROR CLASS: Unresolved name: next| = R|<local>/<iterator>|.<Unresolved name: next>#()
|
||||
{
|
||||
lval <iterator>: R|ImproperIterator1| = R|<local>/notRange3|.R|/NotRange3.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/ImproperIterator1.hasNext|()) {
|
||||
lval i: R|ERROR CLASS: Unresolved name: next| = R|<local>/<iterator>|.<Unresolved name: next>#()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|ImproperIterator2| = R|<local>/notRange4|.R|/NotRange4.iterator|()
|
||||
while(R|<local>/<iterator>|.<Unresolved name: hasNext>#()) {
|
||||
lval i: R|kotlin/Boolean| = R|<local>/<iterator>|.R|/ImproperIterator2.next|()
|
||||
{
|
||||
lval <iterator>: R|ImproperIterator2| = R|<local>/notRange4|.R|/NotRange4.iterator|()
|
||||
while(R|<local>/<iterator>|.<Unresolved name: hasNext>#()) {
|
||||
lval i: R|kotlin/Boolean| = R|<local>/<iterator>|.R|/ImproperIterator2.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|ImproperIterator3| = R|<local>/notRange5|.R|/NotRange5.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/ImproperIterator3.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/ImproperIterator3.next|()
|
||||
{
|
||||
lval <iterator>: R|ImproperIterator3| = R|<local>/notRange5|.R|/NotRange5.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/ImproperIterator3.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/ImproperIterator3.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|AmbiguousHasNextIterator| = R|<local>/notRange6|.R|/NotRange6.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/AmbiguousHasNextIterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/AmbiguousHasNextIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|AmbiguousHasNextIterator| = R|<local>/notRange6|.R|/NotRange6.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/AmbiguousHasNextIterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/AmbiguousHasNextIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|ImproperIterator3| = R|<local>/notRange7|.R|/NotRange7.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/ImproperIterator3.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/ImproperIterator3.next|()
|
||||
{
|
||||
lval <iterator>: R|ImproperIterator3| = R|<local>/notRange7|.R|/NotRange7.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/ImproperIterator3.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/ImproperIterator3.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|ImproperIterator5| = R|<local>/notRange8|.R|/NotRange8.iterator|()
|
||||
while(R|<local>/<iterator>|.<Unresolved name: hasNext>#()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/ImproperIterator5.next|()
|
||||
{
|
||||
lval <iterator>: R|ImproperIterator5| = R|<local>/notRange8|.R|/NotRange8.iterator|()
|
||||
while(R|<local>/<iterator>|.<Unresolved name: hasNext>#()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/ImproperIterator5.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|ImproperIterator6| = R|<local>/notRange9|.R|/NotRange9.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/ImproperIterator6.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/ImproperIterator6.next|()
|
||||
{
|
||||
lval <iterator>: R|ImproperIterator6| = R|<local>/notRange9|.R|/NotRange9.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/ImproperIterator6.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/ImproperIterator6.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|GoodIterator| = R|<local>/range0|.R|/Range0.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/GoodIterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/GoodIterator.next|()
|
||||
{
|
||||
lval <iterator>: R|GoodIterator| = R|<local>/range0|.R|/Range0.iterator|()
|
||||
while(R|<local>/<iterator>|.R|/GoodIterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|/GoodIterator.next|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Int>| = R|<local>/range1|.R|/Range1.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Int|>|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Int>| = R|<local>/range1|.R|/Range1.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Int|>|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+11
-8
@@ -42,15 +42,18 @@ FILE: DeepCopyIrTree.kt
|
||||
}
|
||||
)
|
||||
this@R|/DeepCopyIrTreeWithSymbols|.R|/DeepCopyIrTreeWithSymbols.typeRemapper|.R|/withinScope|<R|kotlin/Unit|>(this@R|/DeepCopyIrTreeWithSymbols.copyTypeParametersFrom|, <L> = withinScope@fun <anonymous>(): R|kotlin/Unit| <inline=Inline, kind=UNKNOWN> {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Pair<IrTypeParameter, IrTypeParameter>>| = this@R|/DeepCopyIrTreeWithSymbols.copyTypeParametersFrom|.R|/IrTypeParametersContainer.typeParameters|.R|kotlin/collections/zip|<R|IrTypeParameter|, R|IrTypeParameter|>(R|<local>/other|.R|/IrTypeParametersContainer.typeParameters|).R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Pair<IrTypeParameter, IrTypeParameter>>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval <destruct>: R|kotlin/Pair<IrTypeParameter, IrTypeParameter>| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Pair<IrTypeParameter, IrTypeParameter>|>|()
|
||||
lval thisTypeParameter: R|IrTypeParameter| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component1: R|IrTypeParameter|>|()
|
||||
lval otherTypeParameter: R|IrTypeParameter| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component2: R|IrTypeParameter|>|()
|
||||
R|<local>/otherTypeParameter|.R|/IrTypeParameter.superTypes|.R|kotlin/collections/mapTo|<R|IrType|, R|IrType|, R|kotlin/collections/MutableList<IrType>|>(R|<local>/thisTypeParameter|.R|/IrTypeParameter.superTypes|, <L> = mapTo@fun <anonymous>(it: R|IrType|): R|IrType| <inline=Inline, kind=UNKNOWN> {
|
||||
^ this@R|/DeepCopyIrTreeWithSymbols|.R|/DeepCopyIrTreeWithSymbols.typeRemapper|.R|/TypeRemapper.remapType|(R|<local>/it|)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Pair<IrTypeParameter, IrTypeParameter>>| = this@R|/DeepCopyIrTreeWithSymbols.copyTypeParametersFrom|.R|/IrTypeParametersContainer.typeParameters|.R|kotlin/collections/zip|<R|IrTypeParameter|, R|IrTypeParameter|>(R|<local>/other|.R|/IrTypeParametersContainer.typeParameters|).R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Pair<IrTypeParameter, IrTypeParameter>>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval <destruct>: R|kotlin/Pair<IrTypeParameter, IrTypeParameter>| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Pair<IrTypeParameter, IrTypeParameter>|>|()
|
||||
lval thisTypeParameter: R|IrTypeParameter| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component1: R|IrTypeParameter|>|()
|
||||
lval otherTypeParameter: R|IrTypeParameter| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component2: R|IrTypeParameter|>|()
|
||||
R|<local>/otherTypeParameter|.R|/IrTypeParameter.superTypes|.R|kotlin/collections/mapTo|<R|IrType|, R|IrType|, R|kotlin/collections/MutableList<IrType>|>(R|<local>/thisTypeParameter|.R|/IrTypeParameter.superTypes|, <L> = mapTo@fun <anonymous>(it: R|IrType|): R|IrType| <inline=Inline, kind=UNKNOWN> {
|
||||
^ this@R|/DeepCopyIrTreeWithSymbols|.R|/DeepCopyIrTreeWithSymbols.typeRemapper|.R|/TypeRemapper.remapType|(R|<local>/it|)
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
-6
@@ -44,13 +44,16 @@ FILE: valueOfOrNull.kt
|
||||
|
||||
}
|
||||
public final inline fun <reified E : R|kotlin/Enum<E>|> valueOfOrNull(value: R|kotlin/String|): R|E?| {
|
||||
lval <iterator>: R|kotlin/collections/Iterator<E>| = R|kotlin/enumValues|<R|E|>().R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<E>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval enumValue: R|E| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|E|>|()
|
||||
when () {
|
||||
==(R|<local>/enumValue|.R|kotlin/Enum.name|, R|<local>/value|) -> {
|
||||
^valueOfOrNull R|<local>/enumValue|
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<E>| = R|kotlin/enumValues|<R|E|>().R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<E>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval enumValue: R|E| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|E|>|()
|
||||
when () {
|
||||
==(R|<local>/enumValue|.R|kotlin/Enum.name|, R|<local>/value|) -> {
|
||||
^valueOfOrNull R|<local>/enumValue|
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+35
-36
@@ -38,48 +38,47 @@ import org.jetbrains.kotlin.resolve.calls.tower.isSuccess
|
||||
|
||||
object FirForLoopChecker : FirBlockChecker() {
|
||||
override fun check(expression: FirBlock, context: CheckerContext, reporter: DiagnosticReporter) {
|
||||
if (expression.source?.kind != FirFakeSourceElementKind.DesugaredForLoop) return
|
||||
val statements = expression.statements
|
||||
for ((iteratorDeclaration, whileLoop) in statements.windowed(2)) {
|
||||
if (iteratorDeclaration !is FirProperty) continue
|
||||
if (whileLoop !is FirWhileLoop) continue
|
||||
if (iteratorDeclaration.source?.kind != FirFakeSourceElementKind.DesugaredForLoop) continue
|
||||
val iteratorCall = iteratorDeclaration.initializer as FirFunctionCall
|
||||
val source = iteratorCall.explicitReceiver?.source ?: iteratorCall.source
|
||||
if (checkSpecialFunctionCall(
|
||||
iteratorCall,
|
||||
reporter,
|
||||
source,
|
||||
context,
|
||||
ITERATOR_AMBIGUITY,
|
||||
ITERATOR_MISSING,
|
||||
unsafeCallFactory = ITERATOR_ON_NULLABLE
|
||||
)
|
||||
) {
|
||||
continue
|
||||
}
|
||||
val hasNextCall = whileLoop.condition as FirFunctionCall
|
||||
checkSpecialFunctionCall(
|
||||
hasNextCall,
|
||||
val iteratorDeclaration = statements[0] as? FirProperty ?: return
|
||||
val whileLoop = statements[1] as? FirWhileLoop ?: return
|
||||
if (iteratorDeclaration.source?.kind != FirFakeSourceElementKind.DesugaredForLoop) return
|
||||
val iteratorCall = iteratorDeclaration.initializer as FirFunctionCall
|
||||
val source = iteratorCall.explicitReceiver?.source ?: iteratorCall.source
|
||||
if (checkSpecialFunctionCall(
|
||||
iteratorCall,
|
||||
reporter,
|
||||
source,
|
||||
context,
|
||||
HAS_NEXT_FUNCTION_AMBIGUITY,
|
||||
HAS_NEXT_MISSING,
|
||||
noneApplicableFactory = HAS_NEXT_FUNCTION_NONE_APPLICABLE
|
||||
)
|
||||
val elementDeclaration = whileLoop.block.statements.firstOrNull() as? FirProperty ?: continue
|
||||
if (elementDeclaration.initializer?.source?.kind != FirFakeSourceElementKind.DesugaredForLoop) continue
|
||||
val nextCall = elementDeclaration.initializer as FirFunctionCall
|
||||
checkSpecialFunctionCall(
|
||||
nextCall,
|
||||
reporter,
|
||||
source,
|
||||
context,
|
||||
NEXT_AMBIGUITY,
|
||||
NEXT_MISSING,
|
||||
noneApplicableFactory = NEXT_NONE_APPLICABLE
|
||||
ITERATOR_AMBIGUITY,
|
||||
ITERATOR_MISSING,
|
||||
unsafeCallFactory = ITERATOR_ON_NULLABLE
|
||||
)
|
||||
) {
|
||||
return
|
||||
}
|
||||
val hasNextCall = whileLoop.condition as FirFunctionCall
|
||||
checkSpecialFunctionCall(
|
||||
hasNextCall,
|
||||
reporter,
|
||||
source,
|
||||
context,
|
||||
HAS_NEXT_FUNCTION_AMBIGUITY,
|
||||
HAS_NEXT_MISSING,
|
||||
noneApplicableFactory = HAS_NEXT_FUNCTION_NONE_APPLICABLE
|
||||
)
|
||||
val elementDeclaration = whileLoop.block.statements.firstOrNull() as? FirProperty ?: return
|
||||
if (elementDeclaration.initializer?.source?.kind != FirFakeSourceElementKind.DesugaredForLoop) return
|
||||
val nextCall = elementDeclaration.initializer as FirFunctionCall
|
||||
checkSpecialFunctionCall(
|
||||
nextCall,
|
||||
reporter,
|
||||
source,
|
||||
context,
|
||||
NEXT_AMBIGUITY,
|
||||
NEXT_MISSING,
|
||||
noneApplicableFactory = NEXT_NONE_APPLICABLE
|
||||
)
|
||||
}
|
||||
|
||||
private fun checkSpecialFunctionCall(
|
||||
|
||||
+2
-1
@@ -138,7 +138,8 @@ class DeclarationsConverter(
|
||||
return FirBlockBuilder().apply {
|
||||
source = block.toFirSourceElement()
|
||||
firStatements.forEach { firStatement ->
|
||||
if (firStatement !is FirBlock || firStatement.annotations.isNotEmpty()) {
|
||||
val isForLoopBlock = firStatement is FirBlock && firStatement.source?.kind == FirFakeSourceElementKind.DesugaredForLoop
|
||||
if (firStatement !is FirBlock || isForLoopBlock || firStatement.annotations.isNotEmpty()) {
|
||||
statements += firStatement
|
||||
} else {
|
||||
statements += firStatement.statements
|
||||
|
||||
@@ -193,9 +193,6 @@ open class RawFirBuilder(
|
||||
this?.toFirSourceElement(), ConeSimpleDiagnostic(errorReason, kind),
|
||||
)
|
||||
|
||||
private fun KtExpression.toFirStatement(errorReason: String): FirStatement =
|
||||
convertSafe() ?: buildErrorExpression(this.toFirSourceElement(), ConeSimpleDiagnostic(errorReason, DiagnosticKind.Syntax))
|
||||
|
||||
private inline fun KtExpression.toFirStatement(errorReasonLazy: () -> String): FirStatement =
|
||||
convertSafe() ?: buildErrorExpression(this.toFirSourceElement(), ConeSimpleDiagnostic(errorReasonLazy(), DiagnosticKind.Syntax))
|
||||
|
||||
@@ -1510,7 +1507,8 @@ open class RawFirBuilder(
|
||||
source = expression.toFirSourceElement()
|
||||
for (statement in expression.statements) {
|
||||
val firStatement = statement.toFirStatement { "Statement expected: ${statement.text}" }
|
||||
if (firStatement !is FirBlock || firStatement.annotations.isNotEmpty()) {
|
||||
val isForLoopBlock = firStatement is FirBlock && firStatement.source?.kind == FirFakeSourceElementKind.DesugaredForLoop
|
||||
if (firStatement !is FirBlock || isForLoopBlock || firStatement.annotations.isNotEmpty()) {
|
||||
statements += firStatement
|
||||
} else {
|
||||
statements += firStatement.statements
|
||||
|
||||
@@ -1,39 +1,51 @@
|
||||
FILE: for.kt
|
||||
public? final? fun foo(): R|kotlin/Unit| {
|
||||
lval <iterator>: <implicit> = IntegerLiteral(1).rangeTo#(IntegerLiteral(10)).iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval i: <implicit> = R|<local>/<iterator>|.next#()
|
||||
println#(i#)
|
||||
{
|
||||
lval <iterator>: <implicit> = IntegerLiteral(1).rangeTo#(IntegerLiteral(10)).iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval i: <implicit> = R|<local>/<iterator>|.next#()
|
||||
println#(i#)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public? final? fun fooLabeled(): R|kotlin/Unit| {
|
||||
println#(String(!!!))
|
||||
lval <iterator>: <implicit> = IntegerLiteral(1).rangeTo#(IntegerLiteral(10)).iterator#()
|
||||
label@while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval i: <implicit> = R|<local>/<iterator>|.next#()
|
||||
when () {
|
||||
==(i#, IntegerLiteral(5)) -> {
|
||||
continue@@@[R|<local>/<iterator>|.hasNext#()]
|
||||
{
|
||||
lval <iterator>: <implicit> = IntegerLiteral(1).rangeTo#(IntegerLiteral(10)).iterator#()
|
||||
label@while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval i: <implicit> = R|<local>/<iterator>|.next#()
|
||||
when () {
|
||||
==(i#, IntegerLiteral(5)) -> {
|
||||
continue@@@[R|<local>/<iterator>|.hasNext#()]
|
||||
}
|
||||
}
|
||||
|
||||
println#(i#)
|
||||
}
|
||||
|
||||
println#(i#)
|
||||
}
|
||||
|
||||
println#(String(!!!))
|
||||
}
|
||||
public? final? fun bar(list: List<String>): R|kotlin/Unit| {
|
||||
lval <iterator>: <implicit> = list#.subList#(IntegerLiteral(0), IntegerLiteral(10)).iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval element: <implicit> = R|<local>/<iterator>|.next#()
|
||||
println#(element#)
|
||||
{
|
||||
lval <iterator>: <implicit> = list#.subList#(IntegerLiteral(0), IntegerLiteral(10)).iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval element: <implicit> = R|<local>/<iterator>|.next#()
|
||||
println#(element#)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval <iterator>: <implicit> = list#.subList#(IntegerLiteral(10), IntegerLiteral(20)).iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval element: <implicit> = R|<local>/<iterator>|.next#()
|
||||
println#(element#)
|
||||
{
|
||||
lval <iterator>: <implicit> = list#.subList#(IntegerLiteral(10), IntegerLiteral(20)).iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval element: <implicit> = R|<local>/<iterator>|.next#()
|
||||
println#(element#)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -56,20 +68,26 @@ FILE: for.kt
|
||||
|
||||
}
|
||||
public? final? fun baz(set: Set<Some>): R|kotlin/Unit| {
|
||||
lval <iterator>: <implicit> = set#.iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval <destruct>: <implicit> = R|<local>/<iterator>|.next#()
|
||||
lval x: <implicit> = R|<local>/<destruct>|.component1#()
|
||||
lval y: <implicit> = R|<local>/<destruct>|.component2#()
|
||||
println#(<strcat>(String(x = ), x#.toString#(), String( y = ), y#.toString#()))
|
||||
{
|
||||
lval <iterator>: <implicit> = set#.iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval <destruct>: <implicit> = R|<local>/<iterator>|.next#()
|
||||
lval x: <implicit> = R|<local>/<destruct>|.component1#()
|
||||
lval y: <implicit> = R|<local>/<destruct>|.component2#()
|
||||
println#(<strcat>(String(x = ), x#.toString#(), String( y = ), y#.toString#()))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public? final? fun withParameter(list: List<Some>): R|kotlin/Unit| {
|
||||
lval <iterator>: <implicit> = list#.iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval s: Some = R|<local>/<iterator>|.next#()
|
||||
println#(s#)
|
||||
{
|
||||
lval <iterator>: <implicit> = list#.iterator#()
|
||||
while(R|<local>/<iterator>|.hasNext#()) {
|
||||
lval s: Some = R|<local>/<iterator>|.next#()
|
||||
println#(s#)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -25,9 +25,9 @@ fun whenInContract(x: Any?, boolean: Boolean) {
|
||||
|
||||
fun forInContract(x: Any?) {
|
||||
contract {
|
||||
<!ERROR_IN_CONTRACT_DESCRIPTION!>for (i in 0..1) {
|
||||
for (i in <!HAS_NEXT_MISSING!>0..1<!>) {
|
||||
returns() implies (x is String)
|
||||
}<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user