mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-06 00:21:32 +00:00
Compare commits
496 Commits
build-1.5.
...
rr/ileasil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b771f9eea4 | ||
|
|
0c77565104 | ||
|
|
6095d8a7fa | ||
|
|
6d9f02cfc6 | ||
|
|
0764a0601c | ||
|
|
a1ed81146e | ||
|
|
b48850c993 | ||
|
|
7349ec8f2f | ||
|
|
ec440aecf6 | ||
|
|
9d9e11d6d8 | ||
|
|
0d9e32f963 | ||
|
|
9eaec8d919 | ||
|
|
2a2fa31577 | ||
|
|
624740a80a | ||
|
|
2eda82f178 | ||
|
|
8f97d8a78e | ||
|
|
df225c0c7f | ||
|
|
83e3a702c5 | ||
|
|
ef2c2c2c9e | ||
|
|
3160fc84fa | ||
|
|
a6a7da31c9 | ||
|
|
b6bd4ae8e6 | ||
|
|
84e67da2af | ||
|
|
95d95f9a9b | ||
|
|
8dd307573a | ||
|
|
80a449862e | ||
|
|
84ccf7bbb1 | ||
|
|
5de8401494 | ||
|
|
4fb78fab93 | ||
|
|
c9568c0744 | ||
|
|
7c62e9aecd | ||
|
|
e110b49cab | ||
|
|
287ff3ed55 | ||
|
|
6365164c21 | ||
|
|
13464cce68 | ||
|
|
f330d67740 | ||
|
|
78ffefe107 | ||
|
|
909f0d8bdb | ||
|
|
2e57ff25ee | ||
|
|
072bba109f | ||
|
|
e93133a28f | ||
|
|
b9536a25d6 | ||
|
|
bc5e92033b | ||
|
|
24685ee9d6 | ||
|
|
89270399db | ||
|
|
cdcde634e8 | ||
|
|
757fdb2b32 | ||
|
|
71755b7a5e | ||
|
|
1f0616439c | ||
|
|
6065f0e2d0 | ||
|
|
8f097b14cc | ||
|
|
6f9694174f | ||
|
|
57bd4d3a98 | ||
|
|
49e838781c | ||
|
|
788d3c022a | ||
|
|
9cbcafa8d1 | ||
|
|
72804d2e8c | ||
|
|
f3a935adb9 | ||
|
|
25ebb3fa75 | ||
|
|
274d18a141 | ||
|
|
8dd71ec5c8 | ||
|
|
f9d2ca68ce | ||
|
|
caff279255 | ||
|
|
e4a5775570 | ||
|
|
8afb6d2761 | ||
|
|
b58bea6fa1 | ||
|
|
07daf2165a | ||
|
|
b88f54b31a | ||
|
|
3e883120dd | ||
|
|
7ec709cf46 | ||
|
|
9b39a8abc2 | ||
|
|
887032667d | ||
|
|
5f582ad28a | ||
|
|
61825e9aec | ||
|
|
816e955c61 | ||
|
|
201b6dfa60 | ||
|
|
85456bd6d8 | ||
|
|
007f11e22e | ||
|
|
ddf451739b | ||
|
|
d438d2db40 | ||
|
|
77ae1fa1f2 | ||
|
|
663c0d975d | ||
|
|
602be42b24 | ||
|
|
66683d2952 | ||
|
|
c8a81911c0 | ||
|
|
f0199d7277 | ||
|
|
cb89bd0e13 | ||
|
|
5d296a01c2 | ||
|
|
dbaaf081d7 | ||
|
|
df51856e65 | ||
|
|
8147a88353 | ||
|
|
cc05d91bda | ||
|
|
59b5475350 | ||
|
|
84d78035e4 | ||
|
|
276ffd5a4b | ||
|
|
d10f734594 | ||
|
|
7149d08995 | ||
|
|
cccf9b7d54 | ||
|
|
81a7271009 | ||
|
|
e43835c9f5 | ||
|
|
525cc6df97 | ||
|
|
b8002cb54f | ||
|
|
beba85a848 | ||
|
|
f7fdffefd6 | ||
|
|
b34e2c1474 | ||
|
|
72849a3dc3 | ||
|
|
bdf914e8d5 | ||
|
|
07b15f9de6 | ||
|
|
32c3f85679 | ||
|
|
7e052c1eb1 | ||
|
|
2a08923c51 | ||
|
|
8925b8c922 | ||
|
|
1afb844e1a | ||
|
|
12331cb10c | ||
|
|
d54808e33f | ||
|
|
f2f2df90aa | ||
|
|
660208740e | ||
|
|
704b5a0e13 | ||
|
|
ea2d9f7c0c | ||
|
|
cc4adb798f | ||
|
|
0c6066db74 | ||
|
|
0c0710bb79 | ||
|
|
71365d2452 | ||
|
|
dfc6d85aee | ||
|
|
dc2485ae71 | ||
|
|
37ccd82b6c | ||
|
|
19a5c2f1c8 | ||
|
|
e5128a8772 | ||
|
|
ccc27b6a0c | ||
|
|
6f2af740cb | ||
|
|
ed3542cdf5 | ||
|
|
666ad1f9d5 | ||
|
|
ea7ea979ee | ||
|
|
e2acc507d4 | ||
|
|
9cb740bfdb | ||
|
|
a1c1a32515 | ||
|
|
af2d0ad36f | ||
|
|
1835185b16 | ||
|
|
edb6b337dc | ||
|
|
e69b729e21 | ||
|
|
4282d17467 | ||
|
|
b88913af1d | ||
|
|
9a4742c08d | ||
|
|
9cf5ac1fbd | ||
|
|
a9cc046ec9 | ||
|
|
2c29957cb8 | ||
|
|
e96f64e6c9 | ||
|
|
b59f668a50 | ||
|
|
29d2a6acee | ||
|
|
f278de8768 | ||
|
|
7dcdbf283b | ||
|
|
eb1dcdb344 | ||
|
|
476b3befaf | ||
|
|
01dd3d6ed4 | ||
|
|
c4147bc2fd | ||
|
|
5a6819daa8 | ||
|
|
1fb4590978 | ||
|
|
9ebce7849c | ||
|
|
be4a518a25 | ||
|
|
17e4a6142c | ||
|
|
f2c0b8c68d | ||
|
|
8a2279de2b | ||
|
|
c7b2c731af | ||
|
|
97fc187e77 | ||
|
|
99f9b79c87 | ||
|
|
79d49e6dbd | ||
|
|
8011452c28 | ||
|
|
d459cde010 | ||
|
|
411441c332 | ||
|
|
afcb2ca904 | ||
|
|
b336a335bf | ||
|
|
59f936fdef | ||
|
|
37926f333e | ||
|
|
e9a33e0335 | ||
|
|
e0216cc9f4 | ||
|
|
e0a95ff556 | ||
|
|
7fd8f7b3bc | ||
|
|
70e3877efc | ||
|
|
5ceefa3e3b | ||
|
|
e4bd33eb4f | ||
|
|
f71e08df4d | ||
|
|
ac86ad252f | ||
|
|
1d47f4ad2b | ||
|
|
c6fa363487 | ||
|
|
7a81d0de8a | ||
|
|
7be48a0b4b | ||
|
|
63e5298be9 | ||
|
|
b894b7df6e | ||
|
|
c8ef0715b9 | ||
|
|
0c3f2eefe0 | ||
|
|
7e170770ea | ||
|
|
28690b7f32 | ||
|
|
7b8926f85b | ||
|
|
7c1520a424 | ||
|
|
965e328766 | ||
|
|
683872ecbf | ||
|
|
5c224ad17c | ||
|
|
393a19db54 | ||
|
|
867d7b5bca | ||
|
|
310d98c4f7 | ||
|
|
13b1664edf | ||
|
|
ee4a1d173d | ||
|
|
8840a9ecd1 | ||
|
|
f7a9bc3521 | ||
|
|
23ffbe4d9e | ||
|
|
7d95943b8b | ||
|
|
857bee6ced | ||
|
|
03f9d78eb3 | ||
|
|
4e6c483ccc | ||
|
|
bb35d9271f | ||
|
|
53f02a53f0 | ||
|
|
1f0089c5de | ||
|
|
d07c76fca4 | ||
|
|
6be33448d6 | ||
|
|
e59a57d11c | ||
|
|
e7b81c52a7 | ||
|
|
d602470027 | ||
|
|
fe351f26ef | ||
|
|
a94597d85a | ||
|
|
44fcd7e891 | ||
|
|
4cb6303fa8 | ||
|
|
2a5d511b66 | ||
|
|
00e5e462ea | ||
|
|
1a85da5ff8 | ||
|
|
c3264a2979 | ||
|
|
de4221afd8 | ||
|
|
54c6ae2cce | ||
|
|
3be2734c63 | ||
|
|
c1fe0d7158 | ||
|
|
1271fabffa | ||
|
|
27015a657c | ||
|
|
470103bfac | ||
|
|
f029179fe0 | ||
|
|
401fbae8d8 | ||
|
|
ea458e6848 | ||
|
|
a52c6858a9 | ||
|
|
134fb7741e | ||
|
|
ec3fa2610e | ||
|
|
0bf408e147 | ||
|
|
4e0485c523 | ||
|
|
147fd22cfb | ||
|
|
f1f97b4104 | ||
|
|
70b88ada93 | ||
|
|
d66f95b80e | ||
|
|
f1fb438d00 | ||
|
|
7103aa3100 | ||
|
|
66b8a444c2 | ||
|
|
6aee396e4b | ||
|
|
994f940a31 | ||
|
|
f189ebc983 | ||
|
|
6db3960d56 | ||
|
|
c2cdf9c796 | ||
|
|
99e022d023 | ||
|
|
d4162f876f | ||
|
|
234ab3b35d | ||
|
|
f98f41bbc3 | ||
|
|
c3b1be1a39 | ||
|
|
46f5c2073d | ||
|
|
7f7373dad2 | ||
|
|
951daeea3a | ||
|
|
1ae41443a2 | ||
|
|
24d792fb49 | ||
|
|
b2005302dc | ||
|
|
1093bffc62 | ||
|
|
e6b9935df9 | ||
|
|
75d9cd3814 | ||
|
|
3c4d0a1814 | ||
|
|
f4617b2c03 | ||
|
|
22ea5c7de4 | ||
|
|
95a1a4e66a | ||
|
|
5fb30b05ff | ||
|
|
e2786197ff | ||
|
|
47e8b2f9dc | ||
|
|
a76c5d66eb | ||
|
|
da6c5e13d5 | ||
|
|
a5c33c8d42 | ||
|
|
f8efe3b5df | ||
|
|
5324cbe729 | ||
|
|
8c9ad81c76 | ||
|
|
e87d816994 | ||
|
|
d3d4e94cd6 | ||
|
|
732405895f | ||
|
|
f228c3bb04 | ||
|
|
4f352950d9 | ||
|
|
a097a58edf | ||
|
|
e6d923f65c | ||
|
|
f1cf6b54e7 | ||
|
|
6833e83a6f | ||
|
|
7fe10e27a1 | ||
|
|
fe5e968896 | ||
|
|
590a8d088d | ||
|
|
6ae4c3f281 | ||
|
|
e0fe122ee9 | ||
|
|
9bc3404833 | ||
|
|
e0c8a6658b | ||
|
|
04daf8fce8 | ||
|
|
387dafb8c5 | ||
|
|
27ddc31f15 | ||
|
|
59de12c609 | ||
|
|
f519150c08 | ||
|
|
645014092c | ||
|
|
4ae5efd6da | ||
|
|
21e9bd7ea2 | ||
|
|
2666a93e6a | ||
|
|
e6c089ef40 | ||
|
|
ac0af39660 | ||
|
|
0a811bdd1a | ||
|
|
5fc1514104 | ||
|
|
2f7d6da22f | ||
|
|
b9ae22207e | ||
|
|
ee48fc320d | ||
|
|
0a68edf3bd | ||
|
|
f3dc8dfb21 | ||
|
|
e8e9f67069 | ||
|
|
1fb8c3b1d7 | ||
|
|
05f0507cbb | ||
|
|
bed45affe1 | ||
|
|
684c4c2825 | ||
|
|
0d99b01dcb | ||
|
|
8bbdc20809 | ||
|
|
9c8e92f5af | ||
|
|
70f9b77cce | ||
|
|
27766c2575 | ||
|
|
7084fec651 | ||
|
|
8ea3b52454 | ||
|
|
dc19e39dd2 | ||
|
|
088db0e138 | ||
|
|
48994976d4 | ||
|
|
dcbb1fb22b | ||
|
|
7dedd04ed9 | ||
|
|
3e0eb06e3e | ||
|
|
e4870740e1 | ||
|
|
63160293fb | ||
|
|
8071a1e246 | ||
|
|
9e9450caa2 | ||
|
|
57c4f79c1c | ||
|
|
26e39b3d2a | ||
|
|
051310124b | ||
|
|
73b796f184 | ||
|
|
34609b264d | ||
|
|
4fffed4165 | ||
|
|
c959b271a4 | ||
|
|
46d5e974df | ||
|
|
1dfc3c0520 | ||
|
|
eedc4d8c3f | ||
|
|
aa04f60df4 | ||
|
|
4c66c1c137 | ||
|
|
19ecb78531 | ||
|
|
2cfbad9477 | ||
|
|
b5e3dc414f | ||
|
|
8a1855e4da | ||
|
|
71c5c8b20a | ||
|
|
fb4ddd2f6e | ||
|
|
76b297fd73 | ||
|
|
597b18582a | ||
|
|
bb2a50a4eb | ||
|
|
d1f18c4651 | ||
|
|
22dcc92951 | ||
|
|
e83ceb9d40 | ||
|
|
36aee8f2b4 | ||
|
|
dab09e7052 | ||
|
|
c73dadbcdf | ||
|
|
dab693b075 | ||
|
|
f5379c5a04 | ||
|
|
00bc04b3df | ||
|
|
7f4da93cc3 | ||
|
|
9a4a39e680 | ||
|
|
b1fb0ba9e1 | ||
|
|
8a2cab346a | ||
|
|
b5caa658d6 | ||
|
|
454ae3b17a | ||
|
|
92df1f575a | ||
|
|
6a03f31e50 | ||
|
|
43a2ad0467 | ||
|
|
a736d62edd | ||
|
|
2e14b65644 | ||
|
|
4ddc0ed3fe | ||
|
|
eb831b9afc | ||
|
|
6b95bcdbdb | ||
|
|
9894b97058 | ||
|
|
26ea0be635 | ||
|
|
f40f506852 | ||
|
|
ea233cddf8 | ||
|
|
eed143d17b | ||
|
|
41e822e8cb | ||
|
|
5829f1a6e7 | ||
|
|
e78e8f8c79 | ||
|
|
32c1101959 | ||
|
|
ac993754e1 | ||
|
|
ce62348709 | ||
|
|
fd082b1574 | ||
|
|
e79c133331 | ||
|
|
29a0c448a6 | ||
|
|
023f4e9f46 | ||
|
|
f9d415eda6 | ||
|
|
284e828cd6 | ||
|
|
e3b5cc491d | ||
|
|
7fb2bf00c5 | ||
|
|
83bae89ed8 | ||
|
|
4353365968 | ||
|
|
9336e4b09b | ||
|
|
b5ef6c9316 | ||
|
|
81a5ae7780 | ||
|
|
eed4cb4f00 | ||
|
|
3a8d1c4b5e | ||
|
|
f253b1fb15 | ||
|
|
7b14975740 | ||
|
|
7525d9a1ce | ||
|
|
05a6d89151 | ||
|
|
f893709e5b | ||
|
|
bbcfde7231 | ||
|
|
6f96c225d7 | ||
|
|
b530427bb2 | ||
|
|
91fedd6a12 | ||
|
|
80f95528c2 | ||
|
|
d75d42da9d | ||
|
|
c65553bb8a | ||
|
|
4133f38c8c | ||
|
|
564de2790f | ||
|
|
cc0f28b698 | ||
|
|
e869f8091a | ||
|
|
450fb5e915 | ||
|
|
ce7092a638 | ||
|
|
8041c3aa1d | ||
|
|
0a446230f7 | ||
|
|
168d8b07a8 | ||
|
|
e89ab71bf8 | ||
|
|
cc415f62b5 | ||
|
|
b5fae96934 | ||
|
|
5903d015b8 | ||
|
|
9b3f1b9b8a | ||
|
|
51d348d5fa | ||
|
|
676e29e96e | ||
|
|
d7e3c65c45 | ||
|
|
0e98480be3 | ||
|
|
5de4c5fc28 | ||
|
|
fee83051e9 | ||
|
|
0a80fbb078 | ||
|
|
0cf00d0f72 | ||
|
|
39b2cd1027 | ||
|
|
82cadba80b | ||
|
|
474d1d48f7 | ||
|
|
0a25550fc2 | ||
|
|
354acc1fd5 | ||
|
|
32dacc37c0 | ||
|
|
1c48fb28db | ||
|
|
539d3e5df2 | ||
|
|
11b92bc597 | ||
|
|
2bb7f6a168 | ||
|
|
d531df1643 | ||
|
|
c988ecf59b | ||
|
|
d07c990fc2 | ||
|
|
0f5edaa02f | ||
|
|
ca4cebf3e3 | ||
|
|
6aa7628808 | ||
|
|
7d13aaad24 | ||
|
|
4d2e3a2379 | ||
|
|
c43faa2ada | ||
|
|
861f69822b | ||
|
|
7c6a9aa963 | ||
|
|
dd96c3b56e | ||
|
|
085bddbfc0 | ||
|
|
1f62a2d8cc | ||
|
|
957f6ddafd | ||
|
|
f1eeb72c01 | ||
|
|
ba80086ae3 | ||
|
|
4c13fe5631 | ||
|
|
d8a2f82cbd | ||
|
|
531a0de399 | ||
|
|
21a3a14289 | ||
|
|
ac85f9d983 | ||
|
|
0051451ed7 | ||
|
|
69ff45971f | ||
|
|
1f0ecade34 | ||
|
|
aec13defc4 | ||
|
|
0b2943d34c | ||
|
|
1cff17bb58 | ||
|
|
bee2a69e21 | ||
|
|
6afb905ad6 | ||
|
|
53b6d6f767 | ||
|
|
3c093f57ba | ||
|
|
0d525bbe85 | ||
|
|
412b941486 | ||
|
|
2b8c22c08a | ||
|
|
03215f4e0a | ||
|
|
470993ac07 | ||
|
|
5ff82addc9 | ||
|
|
14fe570a00 | ||
|
|
fb1b253d1e | ||
|
|
005aa57f6d | ||
|
|
988d1365a8 | ||
|
|
643c3f26c1 | ||
|
|
9aed55a1f4 | ||
|
|
6c989bfd4b | ||
|
|
5e392a511f | ||
|
|
b4813d31e6 |
40
ChangeLog.md
40
ChangeLog.md
@@ -1,5 +1,45 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 1.4.32
|
||||
|
||||
### IDE
|
||||
|
||||
- [`KT-43824`](https://youtrack.jetbrains.com/issue/KT-43824) KtLightClassForSourceDeclaration#isInheritor works in a different way than java implementation
|
||||
- [`KT-45287`](https://youtrack.jetbrains.com/issue/KT-45287) LightClasses: `KtLightSimpleModifierList` is no more a parent of `KtLightAnnotationForSourceEntry`
|
||||
- [`KT-45291`](https://youtrack.jetbrains.com/issue/KT-45291) LightClasses: can't get annotations for constructor val-parameter
|
||||
- [`KT-45417`](https://youtrack.jetbrains.com/issue/KT-45417) ULC leakage of primitive type annotations
|
||||
|
||||
### Tools. CLI
|
||||
|
||||
- [`KT-44758`](https://youtrack.jetbrains.com/issue/KT-44758) kotlin-compiler-embeddable dependency includes unshaded `fastutil` package
|
||||
- [`KT-45007`](https://youtrack.jetbrains.com/issue/KT-45007) Concurrent Kotlin script compilation/execution results in NullPointerException in KeyedExtensionCollector.getPoint()
|
||||
|
||||
## 1.4.31
|
||||
|
||||
### Compiler
|
||||
|
||||
- [`KT-39776`](https://youtrack.jetbrains.com/issue/KT-39776) 2020.3+: Unresolved reference to Kotlin stdlib function
|
||||
|
||||
### IDE. Gradle Integration
|
||||
|
||||
- [`KT-44845`](https://youtrack.jetbrains.com/issue/KT-44845) After update to Kotlin 1.4.30 all external dependencies is unresolved in IDE with kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
|
||||
### IDE. Gradle. Script
|
||||
|
||||
- [`KTIJ-11137`](https://youtrack.jetbrains.com/issue/KTIJ-1137) build.gradle.kts: Fatal error during save/load standalone scripts settings
|
||||
- [`KTIJ-898`](https://youtrack.jetbrains.com/issue/KTIJ-898) Unable to import with Kotlin DSL buildscript - NullPointerException in KotlinDslScriptModelProcessorKt.toListOfScriptModels
|
||||
|
||||
### IDE. Multiplatform
|
||||
|
||||
- [`KTIJ-1200`](https://youtrack.jetbrains.com/issue/KTIJ-1200) KotlinIconProviderKt.addExpectActualMarker takes up to 180+ seconds
|
||||
|
||||
### IDE
|
||||
|
||||
#### Fixes
|
||||
|
||||
- [`KT-44697`](https://youtrack.jetbrains.com/issue/KT-44697) New JVM IR backend notification - narrow its triggering to Kotlin projects
|
||||
- [`KT-44523`](https://youtrack.jetbrains.com/issue/KT-44523) IDE notification for trying new JVM backend
|
||||
- [`KTIJ-696`](https://youtrack.jetbrains.com/issue/KTIJ-696) Freeze during startup of IDEA with intellij project with Kotlin (211-1.4.10-release-IJ1440)
|
||||
|
||||
## 1.4.30
|
||||
|
||||
|
||||
@@ -14,8 +14,11 @@ buildscript {
|
||||
|
||||
if (cacheRedirectorEnabled) {
|
||||
maven("https://cache-redirector.jetbrains.com/plugins.gradle.org/m2")
|
||||
maven("https://cache-redirector.jetbrains.com/repo.maven.apache.org/maven2")
|
||||
|
||||
} else {
|
||||
maven("https://plugins.gradle.org/m2")
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +30,7 @@ buildscript {
|
||||
dependencies {
|
||||
bootstrapCompilerClasspath(kotlin("compiler-embeddable", bootstrapKotlinVersion))
|
||||
|
||||
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.26")
|
||||
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.27")
|
||||
classpath(kotlin("gradle-plugin", bootstrapKotlinVersion))
|
||||
classpath(kotlin("serialization", bootstrapKotlinVersion))
|
||||
classpath("org.jetbrains.dokka:dokka-gradle-plugin:0.9.17")
|
||||
@@ -192,7 +195,7 @@ extra["versions.kotlinx-collections-immutable-jvm"] = immutablesVersion
|
||||
extra["versions.ktor-network"] = "1.0.1"
|
||||
|
||||
if (!project.hasProperty("versions.kotlin-native")) {
|
||||
extra["versions.kotlin-native"] = "1.5.20-dev-4865"
|
||||
extra["versions.kotlin-native"] = "1.5.20-dev-5613"
|
||||
}
|
||||
|
||||
val intellijUltimateEnabled by extra(project.kotlinBuildProperties.intellijUltimateEnabled)
|
||||
@@ -368,7 +371,8 @@ val gradlePluginProjects = listOf(
|
||||
":kotlin-annotation-processing-gradle",
|
||||
":kotlin-noarg",
|
||||
":kotlin-sam-with-receiver",
|
||||
":kotlin-parcelize-compiler"
|
||||
":kotlin-parcelize-compiler",
|
||||
":kotlin-lombok"
|
||||
)
|
||||
|
||||
apply {
|
||||
@@ -377,7 +381,7 @@ apply {
|
||||
}
|
||||
|
||||
apply {
|
||||
if (extra["isSonatypeRelease"] as? Boolean == true) {
|
||||
if (extra["isDeployStagingRepoGenerationRequired"] as? Boolean == true) {
|
||||
logger.info("Applying configuration for sonatype release")
|
||||
from("libraries/prepareSonatypeStaging.gradle")
|
||||
}
|
||||
@@ -577,26 +581,6 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
if ((gradle.startParameter as? org.gradle.api.internal.StartParameterInternal)?.isConfigurationCache != true) {
|
||||
// TODO: remove it once Gradle is bumped to 6.8:
|
||||
// See https://docs.gradle.org/6.8/release-notes.html#more-cache-hits-when-empty-directories-are-present
|
||||
gradle.buildFinished {
|
||||
val taskGraph = gradle?.taskGraph
|
||||
if (taskGraph != null) {
|
||||
taskGraph.allTasks
|
||||
.filterIsInstance<SourceTask>()
|
||||
.filter { it.didWork }
|
||||
.forEach {
|
||||
it.source.visit {
|
||||
if (file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
logger.warn("Empty source directories may cause build cache misses: " + file.absolutePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gradle.taskGraph.whenReady {
|
||||
fun Boolean.toOnOff(): String = if (this) "on" else "off"
|
||||
val profile = if (isTeamcityBuild) "CI" else "Local"
|
||||
@@ -981,6 +965,7 @@ tasks {
|
||||
":prepare:ide-plugin-dependencies:sam-with-receiver-compiler-plugin-for-ide:publish",
|
||||
":prepare:ide-plugin-dependencies:compiler-components-for-jps:publish",
|
||||
":prepare:ide-plugin-dependencies:parcelize-compiler-plugin-for-ide:publish",
|
||||
":prepare:ide-plugin-dependencies:lombok-compiler-plugin-for-ide:publish",
|
||||
":kotlin-script-runtime:publish",
|
||||
":kotlin-script-util:publish",
|
||||
":kotlin-scripting-common:publish",
|
||||
|
||||
@@ -22,7 +22,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.26")
|
||||
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.27")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${project.bootstrapKotlinVersion}")
|
||||
classpath("org.jetbrains.kotlin:kotlin-sam-with-receiver:${project.bootstrapKotlinVersion}")
|
||||
}
|
||||
@@ -144,7 +144,7 @@ java {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib", embeddedKotlinVersion))
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${project.bootstrapKotlinVersion}")
|
||||
implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.26")
|
||||
implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.27")
|
||||
implementation("com.gradle.publish:plugin-publish-plugin:0.14.0")
|
||||
|
||||
implementation("net.rubygrapefruit:native-platform:${property("versions.native-platform")}")
|
||||
|
||||
@@ -18,9 +18,10 @@ buildscript {
|
||||
} else {
|
||||
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies" }
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.26")
|
||||
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.27")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -229,23 +229,6 @@ fun Project.publish(moduleMetadata: Boolean = false, configure: MavenPublication
|
||||
publication.configure()
|
||||
}
|
||||
|
||||
fun Project.publishWithLegacyMavenPlugin(body: Upload.() -> Unit = {}): Upload {
|
||||
apply<plugins.PublishedKotlinModule>()
|
||||
|
||||
if (artifactsRemovedDiagnosticFlag) {
|
||||
error("`publish()` should be called before removing artifacts typically done in `noDefaultJar()` or `runtimeJar()` call")
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
if (configurations.findByName("classes-dirs") != null)
|
||||
throw GradleException("classesDirsArtifact() is incompatible with publish(), see sources comments for details")
|
||||
}
|
||||
|
||||
return (tasks.getByName("uploadArchives") as Upload).apply {
|
||||
body()
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.idePluginDependency(block: () -> Unit) {
|
||||
val shouldActivate = rootProject.findProperty("publish.ide.plugin.dependencies")?.toString()?.toBoolean() == true
|
||||
if (shouldActivate) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package plugins
|
||||
|
||||
import PublishToMavenLocalSerializable
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.attributes.Usage
|
||||
@@ -13,10 +14,10 @@ import org.gradle.api.plugins.JavaBasePlugin
|
||||
import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
|
||||
import org.gradle.api.publish.maven.tasks.PublishToMavenLocal
|
||||
import org.gradle.api.publish.maven.tasks.PublishToMavenRepository
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.gradle.plugins.signing.Sign
|
||||
import org.gradle.plugins.signing.SigningExtension
|
||||
import org.gradle.plugins.signing.SigningPlugin
|
||||
import java.util.*
|
||||
@@ -27,7 +28,6 @@ class KotlinBuildPublishingPlugin @Inject constructor(
|
||||
) : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
apply<MavenPublishPlugin>()
|
||||
apply<SigningPlugin>()
|
||||
|
||||
val publishedRuntime = configurations.maybeCreate(RUNTIME_CONFIGURATION).apply {
|
||||
isCanBeConsumed = false
|
||||
@@ -132,31 +132,49 @@ fun Project.configureDefaultPublishing() {
|
||||
}
|
||||
}
|
||||
|
||||
configureSigning()
|
||||
val signingRequired = project.providers.gradleProperty("signingRequired").forUseAtConfigurationTime().orNull?.toBoolean()
|
||||
?: project.providers.gradleProperty("isSonatypeRelease").forUseAtConfigurationTime().orNull?.toBoolean() ?: false
|
||||
|
||||
if (signingRequired) {
|
||||
apply<SigningPlugin>()
|
||||
configureSigning()
|
||||
}
|
||||
|
||||
tasks.register("install") {
|
||||
dependsOn(tasks.named("publishToMavenLocal"))
|
||||
}
|
||||
|
||||
// workaround for Gradle configuration cache
|
||||
// TODO: remove it when https://github.com/gradle/gradle/pull/16945 merged into used in build Gradle version
|
||||
tasks.withType(PublishToMavenLocal::class.java) {
|
||||
val originalTask = this
|
||||
val serializablePublishTask =
|
||||
tasks.register(originalTask.name + "Serializable", PublishToMavenLocalSerializable::class.java) {
|
||||
publication = originalTask.publication
|
||||
}
|
||||
originalTask.onlyIf { false }
|
||||
originalTask.dependsOn(serializablePublishTask)
|
||||
}
|
||||
|
||||
tasks.withType<PublishToMavenRepository>()
|
||||
.matching { it.name.endsWith("PublicationTo${KotlinBuildPublishingPlugin.REPOSITORY_NAME}Repository") }
|
||||
.all { configureRepository() }
|
||||
}
|
||||
|
||||
private fun Project.configureSigning() {
|
||||
val signingRequired = provider {
|
||||
project.findProperty("signingRequired")?.toString()?.toBoolean()
|
||||
?: project.property("isSonatypeRelease") as Boolean
|
||||
}
|
||||
|
||||
configure<SigningExtension> {
|
||||
setRequired(signingRequired)
|
||||
sign(extensions.getByType<PublishingExtension>().publications) // all publications
|
||||
useGpgCmd()
|
||||
}
|
||||
|
||||
tasks.withType<Sign>().configureEach {
|
||||
setOnlyIf { signingRequired.get() }
|
||||
val signKeyId = project.findProperty("signKeyId") as? String
|
||||
if (!signKeyId.isNullOrBlank()) {
|
||||
val signKeyPrivate = project.findProperty("signKeyPrivate") as? String
|
||||
?: error("Parameter `signKeyPrivate` not found")
|
||||
val signKeyPassphrase = project.findProperty("signKeyPassphrase") as? String
|
||||
?: error("Parameter `signKeyPassphrase` not found")
|
||||
useInMemoryPgpKeys(signKeyId, signKeyPrivate, signKeyPassphrase)
|
||||
} else {
|
||||
useGpgCmd()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,4 +199,4 @@ private fun PublishToMavenRepository.configureRepository() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
@file:Suppress("DEPRECATION")
|
||||
package plugins
|
||||
|
||||
import org.codehaus.groovy.runtime.InvokerHelper
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.Dependency
|
||||
import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer
|
||||
import org.gradle.api.artifacts.maven.MavenDeployment
|
||||
import org.gradle.api.artifacts.maven.MavenResolver
|
||||
import org.gradle.api.plugins.MavenPluginConvention
|
||||
import org.gradle.api.plugins.MavenRepositoryHandlerConvention
|
||||
import org.gradle.api.publication.maven.internal.deployer.MavenRemoteRepository
|
||||
import org.gradle.api.tasks.Upload
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.gradle.plugins.signing.Sign
|
||||
import org.gradle.plugins.signing.SigningExtension
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
/**
|
||||
* Configures a Kotlin module for publication.
|
||||
*/
|
||||
open class PublishedKotlinModule : Plugin<Project> {
|
||||
|
||||
private fun String.toBooleanOrNull() = listOf(true, false).firstOrNull { it.toString().equals(this, ignoreCase = true) }
|
||||
|
||||
override fun apply(project: Project) {
|
||||
|
||||
project.run {
|
||||
|
||||
plugins.apply("maven")
|
||||
|
||||
configurations.maybeCreate("publishedRuntime").apply {
|
||||
the<MavenPluginConvention>()
|
||||
.conf2ScopeMappings
|
||||
.addMapping(0, this, Conf2ScopeMappingContainer.RUNTIME)
|
||||
}
|
||||
|
||||
configurations.maybeCreate("publishedCompile").apply {
|
||||
the<MavenPluginConvention>()
|
||||
.conf2ScopeMappings
|
||||
.addMapping(0, this, Conf2ScopeMappingContainer.COMPILE)
|
||||
}
|
||||
|
||||
if (!project.hasProperty("prebuiltJar")) {
|
||||
plugins.apply("signing")
|
||||
|
||||
val signingRequired = project.findProperty("signingRequired")?.toString()?.toBooleanOrNull()
|
||||
?: project.property("isSonatypeRelease") as Boolean
|
||||
|
||||
configure<SigningExtension> {
|
||||
isRequired = signingRequired
|
||||
sign(configurations["archives"])
|
||||
useGpgCmd()
|
||||
}
|
||||
|
||||
tasks.named<Sign>("signArchives").configure {
|
||||
enabled = signingRequired
|
||||
}
|
||||
}
|
||||
|
||||
fun MavenResolver.configurePom() {
|
||||
pom.project {
|
||||
withGroovyBuilder {
|
||||
"licenses" {
|
||||
"license" {
|
||||
"name"("The Apache Software License, Version 2.0")
|
||||
"url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
"distribution"("repo")
|
||||
}
|
||||
}
|
||||
"name"("${project.group}:${project.name}")
|
||||
"packaging"("jar")
|
||||
// optionally artifactId can be defined here
|
||||
"description"(project.description)
|
||||
"url"("https://kotlinlang.org/")
|
||||
"licenses" {
|
||||
"license" {
|
||||
"name"("The Apache License, Version 2.0")
|
||||
"url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
}
|
||||
}
|
||||
"scm" {
|
||||
"url"("https://github.com/JetBrains/kotlin")
|
||||
"connection"("scm:git:https://github.com/JetBrains/kotlin.git")
|
||||
"developerConnection"("scm:git:https://github.com/JetBrains/kotlin.git")
|
||||
}
|
||||
"developers" {
|
||||
"developer" {
|
||||
"name"("Kotlin Team")
|
||||
setProperty("organization", "JetBrains")
|
||||
"organizationUrl"("https://www.jetbrains.com")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pom.whenConfigured {
|
||||
dependencies.removeIf {
|
||||
InvokerHelper.getMetaClass(it).getProperty(it, "scope") == "test"
|
||||
}
|
||||
|
||||
dependencies
|
||||
.find {
|
||||
InvokerHelper.getMetaClass(it).getProperty(it, "groupId") == "org.jetbrains.kotlin"
|
||||
&& InvokerHelper.getMetaClass(it).getProperty(it, "artifactId") == "kotlin-stdlib"
|
||||
}
|
||||
?.also {
|
||||
InvokerHelper.getMetaClass(it).setProperty(it, "exclusions", emptyList<Any>())
|
||||
logger.warn("WARNING! Removed exclusions from kotlin-stdlib dependency of ${this.artifactId} artifact's maven metadata, check kotlin-stdlib dependency of ${project.path} project")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named<Upload>("uploadArchives").configure {
|
||||
|
||||
val preparePublication = project.rootProject.tasks.named("preparePublication").get()
|
||||
|
||||
dependsOn(preparePublication)
|
||||
|
||||
val username: String? by preparePublication.extra
|
||||
val password: String? by preparePublication.extra
|
||||
val repoUrl: String by preparePublication.extra
|
||||
|
||||
var repository by Delegates.notNull<MavenRemoteRepository>()
|
||||
|
||||
repositories {
|
||||
withConvention(MavenRepositoryHandlerConvention::class) {
|
||||
|
||||
mavenDeployer {
|
||||
withGroovyBuilder {
|
||||
"beforeDeployment" {
|
||||
val signing = project.the<SigningExtension>()
|
||||
if (signing.isRequired)
|
||||
signing.signPom(delegate as MavenDeployment)
|
||||
}
|
||||
|
||||
"repository"("url" to repoUrl)!!.also { repository = it as MavenRemoteRepository }.withGroovyBuilder {
|
||||
if (username != null && password != null) {
|
||||
"authentication"("userName" to username, "password" to password)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurePom()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
doFirst {
|
||||
repository.url = repoUrl
|
||||
}
|
||||
}
|
||||
|
||||
val install = if (tasks.names.contains("install")) tasks.getByName("install") as Upload
|
||||
else tasks.create("install", Upload::class.java)
|
||||
install.apply {
|
||||
configuration = project.configurations.getByName(Dependency.ARCHIVES_CONFIGURATION)
|
||||
description = "Installs the 'archives' artifacts into the local Maven repository."
|
||||
repositories {
|
||||
withConvention(MavenRepositoryHandlerConvention::class) {
|
||||
mavenInstaller {
|
||||
configurePom()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("publish") {
|
||||
dependsOn(tasks.named("uploadArchives"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,22 @@
|
||||
// usages in build scripts are not tracked properly
|
||||
@file:Suppress("unused")
|
||||
|
||||
import org.gradle.api.InvalidUserDataException
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.artifacts.ProjectDependency
|
||||
import org.gradle.api.file.FileSystemOperations
|
||||
import org.gradle.api.internal.tasks.testing.filter.DefaultTestFilter
|
||||
import org.gradle.api.publish.internal.PublishOperation
|
||||
import org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal
|
||||
import org.gradle.api.publish.maven.internal.publisher.MavenNormalizedPublication
|
||||
import org.gradle.api.publish.maven.internal.publisher.MavenPublisher
|
||||
import org.gradle.api.publish.maven.internal.publisher.ValidatingMavenPublisher
|
||||
import org.gradle.api.publish.maven.tasks.AbstractPublishToMaven
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.internal.serialization.Cached
|
||||
import org.gradle.kotlin.dsl.extra
|
||||
import org.gradle.kotlin.dsl.project
|
||||
import org.gradle.kotlin.dsl.support.serviceOf
|
||||
@@ -38,6 +47,7 @@ val kotlinGradlePluginAndItsRequired = arrayOf(
|
||||
":kotlin-compiler-runner",
|
||||
":kotlin-daemon-embeddable",
|
||||
":kotlin-daemon-client",
|
||||
":kotlin-project-model",
|
||||
":kotlin-gradle-plugin-api",
|
||||
":kotlin-gradle-plugin",
|
||||
":kotlin-gradle-plugin-model",
|
||||
@@ -279,3 +289,30 @@ fun Task.useAndroidSdk() {
|
||||
fun Task.useAndroidJar() {
|
||||
TaskUtils.useAndroidJar(this)
|
||||
}
|
||||
|
||||
// Workaround to make PublishToMavenLocal compatible with Gradle configuration cache
|
||||
// TODO: remove it when https://github.com/gradle/gradle/pull/16945 merged into used in build Gradle version
|
||||
abstract class PublishToMavenLocalSerializable : AbstractPublishToMaven() {
|
||||
private val normalizedPublication = Cached.of { this.computeNormalizedPublication() }
|
||||
|
||||
private fun computeNormalizedPublication(): MavenNormalizedPublication {
|
||||
val publicationInternal: MavenPublicationInternal = publicationInternal
|
||||
?: throw InvalidUserDataException("The 'publication' property is required")
|
||||
duplicatePublicationTracker.checkCanPublishToMavenLocal(publicationInternal)
|
||||
return publicationInternal.asNormalisedPublication()
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
open fun publish() {
|
||||
val normalizedPublication = normalizedPublication.get()
|
||||
object : PublishOperation(normalizedPublication.name, "mavenLocal") {
|
||||
override fun publish() {
|
||||
val localPublisher = mavenPublishers.getLocalPublisher(
|
||||
temporaryDirFactory
|
||||
)
|
||||
val validatingPublisher: MavenPublisher = ValidatingMavenPublisher(localPublisher)
|
||||
validatingPublisher.publish(normalizedPublication, null)
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
}
|
||||
@@ -87,4 +87,4 @@ open class SamTypeFactory {
|
||||
companion object {
|
||||
val INSTANCE = SamTypeFactory()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ interface TypeMappingContext<Writer : JvmDescriptorTypeWriter<Type>> {
|
||||
val typeContext: TypeSystemCommonBackendContextForTypeMapping
|
||||
|
||||
fun getClassInternalName(typeConstructor: TypeConstructorMarker): String
|
||||
fun getScriptInternalName(typeConstructor: TypeConstructorMarker): String
|
||||
fun Writer.writeGenericType(type: SimpleTypeMarker, asmType: Type, mode: TypeMappingMode)
|
||||
}
|
||||
|
||||
@@ -117,9 +118,7 @@ object AbstractTypeMapper {
|
||||
}
|
||||
|
||||
typeConstructor.isScript() -> {
|
||||
val asmType = AsmTypes.JAVA_CLASS_TYPE
|
||||
with(context) { sw?.writeGenericType(type, asmType, mode) }
|
||||
return asmType
|
||||
return Type.getObjectType(context.getScriptInternalName(typeConstructor))
|
||||
}
|
||||
|
||||
typeConstructor.isTypeParameter() -> {
|
||||
|
||||
@@ -158,7 +158,14 @@ public class ClosureCodegen extends MemberCodegen<KtElement> {
|
||||
for (int i = 0; i < superInterfaceTypes.size(); i++) {
|
||||
KotlinType superInterfaceType = superInterfaceTypes.get(i);
|
||||
sw.writeInterface();
|
||||
superInterfaceAsmTypes[i] = typeMapper.mapSupertype(superInterfaceType, sw).getInternalName();
|
||||
Type superInterfaceAsmType;
|
||||
if (samType != null && superInterfaceType.getConstructor() == samType.getType().getConstructor()) {
|
||||
superInterfaceAsmType = typeMapper.mapSupertype(superInterfaceType, null);
|
||||
sw.writeAsmType(superInterfaceAsmType);
|
||||
} else {
|
||||
superInterfaceAsmType = typeMapper.mapSupertype(superInterfaceType, sw);
|
||||
}
|
||||
superInterfaceAsmTypes[i] = superInterfaceAsmType.getInternalName();
|
||||
sw.writeInterfaceEnd();
|
||||
}
|
||||
|
||||
|
||||
@@ -265,13 +265,23 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
);
|
||||
}
|
||||
|
||||
private static void addReifiedParametersFromSignature(@NotNull MemberCodegen member, @NotNull ClassDescriptor descriptor) {
|
||||
private static void addReifiedParametersFromSignature(@NotNull MemberCodegen<?> member, @NotNull ClassDescriptor descriptor) {
|
||||
for (KotlinType type : descriptor.getTypeConstructor().getSupertypes()) {
|
||||
for (TypeProjection supertypeArgument : type.getArguments()) {
|
||||
TypeParameterDescriptor parameterDescriptor = TypeUtils.getTypeParameterDescriptorOrNull(supertypeArgument.getType());
|
||||
if (parameterDescriptor != null && parameterDescriptor.isReified()) {
|
||||
processTypeArguments(member, type);
|
||||
}
|
||||
}
|
||||
|
||||
private static void processTypeArguments(@NotNull MemberCodegen<?> member, KotlinType type) {
|
||||
for (TypeProjection supertypeArgument : type.getArguments()) {
|
||||
if (supertypeArgument.isStarProjection()) continue;
|
||||
|
||||
TypeParameterDescriptor parameterDescriptor = TypeUtils.getTypeParameterDescriptorOrNull(supertypeArgument.getType());
|
||||
if (parameterDescriptor != null) {
|
||||
if (parameterDescriptor.isReified()) {
|
||||
member.getReifiedTypeParametersUsages().addUsedReifiedParameter(parameterDescriptor.getName().asString());
|
||||
}
|
||||
} else {
|
||||
processTypeArguments(member, supertypeArgument.getType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,6 +188,12 @@ class JvmRuntimeTypes(
|
||||
else -> if (isMutable) mutablePropertyReferences else propertyReferences
|
||||
}
|
||||
|
||||
return classes[arity].defaultType
|
||||
return if (arity >= 0) {
|
||||
classes[arity].defaultType
|
||||
} else {
|
||||
//in case of ErrorUtils.ERROR_PROPERTY there would be no dispatchReceiverParameter and arity becomes negative
|
||||
//so we just take zero argument reference class (because it is incorrect anyway)
|
||||
classes[0].defaultType
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,7 +650,7 @@ class CoroutineTransformerMethodVisitor(
|
||||
|
||||
val livenessFrames = analyzeLiveness(methodNode)
|
||||
|
||||
// References shall be cleaned up after uspill (during spill in next suspension point) to prevent memory leaks,
|
||||
// References shall be cleaned up after unspill (during spill in next suspension point) to prevent memory leaks,
|
||||
val referencesToSpillBySuspensionPointIndex = arrayListOf<List<ReferenceToSpill>>()
|
||||
// while primitives shall not
|
||||
val primitivesToSpillBySuspensionPointIndex = arrayListOf<List<PrimitiveToSpill>>()
|
||||
@@ -759,6 +759,35 @@ class CoroutineTransformerMethodVisitor(
|
||||
referencesToCleanBySuspensionPointIndex += currentSpilledReferencesCount to predSpilledReferencesCount
|
||||
}
|
||||
|
||||
// Calculate debug metadata mapping before modifying method node to make it easier to locate
|
||||
// locals alive across suspension points.
|
||||
|
||||
fun calculateSpilledVariableAndField(
|
||||
suspension: SuspensionPoint,
|
||||
slot: Int,
|
||||
spillableVariable: SpillableVariable?
|
||||
): SpilledVariableAndField? {
|
||||
if (spillableVariable == null) return null
|
||||
val name = localVariableName(methodNode, slot, suspension.suspensionCallBegin.index()) ?: return null
|
||||
return SpilledVariableAndField(spillableVariable.fieldName, name)
|
||||
}
|
||||
|
||||
val spilledToVariableMapping = arrayListOf<List<SpilledVariableAndField>>()
|
||||
for (suspensionPointIndex in suspensionPoints.indices) {
|
||||
val suspension = suspensionPoints[suspensionPointIndex]
|
||||
|
||||
val spilledToVariable = arrayListOf<SpilledVariableAndField>()
|
||||
|
||||
referencesToSpillBySuspensionPointIndex[suspensionPointIndex].mapNotNullTo(spilledToVariable) { (slot, spillableVariable) ->
|
||||
calculateSpilledVariableAndField(suspension, slot, spillableVariable)
|
||||
}
|
||||
primitivesToSpillBySuspensionPointIndex[suspensionPointIndex].mapNotNullTo(spilledToVariable) { (slot, spillableVariable) ->
|
||||
calculateSpilledVariableAndField(suspension, slot, spillableVariable)
|
||||
}
|
||||
|
||||
spilledToVariableMapping += spilledToVariable
|
||||
}
|
||||
|
||||
// Mutate method node
|
||||
|
||||
fun generateSpillAndUnspill(suspension: SuspensionPoint, slot: Int, spillableVariable: SpillableVariable?) {
|
||||
@@ -772,6 +801,22 @@ class CoroutineTransformerMethodVisitor(
|
||||
return
|
||||
}
|
||||
|
||||
// Find and remove the local variable node, if any, in the local variable table corresponding to the slot that is spilled.
|
||||
var local: LocalVariableNode? = null
|
||||
val localRestart = LabelNode().linkWithLabel()
|
||||
val iterator = methodNode.localVariables.listIterator()
|
||||
while (iterator.hasNext()) {
|
||||
val node = iterator.next()
|
||||
if (node.index == slot &&
|
||||
methodNode.instructions.indexOf(node.start) <= methodNode.instructions.indexOf(suspension.suspensionCallBegin) &&
|
||||
methodNode.instructions.indexOf(node.end) > methodNode.instructions.indexOf(suspension.tryCatchBlockEndLabelAfterSuspensionCall)
|
||||
) {
|
||||
local = node
|
||||
iterator.remove()
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
with(instructions) {
|
||||
// store variable before suspension call
|
||||
insertBefore(suspension.suspensionCallBegin, withInstructionAdapter {
|
||||
@@ -795,8 +840,31 @@ class CoroutineTransformerMethodVisitor(
|
||||
)
|
||||
StackValue.coerce(spillableVariable.normalizedType, spillableVariable.type, this)
|
||||
store(slot, spillableVariable.type)
|
||||
if (local != null) {
|
||||
visitLabel(localRestart.label)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Split the local variable range for the local so that it is visible until the next state label, but is
|
||||
// not visible until it has been unspilled from the continuation on the reentry path.
|
||||
if (local != null) {
|
||||
val previousEnd = local.end
|
||||
local.end = suspension.stateLabel
|
||||
// Add the local back, but end it at the next state label.
|
||||
methodNode.localVariables.add(local)
|
||||
// Add a new entry that starts after the local variable is restored from the continuation.
|
||||
methodNode.localVariables.add(
|
||||
LocalVariableNode(
|
||||
local.name,
|
||||
local.desc,
|
||||
local.signature,
|
||||
localRestart,
|
||||
previousEnd,
|
||||
local.index
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun cleanUpField(suspension: SuspensionPoint, fieldIndex: Int) {
|
||||
@@ -839,33 +907,6 @@ class CoroutineTransformerMethodVisitor(
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate debug metadata mapping
|
||||
|
||||
fun calculateSpilledVariableAndField(
|
||||
suspension: SuspensionPoint,
|
||||
slot: Int,
|
||||
spillableVariable: SpillableVariable?
|
||||
): SpilledVariableAndField? {
|
||||
if (spillableVariable == null) return null
|
||||
val name = localVariableName(methodNode, slot, suspension.suspensionCallEnd.next.index()) ?: return null
|
||||
return SpilledVariableAndField(spillableVariable.fieldName, name)
|
||||
}
|
||||
|
||||
val spilledToVariableMapping = arrayListOf<List<SpilledVariableAndField>>()
|
||||
for (suspensionPointIndex in suspensionPoints.indices) {
|
||||
val suspension = suspensionPoints[suspensionPointIndex]
|
||||
|
||||
val spilledToVariable = arrayListOf<SpilledVariableAndField>()
|
||||
|
||||
referencesToSpillBySuspensionPointIndex[suspensionPointIndex].mapNotNullTo(spilledToVariable) { (slot, spillableVariable) ->
|
||||
calculateSpilledVariableAndField(suspension, slot, spillableVariable)
|
||||
}
|
||||
primitivesToSpillBySuspensionPointIndex[suspensionPointIndex].mapNotNullTo(spilledToVariable) { (slot, spillableVariable) ->
|
||||
calculateSpilledVariableAndField(suspension, slot, spillableVariable)
|
||||
}
|
||||
|
||||
spilledToVariableMapping += spilledToVariable
|
||||
}
|
||||
return spilledToVariableMapping
|
||||
}
|
||||
|
||||
@@ -901,7 +942,6 @@ class CoroutineTransformerMethodVisitor(
|
||||
suspendMarkerVarIndex: Int,
|
||||
suspendPointLineNumber: LineNumberNode?
|
||||
): LabelNode {
|
||||
val stateLabel = LabelNode().linkWithLabel()
|
||||
val continuationLabelAfterLoadedResult = LabelNode()
|
||||
val suspendElementLineNumber = lineNumber
|
||||
var nextLineNumberNode = nextDefinitelyHitLineNumber(suspension)
|
||||
@@ -929,7 +969,7 @@ class CoroutineTransformerMethodVisitor(
|
||||
load(suspendMarkerVarIndex, AsmTypes.OBJECT_TYPE)
|
||||
areturn(AsmTypes.OBJECT_TYPE)
|
||||
// Mark place for continuation
|
||||
visitLabel(stateLabel.label)
|
||||
visitLabel(suspension.stateLabel.label)
|
||||
})
|
||||
|
||||
// After suspension point there is always three nodes: L1, NOP, L2
|
||||
@@ -985,7 +1025,7 @@ class CoroutineTransformerMethodVisitor(
|
||||
}
|
||||
}
|
||||
|
||||
return stateLabel
|
||||
return suspension.stateLabel
|
||||
}
|
||||
|
||||
// Find the next line number instruction that is defintely hit. That is, a line number
|
||||
@@ -1154,6 +1194,7 @@ internal class SuspensionPoint(
|
||||
) {
|
||||
lateinit var tryCatchBlocksContinuationLabel: LabelNode
|
||||
|
||||
val stateLabel = LabelNode().linkWithLabel()
|
||||
val unboxInlineClassInstructions: List<AbstractInsnNode> = findUnboxInlineClassInstructions()
|
||||
|
||||
private fun findUnboxInlineClassInstructions(): List<AbstractInsnNode> {
|
||||
|
||||
@@ -320,8 +320,7 @@ abstract class InlineCodegen<out T : BaseExpressionCodegen>(
|
||||
|
||||
val splitBy = SimpleInterval(start.info as LabelNode, extension.finallyIntervalEnd)
|
||||
processor.tryBlocksMetaInfo.splitAndRemoveCurrentIntervals(splitBy, true)
|
||||
|
||||
//processor.getLocalVarsMetaInfo().splitAndRemoveIntervalsFromCurrents(splitBy);
|
||||
processor.localVarsMetaInfo.splitAndRemoveCurrentIntervals(splitBy, true);
|
||||
|
||||
mark.dropTo()
|
||||
}
|
||||
@@ -330,8 +329,7 @@ abstract class InlineCodegen<out T : BaseExpressionCodegen>(
|
||||
}
|
||||
|
||||
processor.substituteTryBlockNodes(intoNode)
|
||||
|
||||
//processor.substituteLocalVarTable(intoNode);
|
||||
processor.substituteLocalVarTable(intoNode);
|
||||
}
|
||||
|
||||
protected abstract fun generateAssertFieldIfNeeded(info: RootInliningContext)
|
||||
|
||||
@@ -39,7 +39,7 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt
|
||||
|
||||
override fun transform(internalClassName: String, node: MethodNode) {
|
||||
val interpreter = RedundantBoxingInterpreter(node.instructions, generationState)
|
||||
val frames = MethodTransformer.analyze(internalClassName, node, interpreter)
|
||||
val frames = analyze(internalClassName, node, interpreter)
|
||||
|
||||
interpretPopInstructionsForBoxedValues(interpreter, node, frames)
|
||||
|
||||
@@ -168,7 +168,8 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt
|
||||
val frame = frames[i] ?: continue
|
||||
val insn = insnList[i]
|
||||
if ((insn.opcode == Opcodes.ASTORE || insn.opcode == Opcodes.ALOAD) &&
|
||||
(insn as VarInsnNode).`var` == localVariableNode.index) {
|
||||
(insn as VarInsnNode).`var` == localVariableNode.index
|
||||
) {
|
||||
if (insn.getOpcode() == Opcodes.ASTORE) {
|
||||
values.add(frame.top()!!)
|
||||
} else {
|
||||
|
||||
@@ -87,11 +87,6 @@ fun CallableMemberDescriptor.createTypeParameterWithNewName(
|
||||
return newDescriptor
|
||||
}
|
||||
|
||||
fun KotlinType.removeExternalProjections(): KotlinType {
|
||||
val newArguments = arguments.map { TypeProjectionImpl(Variance.INVARIANT, it.type) }
|
||||
return replace(newArguments)
|
||||
}
|
||||
|
||||
fun isInlineClassConstructorAccessor(descriptor: FunctionDescriptor): Boolean =
|
||||
descriptor is AccessorForConstructorDescriptor &&
|
||||
descriptor.calleeDescriptor.constructedClass.isInlineClass()
|
||||
|
||||
@@ -377,7 +377,7 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
default: `indy-with-constants` for JVM target 9 or greater, `inline` otherwise"""
|
||||
|
||||
)
|
||||
var stringConcat: String? by NullableStringFreezableVar(JvmStringConcat.INLINE.description)
|
||||
var stringConcat: String? by NullableStringFreezableVar(null)
|
||||
|
||||
@Argument(
|
||||
value = "-Xsam-conversions",
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":compiler:cli"))
|
||||
compile(project(":compiler:ir.serialization.js"))
|
||||
compileOnly(project(":compiler:ir.tree.persistent"))
|
||||
runtimeOnly(project(":kotlin-reflect"))
|
||||
if (Platform[193].orLower()) {
|
||||
compile(intellijDep()) { includeJars("picocontainer", rootProject = rootProject) }
|
||||
}
|
||||
compile(intellijDep()) { includeJars("trove4j", "guava", "jdom", rootProject = rootProject) }
|
||||
compile(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
// Internal CLI for building JS IR libraries
|
||||
|
||||
package org.jetbrains.kotlin.ir.backend.js
|
||||
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.vfs.StandardFileSystems
|
||||
import com.intellij.openapi.vfs.VirtualFileManager
|
||||
import com.intellij.psi.PsiManager
|
||||
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
|
||||
import org.jetbrains.kotlin.cli.common.messages.*
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.config.*
|
||||
import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory
|
||||
import org.jetbrains.kotlin.js.config.JSConfigurationKeys
|
||||
import org.jetbrains.kotlin.library.resolver.KotlinLibraryResolveResult
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.multiplatform.isCommonSource
|
||||
import org.jetbrains.kotlin.serialization.js.ModuleKind
|
||||
import org.jetbrains.kotlin.util.Logger
|
||||
import java.io.File
|
||||
|
||||
fun buildConfiguration(environment: KotlinCoreEnvironment, moduleName: String): CompilerConfiguration {
|
||||
val runtimeConfiguration = environment.configuration.copy()
|
||||
runtimeConfiguration.put(CommonConfigurationKeys.MODULE_NAME, moduleName)
|
||||
runtimeConfiguration.put(JSConfigurationKeys.MODULE_KIND, ModuleKind.PLAIN)
|
||||
runtimeConfiguration.put(
|
||||
CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY,
|
||||
PrintingMessageCollector(System.err, MessageRenderer.PLAIN_RELATIVE_PATHS, false)
|
||||
)
|
||||
|
||||
runtimeConfiguration.languageVersionSettings = LanguageVersionSettingsImpl(
|
||||
LanguageVersion.LATEST_STABLE, ApiVersion.LATEST_STABLE,
|
||||
specificFeatures = mapOf(
|
||||
LanguageFeature.AllowContractsForCustomFunctions to LanguageFeature.State.ENABLED,
|
||||
LanguageFeature.MultiPlatformProjects to LanguageFeature.State.ENABLED
|
||||
),
|
||||
analysisFlags = mapOf(
|
||||
AnalysisFlags.useExperimental to listOf(
|
||||
"kotlin.RequiresOptIn",
|
||||
"kotlin.contracts.ExperimentalContracts",
|
||||
"kotlin.ExperimentalMultiplatform",
|
||||
),
|
||||
AnalysisFlags.allowResultReturnType to true
|
||||
)
|
||||
)
|
||||
|
||||
return runtimeConfiguration
|
||||
}
|
||||
|
||||
@Suppress("RedundantSamConstructor")
|
||||
private val environment =
|
||||
KotlinCoreEnvironment.createForProduction(Disposable { }, CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
|
||||
|
||||
fun createPsiFile(fileName: String): KtFile {
|
||||
val psiManager = PsiManager.getInstance(environment.project)
|
||||
val fileSystem = VirtualFileManager.getInstance().getFileSystem(StandardFileSystems.FILE_PROTOCOL)
|
||||
|
||||
val file = fileSystem.findFileByPath(fileName) ?: error("File not found: $fileName")
|
||||
|
||||
return psiManager.findFile(file) as KtFile
|
||||
}
|
||||
|
||||
|
||||
fun buildKLib(
|
||||
moduleName: String,
|
||||
sources: List<String>,
|
||||
outputPath: String,
|
||||
allDependencies: KotlinLibraryResolveResult,
|
||||
commonSources: List<String>
|
||||
) {
|
||||
val configuration = buildConfiguration(environment, moduleName)
|
||||
generateKLib(
|
||||
project = environment.project,
|
||||
files = sources.map { source ->
|
||||
val file = createPsiFile(source)
|
||||
if (source in commonSources) {
|
||||
file.isCommonSource = true
|
||||
}
|
||||
file
|
||||
},
|
||||
analyzer = AnalyzerWithCompilerReport(configuration),
|
||||
configuration = configuration,
|
||||
allDependencies = allDependencies,
|
||||
friendDependencies = emptyList(),
|
||||
irFactory = PersistentIrFactory(), // TODO: IrFactoryImpl?
|
||||
outputKlibPath = outputPath,
|
||||
nopack = true
|
||||
)
|
||||
}
|
||||
|
||||
private fun listOfKtFilesFrom(paths: List<String>): List<String> {
|
||||
val currentDir = File("")
|
||||
return paths.flatMap { path ->
|
||||
File(path)
|
||||
.walkTopDown()
|
||||
.filter { it.extension == "kt" }
|
||||
.map { it.relativeToOrSelf(currentDir).path }
|
||||
.asIterable()
|
||||
}.distinct()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val inputFiles = mutableListOf<String>()
|
||||
var outputPath: String? = null
|
||||
val dependencies = mutableListOf<String>()
|
||||
val commonSources = mutableListOf<String>()
|
||||
var moduleName: String? = null
|
||||
|
||||
var index = 0
|
||||
while (index < args.size) {
|
||||
val arg = args[index++]
|
||||
|
||||
when (arg) {
|
||||
"-n" -> moduleName = args[index++]
|
||||
"-o" -> outputPath = args[index++]
|
||||
"-d" -> dependencies += args[index++]
|
||||
"-c" -> commonSources += args[index++]
|
||||
else -> inputFiles += arg
|
||||
}
|
||||
}
|
||||
|
||||
if (outputPath == null) {
|
||||
error("Please set path to .klm file: `-o some/dir/module-name.klm`")
|
||||
}
|
||||
|
||||
if (moduleName == null) {
|
||||
error("Please set module name: `-n module-name`")
|
||||
}
|
||||
|
||||
val resolvedLibraries = jsResolveLibraries(
|
||||
dependencies, emptyList(), messageCollectorLogger(MessageCollector.NONE)
|
||||
)
|
||||
|
||||
buildKLib(moduleName, listOfKtFilesFrom(inputFiles), outputPath, resolvedLibraries, listOfKtFilesFrom(commonSources))
|
||||
}
|
||||
|
||||
// Copied here from `K2JsIrCompiler` instead of reusing in order to avoid circular dependencies between Gradle tasks
|
||||
private fun messageCollectorLogger(collector: MessageCollector) = object : Logger {
|
||||
override fun warning(message: String)= collector.report(CompilerMessageSeverity.STRONG_WARNING, message)
|
||||
override fun error(message: String) = collector.report(CompilerMessageSeverity.ERROR, message)
|
||||
override fun log(message: String) = collector.report(CompilerMessageSeverity.LOGGING, message)
|
||||
override fun fatal(message: String): Nothing {
|
||||
collector.report(CompilerMessageSeverity.ERROR, message)
|
||||
(collector as? GroupingMessageCollector)?.flush()
|
||||
kotlin.error(message)
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ dependencies {
|
||||
compile(project(":compiler:backend-common"))
|
||||
compile(project(":compiler:ir.backend.common"))
|
||||
compile(project(":compiler:ir.serialization.js"))
|
||||
compile(project(":compiler:ir.tree.impl"))
|
||||
compile(project(":compiler:backend.js"))
|
||||
compile(project(":compiler:backend.wasm"))
|
||||
compile(project(":js:js.translator"))
|
||||
|
||||
@@ -17,7 +17,8 @@ import org.jetbrains.kotlin.cli.common.ExitCode.COMPILATION_ERROR
|
||||
import org.jetbrains.kotlin.cli.common.ExitCode.OK
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants.*
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants.DCE_RUNTIME_DIAGNOSTIC_EXCEPTION
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants.DCE_RUNTIME_DIAGNOSTIC_LOG
|
||||
import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot
|
||||
import org.jetbrains.kotlin.cli.common.extensions.ScriptEvaluationExtension
|
||||
import org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport
|
||||
@@ -38,6 +39,7 @@ import org.jetbrains.kotlin.incremental.js.IncrementalDataProvider
|
||||
import org.jetbrains.kotlin.incremental.js.IncrementalNextRoundChecker
|
||||
import org.jetbrains.kotlin.incremental.js.IncrementalResultsConsumer
|
||||
import org.jetbrains.kotlin.ir.backend.js.*
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory
|
||||
import org.jetbrains.kotlin.js.config.*
|
||||
import org.jetbrains.kotlin.library.KLIB_FILE_EXTENSION
|
||||
@@ -230,6 +232,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
AnalyzerWithCompilerReport(config.configuration),
|
||||
config.configuration,
|
||||
PhaseConfig(wasmPhases),
|
||||
IrFactoryImpl,
|
||||
allDependencies = resolvedLibraries,
|
||||
friendDependencies = friendDependencies,
|
||||
exportedDeclarations = setOf(FqName("main"))
|
||||
@@ -256,6 +259,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
AnalyzerWithCompilerReport(config.configuration),
|
||||
config.configuration,
|
||||
phaseConfig,
|
||||
if (arguments.irDceDriven) PersistentIrFactory() else IrFactoryImpl,
|
||||
allDependencies = resolvedLibraries,
|
||||
friendDependencies = friendDependencies,
|
||||
mainArguments = mainCallArguments,
|
||||
|
||||
@@ -21,7 +21,7 @@ class CodeAnalysisMeasurement(private val lines: Int?, val milliseconds: Long) :
|
||||
override fun render(): String = formatMeasurement("ANALYZE", milliseconds, lines)
|
||||
}
|
||||
|
||||
class CodeGenerationMeasurement(private val lines: Int?, private val milliseconds: Long) : PerformanceMeasurement {
|
||||
class CodeGenerationMeasurement(private val lines: Int?, val milliseconds: Long) : PerformanceMeasurement {
|
||||
override fun render(): String = formatMeasurement("GENERATE", milliseconds, lines)
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.psi.PsiJavaModule
|
||||
import com.intellij.psi.PsiManager
|
||||
import com.intellij.psi.impl.light.LightJavaModule
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import org.jetbrains.kotlin.cli.common.config.ContentRoot
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
|
||||
@@ -37,6 +38,7 @@ import org.jetbrains.kotlin.cli.jvm.modules.CliJavaModuleFinder
|
||||
import org.jetbrains.kotlin.cli.jvm.modules.JavaModuleGraph
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.isValidJavaFqName
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinCliJavaFileManager
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModule
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleInfo
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.KOTLIN_STDLIB_MODULE_NAME
|
||||
@@ -52,10 +54,13 @@ class ClasspathRootsResolver(
|
||||
private val contentRootToVirtualFile: (JvmContentRoot) -> VirtualFile?,
|
||||
private val javaModuleFinder: CliJavaModuleFinder,
|
||||
private val requireStdlibModule: Boolean,
|
||||
private val outputDirectory: VirtualFile?
|
||||
private val outputDirectory: VirtualFile?,
|
||||
private val javaFileManager: KotlinCliJavaFileManager
|
||||
) {
|
||||
val javaModuleGraph = JavaModuleGraph(javaModuleFinder)
|
||||
|
||||
private val searchScope = GlobalSearchScope.allScope(psiManager.project)
|
||||
|
||||
data class RootsAndModules(val roots: List<JavaRoot>, val modules: List<JavaModule>)
|
||||
|
||||
private data class RootWithPrefix(val root: VirtualFile, val packagePrefix: String?)
|
||||
@@ -160,7 +165,7 @@ class ClasspathRootsResolver(
|
||||
}
|
||||
|
||||
if (moduleInfoFile != null) {
|
||||
val moduleInfo = JavaModuleInfo.read(moduleInfoFile) ?: return null
|
||||
val moduleInfo = JavaModuleInfo.read(moduleInfoFile, javaFileManager, searchScope) ?: return null
|
||||
return JavaModule.Explicit(moduleInfo, listOf(JavaModule.Root(root, isBinary = true)), moduleInfoFile)
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@ class CliVirtualFileFinder(
|
||||
override fun findVirtualFileWithHeader(classId: ClassId): VirtualFile? =
|
||||
findBinaryClass(classId, classId.relativeClassName.asString().replace('.', '$') + ".class")
|
||||
|
||||
override fun findSourceOrBinaryVirtualFile(classId: ClassId) =
|
||||
findBinaryClass(classId, classId.relativeClassName.asString().replace('.', '$') + ".class")
|
||||
?: findSourceClass(classId, classId.relativeClassName.asString() + ".java")
|
||||
|
||||
override fun findMetadata(classId: ClassId): InputStream? {
|
||||
assert(!classId.isNestedClass) { "Nested classes are not supported here: $classId" }
|
||||
|
||||
@@ -61,8 +65,11 @@ class CliVirtualFileFinder(
|
||||
return findBinaryClass(classId, BuiltInSerializerProtocol.getBuiltInsFileName(packageFqName))?.inputStream
|
||||
}
|
||||
|
||||
private fun findBinaryClass(classId: ClassId, fileName: String): VirtualFile? =
|
||||
index.findClass(classId, acceptedRootTypes = JavaRoot.OnlyBinary) { dir, _ ->
|
||||
private fun findClass(classId: ClassId, fileName: String, rootType: Set<JavaRoot.RootType>) =
|
||||
index.findClass(classId, acceptedRootTypes = rootType) { dir, _ ->
|
||||
dir.findChild(fileName)?.takeIf(VirtualFile::isValid)
|
||||
}?.takeIf { it in scope }
|
||||
|
||||
private fun findBinaryClass(classId: ClassId, fileName: String) = findClass(classId, fileName, JavaRoot.OnlyBinary)
|
||||
private fun findSourceClass(classId: ClassId, fileName: String) = findClass(classId, fileName, JavaRoot.OnlySource)
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class KotlinCliJavaFileManagerImpl(private val myPsiManager: PsiManager) : CoreJ
|
||||
private val binaryCache: MutableMap<ClassId, JavaClass?> = THashMap()
|
||||
private val signatureParsingComponent = BinaryClassSignatureParser()
|
||||
|
||||
fun findClass(classId: ClassId, searchScope: GlobalSearchScope): JavaClass? = findClass(JavaClassFinder.Request(classId), searchScope)
|
||||
fun findClass(classId: ClassId, searchScope: GlobalSearchScope) = findClass(JavaClassFinder.Request(classId), searchScope)
|
||||
|
||||
override fun findClass(request: JavaClassFinder.Request, searchScope: GlobalSearchScope): JavaClass? {
|
||||
val (classId, classFileContentFromRequest, outerClassFromRequest) = request
|
||||
|
||||
@@ -33,13 +33,11 @@ import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.openapi.extensions.ExtensionsArea
|
||||
import com.intellij.openapi.fileTypes.PlainTextFileType
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.roots.LanguageLevelProjectExtension
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.util.io.FileUtilRt
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.openapi.vfs.*
|
||||
import com.intellij.openapi.vfs.impl.ZipHandler
|
||||
import com.intellij.pom.java.LanguageLevel
|
||||
import com.intellij.psi.PsiElementFinder
|
||||
import com.intellij.psi.PsiManager
|
||||
import com.intellij.psi.impl.JavaClassSupersImpl
|
||||
@@ -94,6 +92,7 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer
|
||||
import org.jetbrains.kotlin.resolve.ModuleAnnotationsResolver
|
||||
import org.jetbrains.kotlin.resolve.extensions.ExtraImportsProviderExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.SyntheticJavaResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
|
||||
@@ -191,11 +190,17 @@ class KotlinCoreEnvironment private constructor(
|
||||
|
||||
sourceFiles.sortBy { it.virtualFile.path }
|
||||
|
||||
val javaFileManager = ServiceManager.getService(project, CoreJavaFileManager::class.java) as KotlinCliJavaFileManagerImpl
|
||||
|
||||
val jdkHome = configuration.get(JVMConfigurationKeys.JDK_HOME)
|
||||
val jrtFileSystem = VirtualFileManager.getInstance().getFileSystem(StandardFileSystems.JRT_PROTOCOL)
|
||||
val javaModuleFinder = CliJavaModuleFinder(jdkHome?.path?.let { path ->
|
||||
jrtFileSystem?.findFileByPath(path + URLUtil.JAR_SEPARATOR)
|
||||
})
|
||||
val javaModuleFinder = CliJavaModuleFinder(
|
||||
jdkHome?.path?.let { path ->
|
||||
jrtFileSystem?.findFileByPath(path + URLUtil.JAR_SEPARATOR)
|
||||
},
|
||||
javaFileManager,
|
||||
project
|
||||
)
|
||||
|
||||
val outputDirectory =
|
||||
configuration.get(JVMConfigurationKeys.MODULES)?.singleOrNull()?.getOutputDirectory()
|
||||
@@ -208,7 +213,8 @@ class KotlinCoreEnvironment private constructor(
|
||||
this::contentRootToVirtualFile,
|
||||
javaModuleFinder,
|
||||
!configuration.getBoolean(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE),
|
||||
outputDirectory?.let(this::findLocalFile)
|
||||
outputDirectory?.let(this::findLocalFile),
|
||||
javaFileManager
|
||||
)
|
||||
|
||||
val (initialRoots, javaModules) =
|
||||
@@ -232,7 +238,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
updateClasspathFromRootsIndex(this)
|
||||
}
|
||||
|
||||
(ServiceManager.getService(project, CoreJavaFileManager::class.java) as KotlinCliJavaFileManagerImpl).initialize(
|
||||
javaFileManager.initialize(
|
||||
rootsIndex,
|
||||
packagePartProviders,
|
||||
SingleJavaFileRootsIndex(singleJavaFileRoots),
|
||||
@@ -241,7 +247,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
|
||||
project.registerService(
|
||||
JavaModuleResolver::class.java,
|
||||
CliJavaModuleResolver(classpathRootsResolver.javaModuleGraph, javaModules, javaModuleFinder.systemModules.toList())
|
||||
CliJavaModuleResolver(classpathRootsResolver.javaModuleGraph, javaModules, javaModuleFinder.systemModules.toList(), project)
|
||||
)
|
||||
|
||||
val finderFactory = CliVirtualFileFinderFactory(rootsIndex)
|
||||
@@ -577,6 +583,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
fun registerPluginExtensionPoints(project: MockProject) {
|
||||
ExpressionCodegenExtension.registerExtensionPoint(project)
|
||||
SyntheticResolveExtension.registerExtensionPoint(project)
|
||||
SyntheticJavaResolveExtension.registerExtensionPoint(project)
|
||||
ClassBuilderInterceptorExtension.registerExtensionPoint(project)
|
||||
AnalysisHandlerExtension.registerExtensionPoint(project)
|
||||
PackageFragmentProviderExtension.registerExtensionPoint(project)
|
||||
|
||||
@@ -78,10 +78,7 @@ import org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem
|
||||
import org.jetbrains.kotlin.codegen.extensions.ClassBuilderInterceptorExtension
|
||||
import org.jetbrains.kotlin.codegen.extensions.ExpressionCodegenExtension
|
||||
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
|
||||
import org.jetbrains.kotlin.config.APPEND_JAVA_SOURCE_ROOTS_HANDLER_KEY
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
||||
import org.jetbrains.kotlin.config.languageVersionSettings
|
||||
import org.jetbrains.kotlin.config.*
|
||||
import org.jetbrains.kotlin.extensions.*
|
||||
import org.jetbrains.kotlin.extensions.internal.CandidateInterceptor
|
||||
import org.jetbrains.kotlin.extensions.internal.TypeResolutionInterceptor
|
||||
@@ -96,6 +93,7 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer
|
||||
import org.jetbrains.kotlin.resolve.ModuleAnnotationsResolver
|
||||
import org.jetbrains.kotlin.resolve.extensions.ExtraImportsProviderExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.SyntheticJavaResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
|
||||
@@ -192,11 +190,16 @@ class KotlinCoreEnvironment private constructor(
|
||||
|
||||
sourceFiles.sortBy { it.virtualFile.path }
|
||||
|
||||
val javaFileManager = ServiceManager.getService(project, CoreJavaFileManager::class.java) as KotlinCliJavaFileManagerImpl
|
||||
|
||||
val jdkHome = configuration.get(JVMConfigurationKeys.JDK_HOME)
|
||||
val jrtFileSystem = VirtualFileManager.getInstance().getFileSystem(StandardFileSystems.JRT_PROTOCOL)
|
||||
val javaModuleFinder = CliJavaModuleFinder(jdkHome?.path?.let { path ->
|
||||
jrtFileSystem?.findFileByPath(path + URLUtil.JAR_SEPARATOR)
|
||||
})
|
||||
val javaModuleFinder = CliJavaModuleFinder(
|
||||
jdkHome?.path?.let { path ->
|
||||
jrtFileSystem?.findFileByPath(path + URLUtil.JAR_SEPARATOR)
|
||||
},
|
||||
javaFileManager
|
||||
)
|
||||
|
||||
val outputDirectory =
|
||||
configuration.get(JVMConfigurationKeys.MODULES)?.singleOrNull()?.getOutputDirectory()
|
||||
@@ -209,7 +212,8 @@ class KotlinCoreEnvironment private constructor(
|
||||
this::contentRootToVirtualFile,
|
||||
javaModuleFinder,
|
||||
!configuration.getBoolean(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE),
|
||||
outputDirectory?.let(this::findLocalFile)
|
||||
outputDirectory?.let(this::findLocalFile),
|
||||
javaFileManager
|
||||
)
|
||||
|
||||
val (initialRoots, javaModules) =
|
||||
@@ -233,7 +237,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
updateClasspathFromRootsIndex(this)
|
||||
}
|
||||
|
||||
(ServiceManager.getService(project, CoreJavaFileManager::class.java) as KotlinCliJavaFileManagerImpl).initialize(
|
||||
javaFileManager.initialize(
|
||||
rootsIndex,
|
||||
packagePartProviders,
|
||||
SingleJavaFileRootsIndex(singleJavaFileRoots),
|
||||
@@ -242,7 +246,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
|
||||
project.registerService(
|
||||
JavaModuleResolver::class.java,
|
||||
CliJavaModuleResolver(classpathRootsResolver.javaModuleGraph, javaModules, javaModuleFinder.systemModules.toList())
|
||||
CliJavaModuleResolver(classpathRootsResolver.javaModuleGraph, javaModules, javaModuleFinder.systemModules.toList(), project)
|
||||
)
|
||||
|
||||
val finderFactory = CliVirtualFileFinderFactory(rootsIndex)
|
||||
@@ -569,6 +573,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
fun registerPluginExtensionPoints(project: MockProject) {
|
||||
ExpressionCodegenExtension.registerExtensionPoint(project)
|
||||
SyntheticResolveExtension.registerExtensionPoint(project)
|
||||
SyntheticJavaResolveExtension.registerExtensionPoint(project)
|
||||
ClassBuilderInterceptorExtension.registerExtensionPoint(project)
|
||||
AnalysisHandlerExtension.registerExtensionPoint(project)
|
||||
PackageFragmentProviderExtension.registerExtensionPoint(project)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.kotlin.cli.jvm.compiler
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.vfs.*
|
||||
import com.intellij.psi.PsiElementFinder
|
||||
import com.intellij.psi.PsiJavaModule
|
||||
@@ -36,8 +37,7 @@ import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
|
||||
import org.jetbrains.kotlin.cli.common.checkKotlinPackageUsage
|
||||
import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot
|
||||
import org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.OUTPUT
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.WARNING
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.*
|
||||
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
|
||||
import org.jetbrains.kotlin.cli.common.messages.OutputMessageUtil
|
||||
import org.jetbrains.kotlin.cli.common.output.writeAll
|
||||
@@ -304,6 +304,11 @@ object KotlinToJVMBytecodeCompiler {
|
||||
val project = environment.project
|
||||
val performanceManager = environment.configuration.get(CLIConfigurationKeys.PERF_MANAGER)
|
||||
|
||||
environment.messageCollector.report(
|
||||
STRONG_WARNING,
|
||||
"ATTENTION!\n This build uses in-dev FIR: \n -Xuse-fir"
|
||||
)
|
||||
|
||||
PsiElementFinder.EP.getPoint(project).unregisterExtension(JavaElementFinder::class.java)
|
||||
|
||||
val projectConfiguration = environment.configuration
|
||||
@@ -427,6 +432,9 @@ object KotlinToJVMBytecodeCompiler {
|
||||
performanceManager?.notifyGenerationFinished()
|
||||
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
|
||||
outputs[module] = generationState
|
||||
|
||||
PsiElementFinder.EP.getPoint(project).unregisterExtension(JavaElementFinder::class.java)
|
||||
Disposer.dispose(environment.project)
|
||||
}
|
||||
|
||||
val mainClassFqName: FqName? =
|
||||
|
||||
@@ -49,6 +49,9 @@ fun CompilerConfiguration.addJvmSdkRoots(files: List<File>) {
|
||||
val CompilerConfiguration.jvmClasspathRoots: List<File>
|
||||
get() = getList(CLIConfigurationKeys.CONTENT_ROOTS).filterIsInstance<JvmClasspathRoot>().map(JvmContentRoot::file)
|
||||
|
||||
val CompilerConfiguration.jvmModularRoots: List<File>
|
||||
get() = getList(CLIConfigurationKeys.CONTENT_ROOTS).filterIsInstance<JvmModulePathRoot>().map(JvmContentRoot::file)
|
||||
|
||||
@JvmOverloads
|
||||
fun CompilerConfiguration.addJavaSourceRoot(file: File, packagePrefix: String? = null) {
|
||||
add(CLIConfigurationKeys.CONTENT_ROOTS, JavaSourceRoot(file, packagePrefix))
|
||||
|
||||
@@ -45,6 +45,7 @@ data class JavaRoot(val file: VirtualFile, val type: RootType, val prefixFqName:
|
||||
|
||||
companion object RootTypes {
|
||||
val OnlyBinary: Set<RootType> = EnumSet.of(RootType.BINARY)
|
||||
val OnlySource: Set<RootType> = EnumSet.of(RootType.SOURCE)
|
||||
val SourceAndBinary: Set<RootType> = EnumSet.of(RootType.BINARY, RootType.SOURCE)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,19 +54,20 @@ fun CompilerConfiguration.setupJvmSpecificArguments(arguments: K2JVMCompilerArgu
|
||||
}
|
||||
}
|
||||
|
||||
if (arguments.stringConcat != null) {
|
||||
val runtimeStringConcat = JvmStringConcat.fromString(arguments.stringConcat!!)
|
||||
val stringConcat = arguments.stringConcat
|
||||
if (stringConcat != null) {
|
||||
val runtimeStringConcat = JvmStringConcat.fromString(stringConcat)
|
||||
if (runtimeStringConcat != null) {
|
||||
put(JVMConfigurationKeys.STRING_CONCAT, runtimeStringConcat)
|
||||
if (jvmTarget.majorVersion < JvmTarget.JVM_9.majorVersion && runtimeStringConcat != JvmStringConcat.INLINE) {
|
||||
messageCollector.report(
|
||||
WARNING,
|
||||
"`-Xstring-concat=${arguments.stringConcat}` does nothing with JVM target `${jvmTarget.description}`."
|
||||
"`-Xstring-concat=$stringConcat` does nothing with JVM target `${jvmTarget.description}`."
|
||||
)
|
||||
}
|
||||
} else {
|
||||
messageCollector.report(
|
||||
ERROR, "Unknown `-Xstring-concat` mode: ${arguments.stringConcat}\n" +
|
||||
ERROR, "Unknown `-Xstring-concat` mode: $stringConcat\n" +
|
||||
"Supported modes: ${JvmStringConcat.values().joinToString { it.description }}"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -16,16 +16,25 @@
|
||||
|
||||
package org.jetbrains.kotlin.cli.jvm.modules
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.psi.PsiJavaModule
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinCliJavaFileManager
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModule
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleFinder
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleInfo
|
||||
|
||||
class CliJavaModuleFinder(jrtFileSystemRoot: VirtualFile?) : JavaModuleFinder {
|
||||
class CliJavaModuleFinder(
|
||||
jrtFileSystemRoot: VirtualFile?,
|
||||
private val javaFileManager: KotlinCliJavaFileManager,
|
||||
project: Project
|
||||
) : JavaModuleFinder {
|
||||
private val modulesRoot = jrtFileSystemRoot?.findChild("modules")
|
||||
private val userModules = linkedMapOf<String, JavaModule>()
|
||||
|
||||
private val allScope = GlobalSearchScope.allScope(project)
|
||||
|
||||
fun addUserModule(module: JavaModule) {
|
||||
userModules.putIfAbsent(module.name, module)
|
||||
}
|
||||
@@ -41,7 +50,7 @@ class CliJavaModuleFinder(jrtFileSystemRoot: VirtualFile?) : JavaModuleFinder {
|
||||
|
||||
private fun findSystemModule(moduleRoot: VirtualFile): JavaModule.Explicit? {
|
||||
val file = moduleRoot.findChild(PsiJavaModule.MODULE_INFO_CLS_FILE) ?: return null
|
||||
val moduleInfo = JavaModuleInfo.read(file) ?: return null
|
||||
val moduleInfo = JavaModuleInfo.read(file, javaFileManager, allScope) ?: return null
|
||||
return JavaModule.Explicit(moduleInfo, listOf(JavaModule.Root(moduleRoot, isBinary = true)), file)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,18 +18,24 @@ package org.jetbrains.kotlin.cli.jvm.modules
|
||||
|
||||
import com.intellij.ide.highlighter.JavaClassFileType
|
||||
import com.intellij.ide.highlighter.JavaFileType
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.vfs.StandardFileSystems
|
||||
import com.intellij.openapi.vfs.VfsUtilCore
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.jetbrains.kotlin.load.java.structure.JavaAnnotation
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModule
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleResolver
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
class CliJavaModuleResolver(
|
||||
private val moduleGraph: JavaModuleGraph,
|
||||
private val userModules: List<JavaModule>,
|
||||
private val systemModules: List<JavaModule.Explicit>
|
||||
private val systemModules: List<JavaModule.Explicit>,
|
||||
private val project: Project
|
||||
) : JavaModuleResolver {
|
||||
init {
|
||||
assert(userModules.count(JavaModule::isSourceModule) <= 1) {
|
||||
@@ -37,6 +43,14 @@ class CliJavaModuleResolver(
|
||||
}
|
||||
}
|
||||
|
||||
private val virtualFileFinder by lazy { VirtualFileFinder.getInstance(project) }
|
||||
|
||||
override fun getAnnotationsForModuleOwnerOfClass(classId: ClassId): List<JavaAnnotation>? {
|
||||
val virtualFile = virtualFileFinder.findSourceOrBinaryVirtualFile(classId) ?: return null
|
||||
|
||||
return (findJavaModule(virtualFile) as? JavaModule.Explicit)?.moduleInfo?.annotations
|
||||
}
|
||||
|
||||
private val sourceModule: JavaModule? = userModules.firstOrNull(JavaModule::isSourceModule)
|
||||
|
||||
private fun findJavaModule(file: VirtualFile): JavaModule? {
|
||||
@@ -77,4 +91,8 @@ class CliJavaModuleResolver(
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val MODULE_ANNOTATIONS_CACHE_SIZE = 10000
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,11 @@ object KotlinCompilerClient {
|
||||
fun CompileService.leaseImpl(): CompileServiceSession? {
|
||||
// the newJVMOptions could be checked here for additional parameters, if needed
|
||||
registerClient(clientAliveFlagFile.absolutePath)
|
||||
reportingTargets.report(DaemonReportCategory.DEBUG, "connected to the daemon")
|
||||
val javaExecutablePath = compilerId.javaExecutable?.absolutePath ?: "'user jvm'"
|
||||
reportingTargets.report(
|
||||
DaemonReportCategory.DEBUG,
|
||||
"connected to the daemon. Daemon is using following 'java' executable to run itself: $javaExecutablePath"
|
||||
)
|
||||
|
||||
if (!leaseSession) return CompileServiceSession(this, CompileService.NO_SESSION)
|
||||
|
||||
@@ -367,8 +371,14 @@ object KotlinCompilerClient {
|
||||
}
|
||||
|
||||
|
||||
private fun startDaemon(compilerId: CompilerId, daemonJVMOptions: DaemonJVMOptions, daemonOptions: DaemonOptions, reportingTargets: DaemonReportingTargets): Boolean {
|
||||
val javaExecutable = File(File(CompilerSystemProperties.JAVA_HOME.safeValue, "bin"), "java")
|
||||
private fun startDaemon(
|
||||
compilerId: CompilerId,
|
||||
daemonJVMOptions: DaemonJVMOptions,
|
||||
daemonOptions: DaemonOptions,
|
||||
reportingTargets: DaemonReportingTargets
|
||||
): Boolean {
|
||||
val daemonJavaExecutable = compilerId.javaExecutable
|
||||
?: File(File(CompilerSystemProperties.JAVA_HOME.safeValue, "bin"), "java")
|
||||
val serverHostname = CompilerSystemProperties.JAVA_RMI_SERVER_HOSTNAME.value ?: error("${CompilerSystemProperties.JAVA_RMI_SERVER_HOSTNAME.property} is not set!")
|
||||
val platformSpecificOptions = listOf(
|
||||
// hide daemon window
|
||||
@@ -380,7 +390,7 @@ object KotlinCompilerClient {
|
||||
listOf("--illegal-access=permit")
|
||||
else emptyList()
|
||||
val args = listOf(
|
||||
javaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
|
||||
daemonJavaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
|
||||
platformSpecificOptions +
|
||||
daemonJVMOptions.mappers.flatMap { it.toArgs("-") } +
|
||||
javaIllegalAccessWorkaround +
|
||||
|
||||
@@ -49,7 +49,7 @@ suspend fun walkDaemonsAsync(
|
||||
useRMI: Boolean = true,
|
||||
useSockets: Boolean = true
|
||||
): List<DaemonWithMetadataAsync> { // TODO: replace with Deferred<List<DaemonWithMetadataAsync>> and use mapNotNullAsync to speed this up
|
||||
val classPathDigest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString()
|
||||
val classPathDigest = compilerId.digest()
|
||||
val portExtractor = makePortFromRunFilenameExtractor(classPathDigest)
|
||||
return registryDir.walk().toList() // list, since walk returns Sequence and Sequence.map{...} is not inline => coroutines dont work
|
||||
.map { Pair(it, portExtractor(it.name)) }
|
||||
|
||||
@@ -217,7 +217,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio
|
||||
runFileDir,
|
||||
makeRunFilenameString(
|
||||
timestamp = "%tFT%<tH-%<tM-%<tS.%<tLZ".format(Calendar.getInstance(TimeZone.getTimeZone("Z"))),
|
||||
digest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString(),
|
||||
digest = compilerId.digest(),
|
||||
port = port.toString()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -55,7 +55,7 @@ fun walkDaemons(registryDir: File,
|
||||
filter: (File, Int) -> Boolean = { _, _ -> true },
|
||||
report: (DaemonReportCategory, String) -> Unit = { _, _ -> }
|
||||
): Sequence<DaemonWithMetadata> {
|
||||
val classPathDigest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString()
|
||||
val classPathDigest = compilerId.digest()
|
||||
val portExtractor = makePortFromRunFilenameExtractor(classPathDigest)
|
||||
return registryDir.walk()
|
||||
.map { Pair(it, portExtractor(it.name)) }
|
||||
|
||||
@@ -231,12 +231,38 @@ fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".form
|
||||
|
||||
data class CompilerId(
|
||||
var compilerClasspath: List<String> = listOf(),
|
||||
var compilerVersion: String = ""
|
||||
var compilerVersion: String = "",
|
||||
var javaExecutable: File? = null
|
||||
) : OptionsGroup {
|
||||
|
||||
override val mappers: List<PropMapper<*, *, *>>
|
||||
get() = listOf(PropMapper(this, CompilerId::compilerClasspath, toString = { it.joinToString(File.pathSeparator) }, fromString = { it.trimQuotes().split(File.pathSeparator) }),
|
||||
StringPropMapper(this, CompilerId::compilerVersion))
|
||||
get() = listOf(
|
||||
PropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::compilerClasspath,
|
||||
toString = { it.joinToString(File.pathSeparator) },
|
||||
fromString = { it.trimQuotes().split(File.pathSeparator) }
|
||||
),
|
||||
StringPropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::compilerVersion
|
||||
),
|
||||
PropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::javaExecutable,
|
||||
toString = { it?.absolutePath },
|
||||
fromString = { File(it.trimQuotes()) },
|
||||
skipIf = { it == null }
|
||||
)
|
||||
)
|
||||
|
||||
fun digest(): String = compilerClasspath
|
||||
.map { File(it).absolutePath }
|
||||
.run {
|
||||
javaExecutable?.let { plus(it.absolutePath) } ?: this
|
||||
}
|
||||
.distinctStringsDigest()
|
||||
.toHexString()
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
@@ -245,6 +271,15 @@ data class CompilerId(
|
||||
@JvmStatic
|
||||
fun makeCompilerId(paths: Iterable<File>): CompilerId =
|
||||
CompilerId(compilerClasspath = paths.map { it.absolutePath })
|
||||
|
||||
@JvmStatic
|
||||
fun makeCompilerId(
|
||||
paths: Iterable<File>,
|
||||
javaExecutable: File
|
||||
): CompilerId = CompilerId(
|
||||
compilerClasspath = paths.map { it.absolutePath },
|
||||
javaExecutable = javaExecutable
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.daemon
|
||||
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.util.io.FileUtilRt
|
||||
import junit.framework.TestCase
|
||||
@@ -277,6 +278,129 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getJdk8Location() = System.getenv("JDK_18") ?: System.getenv("JAVA_HOME")
|
||||
|
||||
fun testNewDaemonIsNotStartedForSameJavaExecutable() {
|
||||
withFlagFile(getTestName(true), "-client1.alive") { flagFile1 ->
|
||||
withFlagFile(getTestName(true), "-client2.alive") { flagFile2 ->
|
||||
val daemonOptions = makeTestDaemonOptions(getTestName(true))
|
||||
val compilerIdJdk8 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(getJdk8Location()).resolve("bin/java")
|
||||
)
|
||||
|
||||
withLogFile("kotlin-daemon-test-1") { logFile ->
|
||||
val daemonJVMOptions = makeTestDaemonJvmOptions(logFile)
|
||||
assertTrue(logFile.length() == 0L)
|
||||
|
||||
val daemon1 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile1,
|
||||
daemonJVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemon1)
|
||||
logFile.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
|
||||
val daemon2 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile2,
|
||||
daemonJVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemon2)
|
||||
|
||||
val logContent = logFile.readText().lines()
|
||||
assert(
|
||||
logContent.filter { it.contains("INFO: starting daemon") }.size == 1
|
||||
) {
|
||||
"Second daemon instance was started!"
|
||||
}
|
||||
assert(
|
||||
logContent.filter {
|
||||
it.contains("INFO: Registered a client alive file: ${flagFile2.absolutePath}")
|
||||
}.size == 1
|
||||
) {
|
||||
"Second client was not connected to the same instance!"
|
||||
}
|
||||
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk8, daemonOptions)
|
||||
|
||||
Thread.sleep(100)
|
||||
|
||||
logFile.assertLogContainsSequence("Shutdown started")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ignored on Windows OS due to https://bugs.openjdk.java.net/browse/JDK-8189953 bug in JDK 9
|
||||
// Should be unignored once JDK10+ will be available by default on CI agents
|
||||
fun testNewDaemonIsStartedOnJavaExecutableChange() {
|
||||
if (SystemInfo.isWindows) return
|
||||
|
||||
withFlagFile(getTestName(true), "-client1.alive") { flagFile1 ->
|
||||
withFlagFile(getTestName(true), "-client2.alive") { flagFile2 ->
|
||||
val daemonOptions = makeTestDaemonOptions(getTestName(true))
|
||||
val compilerIdJdk8 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(getJdk8Location()).resolve("bin/java")
|
||||
)
|
||||
val compilerIdJdk9 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(System.getenv("JDK_9")).resolve("bin/java")
|
||||
)
|
||||
|
||||
withLogFile("kotlin-daemon-test-1") { logFile1 ->
|
||||
withLogFile("kotlin-daemon-test-2") { logFile2 ->
|
||||
val daemonJdk8JVMOptions = makeTestDaemonJvmOptions(logFile1)
|
||||
assertTrue(logFile1.length() == 0L)
|
||||
val daemonJdk9JVMOptions = makeTestDaemonJvmOptions(logFile2)
|
||||
assertTrue(logFile2.length() == 0L)
|
||||
|
||||
val daemonJdk7 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile1,
|
||||
daemonJdk8JVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemonJdk7)
|
||||
logFile1.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
val daemonJdk9 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk9,
|
||||
flagFile2,
|
||||
daemonJdk9JVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemonJdk9)
|
||||
logFile2.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk8, daemonOptions)
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk9, daemonOptions)
|
||||
|
||||
Thread.sleep(100)
|
||||
|
||||
logFile1.assertLogContainsSequence("Shutdown started")
|
||||
logFile2.assertLogContainsSequence("Shutdown started")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun testDaemonRunError() {
|
||||
withFlagFile(getTestName(true), ".alive") { flagFile ->
|
||||
val daemonOptions = DaemonOptions(shutdownDelayMilliseconds = 1, verbose = true, runFilesPath = File(testTempDir, getTestName(true)).absolutePath)
|
||||
|
||||
@@ -243,7 +243,7 @@ abstract class CompileServiceImplBase(
|
||||
runFileDir,
|
||||
makeRunFilenameString(
|
||||
timestamp = "%tFT%<tH-%<tM-%<tS.%<tLZ".format(Calendar.getInstance(TimeZone.getTimeZone("Z"))),
|
||||
digest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString(),
|
||||
digest = compilerId.digest(),
|
||||
port = port.toString()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -56,6 +56,11 @@ public class FirLoadCompiledKotlinGenerated extends AbstractFirLoadCompiledKotli
|
||||
runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("AnnotationInArray.kt")
|
||||
public void testAnnotationInArray() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassLiteralArguments.kt")
|
||||
public void testClassLiteralArguments() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.kt");
|
||||
|
||||
@@ -29,6 +29,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationUsedAsAnnotationArgument.kt")
|
||||
public void testAnnotationUsedAsAnnotationArgument() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asImports.kt")
|
||||
public void testAsImports() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/asImports.kt");
|
||||
@@ -174,6 +179,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/ft.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceDeclaration.kt")
|
||||
public void testFunInterfaceDeclaration() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/funInterfaceDeclaration.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("functionTypeAlias.kt")
|
||||
public void testFunctionTypeAlias() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/functionTypeAlias.kt");
|
||||
@@ -980,6 +990,24 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/contracts")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Contracts extends AbstractLazyBodyIsNotTouchedTilContractsPhaseTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInContracts() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/contracts"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("genericContract.kt")
|
||||
public void testGenericContract() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/delegates")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -2761,6 +2789,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("symbolsAndDescriptors.kt")
|
||||
public void testSymbolsAndDescriptors() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/symbolsAndDescriptors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("transform.kt")
|
||||
public void testTransform() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/transform.kt");
|
||||
@@ -2827,11 +2860,21 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/integerLiteralInLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("leakedImplicitType.kt")
|
||||
public void testLeakedImplicitType() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/leakedImplicitType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("referenceToExtension.kt")
|
||||
public void testReferenceToExtension() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/referenceToExtension.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("referenceToField.kt")
|
||||
public void testReferenceToField() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/referenceToField.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/simple.kt");
|
||||
@@ -2855,6 +2898,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/samConstructors"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceConstructorReference.kt")
|
||||
public void testFunInterfaceConstructorReference() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/samConstructors/funInterfaceConstructorReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericSam.kt")
|
||||
public void testGenericSam() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.kt");
|
||||
|
||||
20
compiler/fir/analysis-tests/testData/loadCompiledKotlin/annotations/AnnotationInArray.txt
vendored
Normal file
20
compiler/fir/analysis-tests/testData/loadCompiledKotlin/annotations/AnnotationInArray.txt
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public final val value: R|kotlin/Array<test/Bnno>|
|
||||
public get(): R|kotlin/Array<test/Bnno>|
|
||||
|
||||
public constructor(value: R|kotlin/Array<test/Bnno>|): R|test/Anno|
|
||||
|
||||
}
|
||||
|
||||
@R|test/Anno|(value = <implicitArrayOf>(@R|test/Bnno|(value = String(x)) , @R|test/Bnno|(value = String(y)) )) public final class AnnotationInArray : R|kotlin/Any| {
|
||||
public constructor(): R|test/AnnotationInArray|
|
||||
|
||||
}
|
||||
|
||||
public final annotation class Bnno : R|kotlin/Annotation| {
|
||||
public final val value: R|kotlin/String|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public constructor(value: R|kotlin/String|): R|test/Bnno|
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
public final annotation class A : R|kotlin/Annotation| {
|
||||
@R|kotlin/annotation/Target|(allowedTargets = <implicitArrayOf>(R|kotlin/annotation/AnnotationTarget.TYPE|())) public final annotation class A : R|kotlin/Annotation| {
|
||||
public constructor(): R|test/A|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
public open class MethodWithFunctionTypes : R|kotlin/Any| {
|
||||
public open fun foo(f: R|(kotlin/String?) -> kotlin/String|): R|kotlin/String.() -> kotlin/String?|
|
||||
public open fun foo(f: R|(kotlin/String?) -> kotlin/String|): R|(kotlin/String.() -> kotlin/String?)?|
|
||||
|
||||
public constructor(): R|test/MethodWithFunctionTypes|
|
||||
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
public final fun test1(): R|suspend () -> kotlin/Unit|
|
||||
|
||||
public final fun test1N(): R|(suspend () -> kotlin/Unit)?|
|
||||
|
||||
public final fun test2(): R|suspend kotlin/Int.() -> kotlin/Int|
|
||||
|
||||
public final fun test2N(): R|(suspend kotlin/Int.() -> kotlin/Int)?|
|
||||
|
||||
public final fun test3(): R|kotlin/collections/List<kotlin/coroutines/SuspendFunction0<kotlin/Unit>>|
|
||||
|
||||
public final fun test3N(): R|kotlin/collections/List<kotlin/coroutines/SuspendFunction0<kotlin/Unit>?>|
|
||||
|
||||
public final fun test4(): R|suspend () -> kotlin/coroutines/SuspendFunction0<kotlin/Unit>|
|
||||
|
||||
public final fun test4N(): R|(suspend () -> kotlin/coroutines/SuspendFunction0<kotlin/Unit>?)?|
|
||||
|
||||
|
||||
27
compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.fir.txt
vendored
Normal file
27
compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.fir.txt
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
FILE: annotationUsedAsAnnotationArgument.kt
|
||||
public final annotation class Ann : R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann2 : R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann2| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann3 : R|kotlin/Annotation| {
|
||||
public constructor(arg: R|kotlin/Int|, s: R|kotlin/String|): R|Ann3| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val arg: R|kotlin/Int| = R|<local>/arg|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public final val s: R|kotlin/String| = R|<local>/s|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
@R|Ann3|(@R|Ann3|(@R|Ann|() Int(5), String()) @R|Ann2|() Int(1), String()) public final val a: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
11
compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.kt
vendored
Normal file
11
compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.kt
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
annotation class Ann
|
||||
|
||||
annotation class Ann2
|
||||
|
||||
annotation class Ann3(val arg: Int, val s: String)
|
||||
|
||||
@Ann3(
|
||||
<!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann3(
|
||||
<!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann<!> 5, ""
|
||||
)<!> <!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann2<!> 1, ""
|
||||
) val a = 0
|
||||
@@ -15,5 +15,5 @@ class B : A() {
|
||||
}
|
||||
|
||||
fun test(b: B) {
|
||||
b.<!HIDDEN!>foo<!>("")
|
||||
b.<!INVISIBLE_REFERENCE!>foo<!>("")
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@ FILE: stringTemplates.kt
|
||||
public final fun foo(s: R|kotlin/String|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(a: R|A|): R|kotlin/Unit| {
|
||||
R|/foo|(<strcat>(R|<local>/a|.R|kotlin/Any.toString|()))
|
||||
R|/foo|(<strcat>(R|<local>/a|))
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ FILE: A.kt
|
||||
}
|
||||
FILE: main.kt
|
||||
public final fun test_1(): R|kotlin/Unit| {
|
||||
lval a: R|ERROR CLASS: Unresolved name: A| = <Unresolved name: A>#()
|
||||
lval a: <ERROR TYPE REF: Unresolved name: A> = <Unresolved name: A>#()
|
||||
lval b: R|foo/A| = R|foo/A.A|()
|
||||
lval c: R|foo/A| = <Unresolved name: A>#()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: safeCallOnTypeAlias.kt
|
||||
public final typealias MyTypeAlias = R|() -> kotlin/String?|
|
||||
public final typealias MyTypeAlias = R|(() -> kotlin/String?)?|
|
||||
public final fun foo(x: R|MyTypeAlias|): R|kotlin/Unit| {
|
||||
R|<local>/x|?.{ $subj$.R|kotlin/let|<R|() -> kotlin/String?|, R|kotlin/String?|>(<L> = let@fun <anonymous>(y: R|() -> kotlin/String?|): R|kotlin/String?| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
^ R|<local>/y|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/String?|>|()?.{ $subj$.R|kotlin/let|<R|kotlin/String|, R|kotlin/String|>(<L> = let@fun <anonymous>(result: R|kotlin/String|): R|kotlin/String| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
|
||||
@@ -18,7 +18,7 @@ FILE: cast.kt
|
||||
}
|
||||
|
||||
public get(): R|(kotlin/String) -> kotlin/Boolean|
|
||||
public final val hError: R|(ERROR CLASS: No type for parameter) -> kotlin/Boolean| = fun <anonymous>(_: R|ERROR CLASS: No type for parameter|): R|kotlin/Boolean| <inline=Unknown> {
|
||||
public final val hError: R|(ERROR CLASS: No type for parameter) -> kotlin/Boolean| = fun <anonymous>(_: <ERROR TYPE REF: No type for parameter>): R|kotlin/Boolean| <inline=Unknown> {
|
||||
^ Boolean(true)
|
||||
}
|
||||
|
||||
|
||||
@@ -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|
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,85 +19,78 @@ digraph initBlockAndInPlaceLambda_kt {
|
||||
|
||||
subgraph cluster_2 {
|
||||
color=red
|
||||
4 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
5 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
4 [label="Enter class C" style="filled" fillcolor=red];
|
||||
5 [label="Part of class initialization"];
|
||||
6 [label="Exit class C" style="filled" fillcolor=red];
|
||||
}
|
||||
4 -> {5};
|
||||
4 -> {5} [color=green];
|
||||
5 -> {6} [style=dotted];
|
||||
5 -> {10} [color=green];
|
||||
5 -> {10} [style=dashed];
|
||||
|
||||
subgraph cluster_3 {
|
||||
color=red
|
||||
6 [label="Enter class C" style="filled" fillcolor=red];
|
||||
7 [label="Part of class initialization"];
|
||||
8 [label="Exit class C" style="filled" fillcolor=red];
|
||||
7 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
8 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
9 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
6 -> {7} [color=green];
|
||||
7 -> {8} [style=dotted];
|
||||
7 -> {12} [color=green];
|
||||
7 -> {12} [style=dashed];
|
||||
7 -> {8};
|
||||
8 -> {9};
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
9 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
10 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
11 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
9 -> {10};
|
||||
10 -> {11};
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
12 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_6 {
|
||||
10 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
13 [label="Enter block"];
|
||||
14 [label="Access variable R|<local>/a|"];
|
||||
15 [label="Access variable R|/A.b|"];
|
||||
16 [label="Enter safe call"];
|
||||
17 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_7 {
|
||||
11 [label="Enter block"];
|
||||
12 [label="Access variable R|<local>/a|"];
|
||||
13 [label="Access variable R|/A.b|"];
|
||||
14 [label="Enter safe call"];
|
||||
15 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
25 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_8 {
|
||||
23 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
26 [label="Enter block"];
|
||||
27 [label="Access variable R|<local>/a|"];
|
||||
28 [label="Access variable R|<local>/it|"];
|
||||
29 [label="Function call: R|/C.C|(...)"];
|
||||
30 [label="Exit block"];
|
||||
24 [label="Enter block"];
|
||||
25 [label="Access variable R|<local>/a|"];
|
||||
26 [label="Access variable R|<local>/it|"];
|
||||
27 [label="Function call: R|/C.C|(...)"];
|
||||
28 [label="Exit block"];
|
||||
}
|
||||
31 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
29 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
18 [label="Call arguments union" style="filled" fillcolor=yellow];
|
||||
19 [label="Postponed exit from lambda"];
|
||||
20 [label="Function call: $subj$.R|kotlin/let|<R|B|, R|C|>(...)"];
|
||||
21 [label="Exit safe call"];
|
||||
22 [label="Variable declaration: lval c: R|C?|"];
|
||||
23 [label="Exit block"];
|
||||
16 [label="Call arguments union" style="filled" fillcolor=yellow];
|
||||
17 [label="Postponed exit from lambda"];
|
||||
18 [label="Function call: $subj$.R|kotlin/let|<R|B|, R|C|>(...)"];
|
||||
19 [label="Exit safe call"];
|
||||
20 [label="Variable declaration: lval c: R|C?|"];
|
||||
21 [label="Exit block"];
|
||||
}
|
||||
24 [label="Exit init block" style="filled" fillcolor=red];
|
||||
22 [label="Exit init block" style="filled" fillcolor=red];
|
||||
}
|
||||
10 -> {11};
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
13 -> {14};
|
||||
13 -> {14 19};
|
||||
14 -> {15};
|
||||
15 -> {16 21};
|
||||
16 -> {17};
|
||||
17 -> {25};
|
||||
17 -> {19} [color=red];
|
||||
17 -> {25} [style=dashed];
|
||||
18 -> {20} [color=red];
|
||||
19 -> {20} [color=green];
|
||||
15 -> {23};
|
||||
15 -> {17} [color=red];
|
||||
15 -> {23} [style=dashed];
|
||||
16 -> {18} [color=red];
|
||||
17 -> {18} [color=green];
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
22 -> {23};
|
||||
22 -> {6} [color=green];
|
||||
23 -> {24};
|
||||
24 -> {8} [color=green];
|
||||
24 -> {25};
|
||||
25 -> {26};
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {29};
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
31 -> {18} [color=red];
|
||||
31 -> {19} [color=green];
|
||||
29 -> {16} [color=red];
|
||||
29 -> {17} [color=green];
|
||||
|
||||
}
|
||||
|
||||
@@ -44,27 +44,20 @@ digraph innerClassInAnonymousObject_kt {
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
14 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
15 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
14 [label="Enter property" style="filled" fillcolor=red];
|
||||
15 [label="Exit anonymous object"];
|
||||
16 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
14 -> {15};
|
||||
|
||||
subgraph cluster_6 {
|
||||
color=red
|
||||
16 [label="Enter property" style="filled" fillcolor=red];
|
||||
17 [label="Exit anonymous object"];
|
||||
18 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
12 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
|
||||
13 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
|
||||
}
|
||||
16 -> {17};
|
||||
16 -> {0 5 8} [color=red];
|
||||
17 -> {18};
|
||||
17 -> {0 12} [color=green];
|
||||
17 -> {0 12} [style=dashed];
|
||||
14 -> {15};
|
||||
14 -> {0 5 8} [color=red];
|
||||
15 -> {16};
|
||||
15 -> {0 12} [color=green];
|
||||
15 -> {0 12} [style=dashed];
|
||||
12 -> {13} [color=green];
|
||||
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ digraph jumps_kt {
|
||||
}
|
||||
51 [label="Variable declaration: lval y: R|kotlin/Int?|"];
|
||||
52 [label="Access variable R|<local>/y|"];
|
||||
53 [label="Function call: R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
53 [label="Function call: R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
54 [label="Exit block"];
|
||||
}
|
||||
55 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
|
||||
@@ -22,7 +22,7 @@ FILE: jumps.kt
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
}
|
||||
public final fun test_3(x: R|kotlin/Int?|): R|kotlin/Unit| {
|
||||
while(Boolean(true)) {
|
||||
|
||||
@@ -5,26 +5,19 @@ digraph lambdaAsReturnOfLambda_kt {
|
||||
|
||||
subgraph cluster_0 {
|
||||
color=red
|
||||
14 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
15 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
14 -> {15};
|
||||
|
||||
subgraph cluster_1 {
|
||||
color=red
|
||||
16 [label="Enter property" style="filled" fillcolor=red];
|
||||
17 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_2 {
|
||||
14 [label="Enter property" style="filled" fillcolor=red];
|
||||
15 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_1 {
|
||||
color=blue
|
||||
0 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_3 {
|
||||
subgraph cluster_2 {
|
||||
color=blue
|
||||
1 [label="Enter block"];
|
||||
2 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_4 {
|
||||
subgraph cluster_3 {
|
||||
color=blue
|
||||
8 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
subgraph cluster_4 {
|
||||
color=blue
|
||||
9 [label="Enter block"];
|
||||
10 [label="Access variable R|<local>/foo|"];
|
||||
@@ -43,15 +36,15 @@ digraph lambdaAsReturnOfLambda_kt {
|
||||
}
|
||||
7 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
18 [label="Postponed exit from lambda"];
|
||||
19 [label="Function call: R|/run|<R|(kotlin/String) -> kotlin/Unit|>(...)"];
|
||||
20 [label="Exit property" style="filled" fillcolor=red];
|
||||
16 [label="Postponed exit from lambda"];
|
||||
17 [label="Function call: R|/run|<R|(kotlin/String) -> kotlin/Unit|>(...)"];
|
||||
18 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
14 -> {15};
|
||||
15 -> {16 0};
|
||||
15 -> {0} [style=dashed];
|
||||
16 -> {17};
|
||||
17 -> {18 0};
|
||||
17 -> {0} [style=dashed];
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
17 -> {18};
|
||||
0 -> {1};
|
||||
1 -> {2};
|
||||
2 -> {3 8};
|
||||
@@ -67,39 +60,39 @@ digraph lambdaAsReturnOfLambda_kt {
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
|
||||
subgraph cluster_6 {
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
21 [label="Enter function bar" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
19 [label="Enter function bar" style="filled" fillcolor=red];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
22 [label="Enter block"];
|
||||
23 [label="Exit block"];
|
||||
20 [label="Enter block"];
|
||||
21 [label="Exit block"];
|
||||
}
|
||||
24 [label="Exit function bar" style="filled" fillcolor=red];
|
||||
22 [label="Exit function bar" style="filled" fillcolor=red];
|
||||
}
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
|
||||
subgraph cluster_8 {
|
||||
subgraph cluster_7 {
|
||||
color=red
|
||||
25 [label="Enter function run" style="filled" fillcolor=red];
|
||||
subgraph cluster_9 {
|
||||
23 [label="Enter function run" style="filled" fillcolor=red];
|
||||
subgraph cluster_8 {
|
||||
color=blue
|
||||
26 [label="Enter block"];
|
||||
27 [label="Function call: R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()"];
|
||||
28 [label="Jump: ^run R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()"];
|
||||
29 [label="Stub" style="filled" fillcolor=gray];
|
||||
30 [label="Exit block" style="filled" fillcolor=gray];
|
||||
24 [label="Enter block"];
|
||||
25 [label="Function call: R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()"];
|
||||
26 [label="Jump: ^run R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()"];
|
||||
27 [label="Stub" style="filled" fillcolor=gray];
|
||||
28 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
31 [label="Exit function run" style="filled" fillcolor=red];
|
||||
29 [label="Exit function run" style="filled" fillcolor=red];
|
||||
}
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
25 -> {26};
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {31};
|
||||
26 -> {29};
|
||||
26 -> {27} [style=dotted];
|
||||
27 -> {28} [style=dotted];
|
||||
28 -> {29} [style=dotted];
|
||||
29 -> {30} [style=dotted];
|
||||
30 -> {31} [style=dotted];
|
||||
|
||||
}
|
||||
|
||||
@@ -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|)
|
||||
|
||||
@@ -27,8 +27,8 @@ digraph postponedLambdaInConstructor_kt {
|
||||
}
|
||||
5 -> {6} [color=green];
|
||||
6 -> {7} [style=dotted];
|
||||
6 -> {29} [color=green];
|
||||
6 -> {29} [style=dashed];
|
||||
6 -> {27} [color=green];
|
||||
6 -> {27} [style=dashed];
|
||||
|
||||
subgraph cluster_3 {
|
||||
color=red
|
||||
@@ -88,35 +88,28 @@ digraph postponedLambdaInConstructor_kt {
|
||||
|
||||
subgraph cluster_8 {
|
||||
color=red
|
||||
27 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
28 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
27 [label="Enter property" style="filled" fillcolor=red];
|
||||
28 [label="Access variable R|<local>/s|"];
|
||||
29 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
27 -> {28};
|
||||
28 -> {29};
|
||||
29 -> {7} [color=green];
|
||||
|
||||
subgraph cluster_9 {
|
||||
color=red
|
||||
29 [label="Enter property" style="filled" fillcolor=red];
|
||||
30 [label="Access variable R|<local>/s|"];
|
||||
31 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
31 -> {7} [color=green];
|
||||
|
||||
subgraph cluster_10 {
|
||||
color=red
|
||||
32 [label="Enter function foo" style="filled" fillcolor=red];
|
||||
subgraph cluster_11 {
|
||||
30 [label="Enter function foo" style="filled" fillcolor=red];
|
||||
subgraph cluster_10 {
|
||||
color=blue
|
||||
33 [label="Enter block"];
|
||||
34 [label="Function call: this@R|/B|.R|/B.foo|()"];
|
||||
35 [label="Exit block"];
|
||||
31 [label="Enter block"];
|
||||
32 [label="Function call: this@R|/B|.R|/B.foo|()"];
|
||||
33 [label="Exit block"];
|
||||
}
|
||||
36 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
34 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
}
|
||||
30 -> {31};
|
||||
31 -> {32};
|
||||
32 -> {33};
|
||||
33 -> {34};
|
||||
34 -> {35};
|
||||
35 -> {36};
|
||||
|
||||
}
|
||||
|
||||
@@ -21,312 +21,298 @@ digraph propertiesAndInitBlocks_kt {
|
||||
|
||||
subgraph cluster_2 {
|
||||
color=red
|
||||
5 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
6 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
5 [label="Enter property" style="filled" fillcolor=red];
|
||||
6 [label="Const: Int(1)"];
|
||||
7 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
5 -> {6};
|
||||
6 -> {7};
|
||||
|
||||
subgraph cluster_3 {
|
||||
color=red
|
||||
7 [label="Enter property" style="filled" fillcolor=red];
|
||||
8 [label="Const: Int(1)"];
|
||||
9 [label="Exit property" style="filled" fillcolor=red];
|
||||
8 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_4 {
|
||||
color=blue
|
||||
9 [label="Enter block"];
|
||||
10 [label="Const: Int(1)"];
|
||||
11 [label="Jump: ^ Int(1)"];
|
||||
12 [label="Stub" style="filled" fillcolor=gray];
|
||||
13 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
14 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
7 -> {8};
|
||||
8 -> {9};
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
10 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
11 [label="Enter block"];
|
||||
12 [label="Const: Int(1)"];
|
||||
13 [label="Jump: ^ Int(1)"];
|
||||
14 [label="Stub" style="filled" fillcolor=gray];
|
||||
15 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
16 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
9 -> {10};
|
||||
10 -> {11};
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
13 -> {16};
|
||||
11 -> {14};
|
||||
11 -> {12} [style=dotted];
|
||||
12 -> {13} [style=dotted];
|
||||
13 -> {14} [style=dotted];
|
||||
14 -> {15} [style=dotted];
|
||||
15 -> {16} [style=dotted];
|
||||
|
||||
subgraph cluster_6 {
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
17 [label="Enter function setter" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
15 [label="Enter function setter" style="filled" fillcolor=red];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
18 [label="Enter block"];
|
||||
19 [label="Const: Int(1)"];
|
||||
20 [label="Assignment: F|/x2|"];
|
||||
21 [label="Exit block"];
|
||||
16 [label="Enter block"];
|
||||
17 [label="Const: Int(1)"];
|
||||
18 [label="Assignment: F|/x2|"];
|
||||
19 [label="Exit block"];
|
||||
}
|
||||
22 [label="Exit function setter" style="filled" fillcolor=red];
|
||||
20 [label="Exit function setter" style="filled" fillcolor=red];
|
||||
}
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {18};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
|
||||
subgraph cluster_7 {
|
||||
color=red
|
||||
21 [label="Enter property" style="filled" fillcolor=red];
|
||||
22 [label="Const: Int(1)"];
|
||||
23 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
21 -> {22};
|
||||
22 -> {23};
|
||||
|
||||
subgraph cluster_8 {
|
||||
color=red
|
||||
23 [label="Enter property" style="filled" fillcolor=red];
|
||||
24 [label="Const: Int(1)"];
|
||||
25 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
|
||||
subgraph cluster_9 {
|
||||
color=red
|
||||
37 [label="Enter function foo" style="filled" fillcolor=red];
|
||||
subgraph cluster_10 {
|
||||
35 [label="Enter function foo" style="filled" fillcolor=red];
|
||||
subgraph cluster_9 {
|
||||
color=blue
|
||||
38 [label="Enter block"];
|
||||
39 [label="Const: Int(1)"];
|
||||
40 [label="Const: Int(1)"];
|
||||
41 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"];
|
||||
42 [label="Variable declaration: lval c: R|kotlin/Int|"];
|
||||
43 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
44 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
45 [label="Stub" style="filled" fillcolor=gray];
|
||||
46 [label="Exit block" style="filled" fillcolor=gray];
|
||||
36 [label="Enter block"];
|
||||
37 [label="Const: Int(1)"];
|
||||
38 [label="Const: Int(1)"];
|
||||
39 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"];
|
||||
40 [label="Variable declaration: lval c: R|kotlin/Int|"];
|
||||
41 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
42 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
43 [label="Stub" style="filled" fillcolor=gray];
|
||||
44 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
47 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
45 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
}
|
||||
35 -> {36};
|
||||
36 -> {37};
|
||||
37 -> {38};
|
||||
38 -> {39};
|
||||
39 -> {40};
|
||||
40 -> {41};
|
||||
41 -> {42};
|
||||
42 -> {43};
|
||||
43 -> {44};
|
||||
44 -> {47} [label=onUncaughtException];
|
||||
42 -> {45} [label=onUncaughtException];
|
||||
42 -> {43} [style=dotted];
|
||||
43 -> {44} [style=dotted];
|
||||
44 -> {45} [style=dotted];
|
||||
45 -> {46} [style=dotted];
|
||||
46 -> {47} [style=dotted];
|
||||
|
||||
subgraph cluster_10 {
|
||||
color=red
|
||||
46 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
47 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
48 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
46 -> {47};
|
||||
47 -> {48};
|
||||
|
||||
subgraph cluster_11 {
|
||||
color=red
|
||||
48 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
49 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
50 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
48 -> {49};
|
||||
49 -> {50};
|
||||
|
||||
subgraph cluster_12 {
|
||||
color=red
|
||||
51 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_13 {
|
||||
49 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_12 {
|
||||
color=blue
|
||||
52 [label="Enter block"];
|
||||
53 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
54 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
55 [label="Stub" style="filled" fillcolor=gray];
|
||||
56 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
57 [label="Exit block" style="filled" fillcolor=gray];
|
||||
50 [label="Enter block"];
|
||||
51 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
52 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
53 [label="Stub" style="filled" fillcolor=gray];
|
||||
54 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
55 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
58 [label="Exit init block" style="filled" fillcolor=red];
|
||||
56 [label="Exit init block" style="filled" fillcolor=red];
|
||||
}
|
||||
49 -> {50};
|
||||
50 -> {51};
|
||||
51 -> {52};
|
||||
52 -> {53};
|
||||
53 -> {54};
|
||||
54 -> {58} [label=onUncaughtException];
|
||||
52 -> {56} [label=onUncaughtException];
|
||||
52 -> {53} [style=dotted];
|
||||
53 -> {54} [style=dotted];
|
||||
54 -> {55} [style=dotted];
|
||||
55 -> {56} [style=dotted];
|
||||
56 -> {57} [style=dotted];
|
||||
57 -> {58} [style=dotted];
|
||||
58 -> {36} [color=green];
|
||||
56 -> {34} [color=green];
|
||||
|
||||
subgraph cluster_14 {
|
||||
subgraph cluster_13 {
|
||||
color=red
|
||||
59 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_15 {
|
||||
57 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_14 {
|
||||
color=blue
|
||||
60 [label="Enter block"];
|
||||
61 [label="Exit local class <getter>"];
|
||||
62 [label="Exit block"];
|
||||
58 [label="Enter block"];
|
||||
59 [label="Exit local class <getter>"];
|
||||
60 [label="Exit block"];
|
||||
}
|
||||
63 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
61 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
subgraph cluster_16 {
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
64 [label="Enter class GetterLocalClass" style="filled" fillcolor=red];
|
||||
65 [label="Part of class initialization"];
|
||||
66 [label="Exit class GetterLocalClass" style="filled" fillcolor=red];
|
||||
62 [label="Enter class GetterLocalClass" style="filled" fillcolor=red];
|
||||
63 [label="Part of class initialization"];
|
||||
64 [label="Exit class GetterLocalClass" style="filled" fillcolor=red];
|
||||
}
|
||||
57 -> {58};
|
||||
58 -> {59};
|
||||
58 -> {65 68} [color=red];
|
||||
59 -> {60};
|
||||
59 -> {65 62} [color=green];
|
||||
59 -> {65 62} [style=dashed];
|
||||
60 -> {61};
|
||||
60 -> {67 70} [color=red];
|
||||
61 -> {62};
|
||||
61 -> {67 64} [color=green];
|
||||
61 -> {67 64} [style=dashed];
|
||||
62 -> {63};
|
||||
64 -> {65} [color=green];
|
||||
65 -> {66} [style=dotted];
|
||||
65 -> {70} [color=green];
|
||||
65 -> {70} [style=dashed];
|
||||
62 -> {63} [color=green];
|
||||
63 -> {64} [style=dotted];
|
||||
63 -> {68} [color=green];
|
||||
63 -> {68} [style=dashed];
|
||||
|
||||
subgraph cluster_16 {
|
||||
color=red
|
||||
65 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
66 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
67 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
65 -> {66};
|
||||
66 -> {67};
|
||||
|
||||
subgraph cluster_17 {
|
||||
color=red
|
||||
67 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
68 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
69 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
|
||||
subgraph cluster_18 {
|
||||
color=red
|
||||
70 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_19 {
|
||||
68 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
71 [label="Enter block"];
|
||||
72 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
73 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
74 [label="Stub" style="filled" fillcolor=gray];
|
||||
75 [label="Exit block" style="filled" fillcolor=gray];
|
||||
69 [label="Enter block"];
|
||||
70 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
71 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
72 [label="Stub" style="filled" fillcolor=gray];
|
||||
73 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
76 [label="Exit init block" style="filled" fillcolor=red];
|
||||
74 [label="Exit init block" style="filled" fillcolor=red];
|
||||
}
|
||||
68 -> {69};
|
||||
69 -> {70};
|
||||
70 -> {71};
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {76} [label=onUncaughtException];
|
||||
71 -> {74} [label=onUncaughtException];
|
||||
71 -> {72} [style=dotted];
|
||||
72 -> {73} [style=dotted];
|
||||
73 -> {74} [style=dotted];
|
||||
74 -> {75} [style=dotted];
|
||||
75 -> {76} [style=dotted];
|
||||
76 -> {66} [color=green];
|
||||
74 -> {64} [color=green];
|
||||
|
||||
subgraph cluster_20 {
|
||||
subgraph cluster_19 {
|
||||
color=red
|
||||
77 [label="Enter property" style="filled" fillcolor=red];
|
||||
78 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_21 {
|
||||
75 [label="Enter property" style="filled" fillcolor=red];
|
||||
76 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
26 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
24 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
25 [label="Enter block"];
|
||||
26 [label="Exit local class <anonymous>"];
|
||||
27 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
28 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
29 [label="Stub" style="filled" fillcolor=gray];
|
||||
30 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
27 [label="Enter block"];
|
||||
28 [label="Exit local class <anonymous>"];
|
||||
29 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
30 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
31 [label="Stub" style="filled" fillcolor=gray];
|
||||
32 [label="Exit block" style="filled" fillcolor=gray];
|
||||
32 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red];
|
||||
33 [label="Part of class initialization"];
|
||||
34 [label="Exit class InitializerLocalClass" style="filled" fillcolor=red];
|
||||
}
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
34 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red];
|
||||
35 [label="Part of class initialization"];
|
||||
36 [label="Exit class InitializerLocalClass" style="filled" fillcolor=red];
|
||||
}
|
||||
33 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
31 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
79 [label="Postponed exit from lambda"];
|
||||
80 [label="Function call: R|/run|(...)"];
|
||||
81 [label="Exit property" style="filled" fillcolor=red];
|
||||
77 [label="Postponed exit from lambda"];
|
||||
78 [label="Function call: R|/run|(...)"];
|
||||
79 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
75 -> {76};
|
||||
76 -> {24};
|
||||
76 -> {77} [color=red];
|
||||
76 -> {24} [style=dashed];
|
||||
77 -> {78};
|
||||
78 -> {26};
|
||||
78 -> {79} [color=red];
|
||||
78 -> {26} [style=dashed];
|
||||
79 -> {80};
|
||||
80 -> {81};
|
||||
26 -> {33 27};
|
||||
78 -> {79};
|
||||
24 -> {31 25};
|
||||
25 -> {26};
|
||||
25 -> {35 46 49} [color=red];
|
||||
26 -> {27};
|
||||
26 -> {46 32} [color=green];
|
||||
26 -> {46 32} [style=dashed];
|
||||
27 -> {28};
|
||||
27 -> {37 48 51} [color=red];
|
||||
28 -> {29};
|
||||
28 -> {48 34} [color=green];
|
||||
28 -> {48 34} [style=dashed];
|
||||
29 -> {30};
|
||||
30 -> {81} [label=onUncaughtException];
|
||||
28 -> {79} [label=onUncaughtException];
|
||||
28 -> {29} [style=dotted];
|
||||
29 -> {30} [style=dotted];
|
||||
30 -> {31} [style=dotted];
|
||||
31 -> {32} [style=dotted];
|
||||
32 -> {33} [style=dotted];
|
||||
33 -> {79} [color=green];
|
||||
33 -> {26} [color=green style=dashed];
|
||||
34 -> {35} [color=green];
|
||||
35 -> {36} [style=dotted];
|
||||
35 -> {51} [color=green];
|
||||
35 -> {51} [style=dashed];
|
||||
31 -> {77} [color=green];
|
||||
31 -> {24} [color=green style=dashed];
|
||||
32 -> {33} [color=green];
|
||||
33 -> {34} [style=dotted];
|
||||
33 -> {49} [color=green];
|
||||
33 -> {49} [style=dashed];
|
||||
|
||||
subgraph cluster_24 {
|
||||
subgraph cluster_23 {
|
||||
color=red
|
||||
82 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
83 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
82 -> {83};
|
||||
|
||||
subgraph cluster_25 {
|
||||
color=red
|
||||
84 [label="Enter property" style="filled" fillcolor=red];
|
||||
subgraph cluster_26 {
|
||||
80 [label="Enter property" style="filled" fillcolor=red];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
85 [label="Try expression enter"];
|
||||
81 [label="Try expression enter"];
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
82 [label="Try main block enter"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
83 [label="Enter block"];
|
||||
84 [label="Const: Int(1)"];
|
||||
85 [label="Exit block"];
|
||||
}
|
||||
86 [label="Try main block exit"];
|
||||
}
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
86 [label="Try main block enter"];
|
||||
87 [label="Catch enter"];
|
||||
subgraph cluster_28 {
|
||||
color=blue
|
||||
87 [label="Enter block"];
|
||||
88 [label="Const: Int(1)"];
|
||||
89 [label="Exit block"];
|
||||
88 [label="Enter block"];
|
||||
89 [label="Const: Int(2)"];
|
||||
90 [label="Exit block"];
|
||||
}
|
||||
90 [label="Try main block exit"];
|
||||
91 [label="Catch exit"];
|
||||
}
|
||||
subgraph cluster_29 {
|
||||
color=blue
|
||||
91 [label="Catch enter"];
|
||||
92 [label="Enter finally"];
|
||||
subgraph cluster_30 {
|
||||
color=blue
|
||||
92 [label="Enter block"];
|
||||
93 [label="Const: Int(2)"];
|
||||
94 [label="Exit block"];
|
||||
93 [label="Enter block"];
|
||||
94 [label="Const: Int(0)"];
|
||||
95 [label="Exit block"];
|
||||
}
|
||||
95 [label="Catch exit"];
|
||||
96 [label="Exit finally"];
|
||||
}
|
||||
subgraph cluster_31 {
|
||||
color=blue
|
||||
96 [label="Enter finally"];
|
||||
subgraph cluster_32 {
|
||||
color=blue
|
||||
97 [label="Enter block"];
|
||||
98 [label="Const: Int(0)"];
|
||||
99 [label="Exit block"];
|
||||
}
|
||||
100 [label="Exit finally"];
|
||||
}
|
||||
101 [label="Try expression exit"];
|
||||
97 [label="Try expression exit"];
|
||||
}
|
||||
102 [label="Exit property" style="filled" fillcolor=red];
|
||||
98 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
80 -> {81};
|
||||
81 -> {82 87};
|
||||
81 -> {92} [label=onUncaughtException];
|
||||
82 -> {83};
|
||||
83 -> {84};
|
||||
84 -> {85};
|
||||
85 -> {86 91};
|
||||
85 -> {96} [label=onUncaughtException];
|
||||
86 -> {87};
|
||||
85 -> {86};
|
||||
86 -> {92 87};
|
||||
87 -> {88};
|
||||
87 -> {92} [label=onUncaughtException];
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {96 91};
|
||||
90 -> {91};
|
||||
91 -> {92};
|
||||
91 -> {96} [label=onUncaughtException];
|
||||
92 -> {93};
|
||||
93 -> {94};
|
||||
94 -> {95};
|
||||
95 -> {96};
|
||||
96 -> {97};
|
||||
96 -> {98} [label=onUncaughtException];
|
||||
97 -> {98};
|
||||
98 -> {99};
|
||||
99 -> {100};
|
||||
100 -> {101};
|
||||
100 -> {102} [label=onUncaughtException];
|
||||
101 -> {102};
|
||||
|
||||
}
|
||||
|
||||
@@ -33,72 +33,58 @@ digraph safeCalls_kt {
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
8 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
9 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
8 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
9 [label="Enter block"];
|
||||
10 [label="Access variable R|<local>/x|"];
|
||||
11 [label="Enter safe call"];
|
||||
12 [label="Function call: $subj$.R|/A.foo|()"];
|
||||
13 [label="Exit safe call"];
|
||||
14 [label="Enter safe call"];
|
||||
15 [label="Function call: $subj$.R|/A.bar|()"];
|
||||
16 [label="Exit safe call"];
|
||||
17 [label="Exit block"];
|
||||
}
|
||||
18 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||
}
|
||||
8 -> {9};
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
10 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
11 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
10 -> {11};
|
||||
9 -> {10};
|
||||
10 -> {11 13};
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
13 -> {14 16};
|
||||
14 -> {15};
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {18};
|
||||
|
||||
subgraph cluster_6 {
|
||||
color=red
|
||||
12 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||
19 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
13 [label="Enter block"];
|
||||
14 [label="Access variable R|<local>/x|"];
|
||||
15 [label="Enter safe call"];
|
||||
16 [label="Function call: $subj$.R|/A.foo|()"];
|
||||
17 [label="Exit safe call"];
|
||||
18 [label="Enter safe call"];
|
||||
19 [label="Function call: $subj$.R|/A.bar|()"];
|
||||
20 [label="Exit safe call"];
|
||||
21 [label="Exit block"];
|
||||
20 [label="Enter block"];
|
||||
21 [label="Access variable R|<local>/x|"];
|
||||
22 [label="Enter safe call"];
|
||||
23 [label="Access variable R|/B.foo|"];
|
||||
24 [label="Exit safe call"];
|
||||
25 [label="Enter safe call"];
|
||||
26 [label="Access variable R|/B.bar|"];
|
||||
27 [label="Exit safe call"];
|
||||
28 [label="Exit block"];
|
||||
}
|
||||
22 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||
29 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
}
|
||||
12 -> {13};
|
||||
13 -> {14};
|
||||
14 -> {15 17};
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {18 20};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
|
||||
subgraph cluster_8 {
|
||||
color=red
|
||||
23 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||
subgraph cluster_9 {
|
||||
color=blue
|
||||
24 [label="Enter block"];
|
||||
25 [label="Access variable R|<local>/x|"];
|
||||
26 [label="Enter safe call"];
|
||||
27 [label="Access variable R|/B.foo|"];
|
||||
28 [label="Exit safe call"];
|
||||
29 [label="Enter safe call"];
|
||||
30 [label="Access variable R|/B.bar|"];
|
||||
31 [label="Exit safe call"];
|
||||
32 [label="Exit block"];
|
||||
}
|
||||
33 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
}
|
||||
21 -> {22 24};
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
25 -> {26 28};
|
||||
24 -> {25 27};
|
||||
25 -> {26};
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {29 31};
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
31 -> {32};
|
||||
32 -> {33};
|
||||
28 -> {29};
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ FILE: const.kt
|
||||
public get(): R|kotlin/String|
|
||||
public final const val f: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(2)).R|kotlin/Int.times|(Int(3)).R|kotlin/Int.div|(Int(4)).R|kotlin/Int.rem|(Int(5)).R|kotlin/Int.minus|(Int(1))
|
||||
public get(): R|kotlin/Int|
|
||||
public final const val g: R|kotlin/String| = <strcat>(String(string ), R|/f|.R|kotlin/Any.toString|())
|
||||
public final const val g: R|kotlin/String| = <strcat>(String(string ), R|/f|)
|
||||
public get(): R|kotlin/String|
|
||||
public final const val h: R|kotlin/String| = String(string).R|kotlin/String.plus|(R|/g|)
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
35
compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.fir.txt
vendored
Normal file
35
compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.fir.txt
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
FILE: genericContract.kt
|
||||
public final inline fun <reified T> requreIsInstance(value: R|kotlin/Any|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> value is T
|
||||
>
|
||||
{
|
||||
when () {
|
||||
(R|<local>/value| !is R|T|) -> {
|
||||
throw R|java/lang/IllegalArgumentException.IllegalArgumentException|()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_1(s: R|kotlin/Any|): R|kotlin/Unit| {
|
||||
R|/requreIsInstance|<R|kotlin/String|>(R|<local>/s|)
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
public final inline fun <reified T> requreIsInstanceOf(value: R|kotlin/Any|, requiredValue: R|T|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> value is T
|
||||
>
|
||||
{
|
||||
when () {
|
||||
(R|<local>/value| !is R|T|) -> {
|
||||
throw R|java/lang/IllegalArgumentException.IllegalArgumentException|()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_2(x: R|kotlin/Any|, s: R|kotlin/String|): R|kotlin/Unit| {
|
||||
R|/requreIsInstanceOf|<R|kotlin/String|>(R|<local>/x|, R|<local>/s|)
|
||||
R|<local>/x|.R|kotlin/String.length|
|
||||
}
|
||||
25
compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.kt
vendored
Normal file
25
compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.kt
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
inline fun <reified T> requreIsInstance(value: Any) contract [
|
||||
returns() implies (value is T)
|
||||
] {
|
||||
if (value !is T) throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
fun test_1(s: Any) {
|
||||
requreIsInstance<String>(s)
|
||||
s.length
|
||||
}
|
||||
|
||||
inline fun <reified T> requreIsInstanceOf(value: Any, requiredValue: T) contract [
|
||||
returns() implies (value is T)
|
||||
] {
|
||||
if (value !is T) throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
fun test_2(x: Any, s: String) {
|
||||
requreIsInstanceOf(x, s)
|
||||
x.length
|
||||
}
|
||||
@@ -18,7 +18,7 @@ FILE: kt41982.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final fun <Type : R|Base|, Base : R|DelegateProvider<Base>|> R|Type|.long(initializer: R|() -> kotlin/Long?| = Null(null)): R|Delegate<Type, kotlin/Long>| {
|
||||
public final fun <Type : R|Base|, Base : R|DelegateProvider<Base>|> R|Type|.long(initializer: R|(() -> kotlin/Long?)?| = Null(null)): R|Delegate<Type, kotlin/Long>| {
|
||||
^long Null(null)!!
|
||||
}
|
||||
public final class Test : R|DelegateProvider<kotlin/Any>| {
|
||||
|
||||
@@ -50,5 +50,5 @@ FILE: annotationArgumentMustBeConst.kt
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
@R|Ann1|(vararg(R|/foo|, R|/foo|.R|kotlin/String.plus|(R|/bar|), <strcat>(R|/foo|.R|kotlin/Any.toString|(), String( ), R|/bar|.R|kotlin/Any.toString|()), <strcat>(R|/baz|().R|kotlin/Any.toString|(), String( )))) @R|Ann2|(<implicitArrayOf>(R|/bar|, R|/baz|(), R|/bar|.R|kotlin/Int.plus|(R|/cnst|))) @R|Ann3|(R|/arr|) public final fun test(): R|kotlin/Unit| {
|
||||
@R|Ann1|(vararg(R|/foo|, R|/foo|.R|kotlin/String.plus|(R|/bar|), <strcat>(R|/foo|, String( ), R|/bar|), <strcat>(R|/baz|(), String( )))) @R|Ann2|(<implicitArrayOf>(R|/bar|, R|/baz|(), R|/bar|.R|kotlin/Int.plus|(R|/cnst|))) @R|Ann3|(R|/arr|) public final fun test(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ FILE: instanceAccessBeforeSuperCall.kt
|
||||
}
|
||||
|
||||
public constructor(x: R|kotlin/Int|): R|C| {
|
||||
this<R|C|>(fun <anonymous>(): R|ERROR CLASS: Cannot access ''<this>'' before superclass constructor has been called| <inline=Unknown> {
|
||||
this<R|C|>(fun <anonymous>(): <ERROR TYPE REF: Cannot access ''<this>'' before superclass constructor has been called> <inline=Unknown> {
|
||||
lval a: R|kotlin/Int| = Int(10)
|
||||
^ this@R|/C|
|
||||
}
|
||||
@@ -63,8 +63,8 @@ FILE: instanceAccessBeforeSuperCall.kt
|
||||
}
|
||||
public final fun test(f: R|F|): R|kotlin/Unit| {
|
||||
}
|
||||
public final val a: R|ERROR CLASS: 'this' is not defined in this context| = this#
|
||||
public get(): R|ERROR CLASS: 'this' is not defined in this context|
|
||||
public final val a: <ERROR TYPE REF: 'this' is not defined in this context> = this#
|
||||
public get(): <ERROR TYPE REF: 'this' is not defined in this context>
|
||||
public final class F : R|kotlin/Any| {
|
||||
public constructor(a: R|kotlin/Int|, b: R|kotlin/Int|, closure: R|() -> kotlin/Unit|, instance: R|F?|): R|F| {
|
||||
super<R|kotlin/Any|>()
|
||||
|
||||
@@ -2,7 +2,7 @@ fun foo() {
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation class Ann<!>
|
||||
|
||||
@Ann class Local {
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR{LT}!>// There should also be NESTED_CLASS_NOT_ALLOWED report here.
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR{PSI}!>annotation <!NESTED_CLASS_NOT_ALLOWED!>class Nested<!><!><!>
|
||||
// There should also be NESTED_CLASS_NOT_ALLOWED report here.
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation <!NESTED_CLASS_NOT_ALLOWED!>class Nested<!><!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ interface B {
|
||||
}
|
||||
|
||||
interface G<X> {
|
||||
val <X> boo: Double where X : A, X : B
|
||||
val <A> bal: Double where A : B
|
||||
val <Y> bas: Double where Y : B, <!NAME_IN_CONSTRAINT_IS_NOT_A_TYPE_PARAMETER!>X<!> : B
|
||||
val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>X<!>> boo: Double where X : A, X : B
|
||||
val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>A<!>> bal: Double where A : B
|
||||
val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>Y<!>> bas: Double where Y : B, <!NAME_IN_CONSTRAINT_IS_NOT_A_TYPE_PARAMETER!>X<!> : B
|
||||
}
|
||||
|
||||
class C() : A(), B
|
||||
@@ -66,4 +66,4 @@ val t1 = test2<A>(<!ARGUMENT_TYPE_MISMATCH!>A()<!>)
|
||||
val t2 = test2<B>(<!ARGUMENT_TYPE_MISMATCH!>C()<!>)
|
||||
val t3 = test2<C>(C())
|
||||
|
||||
val <T, B : T> x : Int = 0
|
||||
val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>T<!>, <!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>B : T<!>> x : Int = 0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
sealed class A
|
||||
|
||||
val b = <!HIDDEN!>A<!>()
|
||||
val b = <!INVISIBLE_REFERENCE!>A<!>()
|
||||
|
||||
@@ -13,7 +13,7 @@ FILE: superIsNotAnExpression.kt
|
||||
public final fun act(): R|kotlin/Unit| {
|
||||
<Super cannot be a callee>#()
|
||||
<Unresolved name: invoke>#()
|
||||
<Super cannot be a callee>#(<L> = <Super cannot be a callee>@fun <anonymous>(): R|ERROR CLASS: Unresolved name: println| <inline=Unknown> {
|
||||
<Super cannot be a callee>#(<L> = <Super cannot be a callee>@fun <anonymous>(): <ERROR TYPE REF: Unresolved name: println> <inline=Unknown> {
|
||||
^ <Unresolved name: println>#(ERROR_EXPR(Incorrect character: 'weird'))
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: KotlinImporterComponent.kt
|
||||
@R|State|(name = String(AutoImportedSourceRoots)) public final class KotlinImporterComponent : R|kotlin/Any| {
|
||||
@R|simulation/State|(name = String(AutoImportedSourceRoots)) public final class KotlinImporterComponent : R|kotlin/Any| {
|
||||
public constructor(): R|simulation/KotlinImporterComponent| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FILE: State.java
|
||||
// FILE: simulation/State.java
|
||||
|
||||
package simulation
|
||||
package simulation;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface State {
|
||||
|
||||
@@ -22,10 +22,10 @@ FILE: typeArgumentsNotAllowed.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final val a: R|ERROR CLASS: Unresolved name: MyClass| = Q|rest|.<Unresolved name: MyClass>#
|
||||
public get(): R|ERROR CLASS: Unresolved name: MyClass|
|
||||
public final val b: R|ERROR CLASS: Unresolved name: MyClass| = Q|rest/Best|.<Unresolved name: MyClass>#
|
||||
public get(): R|ERROR CLASS: Unresolved name: MyClass|
|
||||
public final val a: <ERROR TYPE REF: Unresolved name: MyClass> = Q|rest|.<Unresolved name: MyClass>#
|
||||
public get(): <ERROR TYPE REF: Unresolved name: MyClass>
|
||||
public final val b: <ERROR TYPE REF: Unresolved name: MyClass> = Q|rest/Best|.<Unresolved name: MyClass>#
|
||||
public get(): <ERROR TYPE REF: Unresolved name: MyClass>
|
||||
public final class B<E> : R|kotlin/Any| {
|
||||
public constructor<E>(): R|rest/B<E>| {
|
||||
super<R|kotlin/Any|>()
|
||||
|
||||
@@ -21,7 +21,7 @@ val a = <!TYPE_ARGUMENTS_NOT_ALLOWED!>rest<Int><!>.<!UNRESOLVED_REFERENCE!>MyCla
|
||||
val b = Best.<!UNRESOLVED_REFERENCE!>MyClass<!><String>
|
||||
|
||||
class B<E>
|
||||
class C<F<!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>Boolean<!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>><!> <!SYNTAX{PSI}!>:<!> <!SYNTAX{PSI}!>B<!><!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>F<!><!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>Boolean<!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>(<!><!SYNTAX{PSI}!>)<!>
|
||||
class C<F<!SYNTAX!><<!><!SYNTAX!>Boolean<!><!SYNTAX!>><!><!SYNTAX!>><!> <!SYNTAX!>:<!> <!SYNTAX!>B<!><!SYNTAX!><<!><!SYNTAX!>F<!><!SYNTAX!><<!><!SYNTAX!>Boolean<!><!SYNTAX!>><!><!SYNTAX!>><!><!SYNTAX!>(<!><!SYNTAX!>)<!>
|
||||
|
||||
fun <G> gest() {}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ FILE: upperBoundViolated.kt
|
||||
lval b1: R|B<kotlin/Int>| = R|/B.B|<R|kotlin/Int|>()
|
||||
lval b2: R|B<C>| = R|/B.B|<R|C|>()
|
||||
lval b3: R|B<kotlin/Any?>| = R|/B.B|<R|kotlin/Any?|>()
|
||||
lval b4: R|ERROR CLASS: Unresolved name: NumberPhile| = R|/B.B|<<ERROR TYPE REF: Symbol not found for UnexistingType>>().<Unresolved name: NL>#(ERROR_EXPR(No right operand)).<Unresolved name: Int>#(<Call has no callee>#()).<Unresolved name: NumberPhile>#(ERROR_EXPR(No right operand))
|
||||
lval b4: <ERROR TYPE REF: Unresolved name: NumberPhile> = R|/B.B|<<ERROR TYPE REF: Symbol not found for UnexistingType>>().<Unresolved name: NL>#(ERROR_EXPR(No right operand)).<Unresolved name: Int>#(<Call has no callee>#()).<Unresolved name: NumberPhile>#(ERROR_EXPR(No right operand))
|
||||
lval b5: R|B<B<ERROR CLASS: Symbol not found for UnexistingType>>| = R|/B.B|<R|B<ERROR CLASS: Symbol not found for UnexistingType>|>()
|
||||
R|/fest|<R|kotlin/Boolean|>()
|
||||
R|/fest|<R|C|>()
|
||||
@@ -58,8 +58,8 @@ FILE: upperBoundViolated.kt
|
||||
|
||||
}
|
||||
public final typealias NL<K> = R|NumColl<kotlin/collections/List<K>>|
|
||||
public final val test7: R|ERROR CLASS: Unresolved name: NumberPhile| = R|/NumColl.NumColl|<R|kotlin/Int|>().<Unresolved name: NumberPhile>#(ERROR_EXPR(No right operand))
|
||||
public get(): R|ERROR CLASS: Unresolved name: NumberPhile|
|
||||
public final val test7: <ERROR TYPE REF: Unresolved name: NumberPhile> = R|/NumColl.NumColl|<R|kotlin/Int|>().<Unresolved name: NumberPhile>#(ERROR_EXPR(No right operand))
|
||||
public get(): <ERROR TYPE REF: Unresolved name: NumberPhile>
|
||||
public final val test8: R|NumColl<kotlin/collections/List<kotlin/String>>| = R|/NumColl.NumColl|<R|kotlin/String|>()
|
||||
public get(): R|NumColl<kotlin/collections/List<kotlin/String>>|
|
||||
public final class NumberPhile<T : R|kotlin/Number|> : R|kotlin/Any| {
|
||||
|
||||
@@ -14,7 +14,7 @@ fun test() {
|
||||
val b1 = B<<!UPPER_BOUND_VIOLATED!>Int<!>>()
|
||||
val b2 = B<C>()
|
||||
val b3 = B<<!UPPER_BOUND_VIOLATED!>Any?<!>>()
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()<!UNRESOLVED_REFERENCE{PSI}!>NL<!><!SYNTAX{PSI}!><<!>Int<!SYNTAX{PSI}!>><!>()NumberPhile<!SYNTAX{PSI}!><!>
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()<!UNRESOLVED_REFERENCE!>NL<!><!SYNTAX!><<!>Int<!SYNTAX!>><!>()NumberPhile<!SYNTAX!><!>
|
||||
val b5 = B<<!UPPER_BOUND_VIOLATED!>B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>><!>>()
|
||||
fest<<!UPPER_BOUND_VIOLATED!>Boolean<!>>()
|
||||
fest<C>()
|
||||
@@ -40,7 +40,7 @@ fun <K, L : K> rest() {
|
||||
|
||||
class NumColl<T : Collection<Number>>
|
||||
typealias NL<K> = NumColl<List<K>>
|
||||
val test7 = NL<Int>()<!UNRESOLVED_REFERENCE{PSI}!>NumberPhile<!><!SYNTAX{PSI}!><!>
|
||||
val test7 = NL<Int>()<!UNRESOLVED_REFERENCE!>NumberPhile<!><!SYNTAX!><!>
|
||||
val test8 = NL<String>()
|
||||
|
||||
class NumberPhile<T: Number>(x: T)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FILE: main.kt
|
||||
public final fun test_1(e: R|JavaEnum|): R|kotlin/Unit| {
|
||||
lval a: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
|
||||
lval a: <ERROR TYPE REF: Unresolved name: plus> = when (R|<local>/e|) {
|
||||
==($subj$, Q|JavaEnum|.R|/JavaEnum.A|) -> {
|
||||
Int(1)
|
||||
}
|
||||
@@ -9,7 +9,7 @@ FILE: main.kt
|
||||
}
|
||||
}
|
||||
.<Unresolved name: plus>#(Int(0))
|
||||
lval b: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
|
||||
lval b: <ERROR TYPE REF: Unresolved name: plus> = when (R|<local>/e|) {
|
||||
==($subj$, Q|JavaEnum|.R|/JavaEnum.A|) -> {
|
||||
Int(1)
|
||||
}
|
||||
@@ -44,7 +44,7 @@ FILE: main.kt
|
||||
.R|kotlin/Int.plus|(Int(0))
|
||||
}
|
||||
public final fun test_2(e: R|JavaEnum?|): R|kotlin/Unit| {
|
||||
lval a: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
|
||||
lval a: <ERROR TYPE REF: Unresolved name: plus> = when (R|<local>/e|) {
|
||||
==($subj$, Q|JavaEnum|.R|/JavaEnum.A|) -> {
|
||||
Int(1)
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ FILE: exhaustiveness_sealedSubClass.kt
|
||||
.R|kotlin/Int.plus|(Int(0))
|
||||
}
|
||||
public final fun test_2(e: R|A|): R|kotlin/Unit| {
|
||||
lval a: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
|
||||
lval a: <ERROR TYPE REF: Unresolved name: plus> = when (R|<local>/e|) {
|
||||
($subj$ is R|D|) -> {
|
||||
Int(1)
|
||||
}
|
||||
@@ -86,7 +86,7 @@ FILE: exhaustiveness_sealedSubClass.kt
|
||||
}
|
||||
}
|
||||
.<Unresolved name: plus>#(Int(0))
|
||||
lval b: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
|
||||
lval b: <ERROR TYPE REF: Unresolved name: plus> = when (R|<local>/e|) {
|
||||
($subj$ is R|B|) -> {
|
||||
Int(1)
|
||||
}
|
||||
@@ -98,7 +98,7 @@ FILE: exhaustiveness_sealedSubClass.kt
|
||||
}
|
||||
}
|
||||
.<Unresolved name: plus>#(Int(0))
|
||||
lval c: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
|
||||
lval c: <ERROR TYPE REF: Unresolved name: plus> = when (R|<local>/e|) {
|
||||
($subj$ is R|B|) -> {
|
||||
Int(1)
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ FILE: CallBasedInExpressionGenerator.kt
|
||||
public final val codegen: R|org/jetbrains/kotlin/codegen/range/inExpression/ExpressionCodegen| = R|<local>/codegen|
|
||||
public get(): R|org/jetbrains/kotlin/codegen/range/inExpression/ExpressionCodegen|
|
||||
|
||||
private final val resolvedCall: R|ERROR CLASS: Unresolved name: getResolvedCallWithAssert| = R|<local>/operatorReference|.<Unresolved name: getResolvedCallWithAssert>#(this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.codegen|.<Unresolved name: bindingContext>#)
|
||||
private get(): R|ERROR CLASS: Unresolved name: getResolvedCallWithAssert|
|
||||
private final val resolvedCall: <ERROR TYPE REF: Unresolved name: getResolvedCallWithAssert> = R|<local>/operatorReference|.<Unresolved name: getResolvedCallWithAssert>#(this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.codegen|.<Unresolved name: bindingContext>#)
|
||||
private get(): <ERROR TYPE REF: Unresolved name: getResolvedCallWithAssert>
|
||||
|
||||
private final val isInverted: R|kotlin/Boolean| = ==(R|<local>/operatorReference|.<Unresolved name: getReferencedNameElementType>#(), <Unresolved name: KtTokens>#.<Unresolved name: NOT_IN>#)
|
||||
private get(): R|kotlin/Boolean|
|
||||
@@ -75,7 +75,7 @@ FILE: CallBasedInExpressionGenerator.kt
|
||||
}
|
||||
|
||||
private final fun invokeFunction(v: R|org/jetbrains/kotlin/codegen/range/inExpression/InstructionAdapter|): R|kotlin/Unit| {
|
||||
lval result: R|ERROR CLASS: Unresolved name: invokeFunction| = this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.codegen|.<Unresolved name: invokeFunction>#(this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.resolvedCall|.<Unresolved name: call>#, this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.resolvedCall|, <Unresolved name: none>#())
|
||||
lval result: <ERROR TYPE REF: Unresolved name: invokeFunction> = this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.codegen|.<Unresolved name: invokeFunction>#(this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.resolvedCall|.<Unresolved name: call>#, this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.resolvedCall|, <Unresolved name: none>#())
|
||||
R|<local>/result|.<Unresolved name: put>#(R|<local>/result|.<Unresolved name: type>#, R|<local>/result|.<Unresolved name: kotlinType>#, R|<local>/v|)
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ FILE: access.kt
|
||||
lval a: R|kotlin/Int| = Int(10)
|
||||
lval b: R|kotlin/Int| = R|<local>/a|
|
||||
lval d: R|kotlin/String| = String()
|
||||
lval c: R|ERROR CLASS: Unresolved name: c| = <Unresolved name: c>#
|
||||
lval c: <ERROR TYPE REF: Unresolved name: c> = <Unresolved name: c>#
|
||||
<Unresolved name: abc>#()
|
||||
local final fun bcd(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ FILE: Test.kt
|
||||
lval bbd: R|BB.D| = Q|BB.D|
|
||||
lval aac: R|AA.C| = Q|AA.C|
|
||||
Q|JavaClass|.R|/JavaClass.bar|()
|
||||
lval errC: R|ERROR CLASS: Unresolved name: C| = Q|BB|.<Unresolved name: C>#
|
||||
lval errBarViaBB: R|ERROR CLASS: Unresolved name: bar| = Q|BB|.<Unresolved name: bar>#()
|
||||
lval errBarViaAA: R|ERROR CLASS: Unresolved name: bar| = Q|AA|.<Unresolved name: bar>#()
|
||||
lval errC: <ERROR TYPE REF: Unresolved name: C> = Q|BB|.<Unresolved name: C>#
|
||||
lval errBarViaBB: <ERROR TYPE REF: Unresolved name: bar> = Q|BB|.<Unresolved name: bar>#()
|
||||
lval errBarViaAA: <ERROR TYPE REF: Unresolved name: bar> = Q|AA|.<Unresolved name: bar>#()
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ class Factory {
|
||||
}
|
||||
|
||||
companion object {
|
||||
val f = Function
|
||||
val f = <!NO_COMPANION_OBJECT!>Function<!>
|
||||
val x = Function.Default
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,5 +47,5 @@ FILE: companion.kt
|
||||
Q|B|.R|/B.Companion.baz|()
|
||||
lval x: R|kotlin/String| = Q|A|.R|/A.Companion.D|
|
||||
lval y: R|kotlin/String| = Q|B|.R|/B.Companion.C|
|
||||
lval z: R|ERROR CLASS: Unresolved name: D| = Q|B|.<Unresolved name: D>#
|
||||
lval z: <ERROR TYPE REF: Unresolved name: D> = Q|B|.<Unresolved name: D>#
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -18,10 +18,10 @@ FILE: errCallable.kt
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval x: <ERROR TYPE REF: No result type for initializer> = ::<Unresolved name: Nested>#
|
||||
lval x: <ERROR TYPE REF: Unresolved reference: Nested> = ::<Unresolved reference: Nested>#
|
||||
}
|
||||
|
||||
}
|
||||
public final fun R|Your|.foo(): R|kotlin/Unit| {
|
||||
lval x: <ERROR TYPE REF: No result type for initializer> = ::<Unresolved name: Nested>#
|
||||
lval x: <ERROR TYPE REF: Unresolved reference: Nested> = ::<Unresolved reference: Nested>#
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ class Outer {
|
||||
inner class Inner
|
||||
}
|
||||
|
||||
val x = Outer.Inner
|
||||
val x = Outer.<!NO_COMPANION_OBJECT!>Inner<!>
|
||||
val klass = Outer.Inner::class
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
FILE: propertyWithExtensionType.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(x: R|kotlin/String.() -> kotlin/Unit|, y: R|kotlin/String.() -> kotlin/Int|): R|A| {
|
||||
public constructor(x: R|(kotlin/String.() -> kotlin/Unit)?|, y: R|kotlin/String.() -> kotlin/Int|): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val x: R|kotlin/String.() -> kotlin/Unit| = R|<local>/x|
|
||||
public get(): R|kotlin/String.() -> kotlin/Unit|
|
||||
public final val x: R|(kotlin/String.() -> kotlin/Unit)?| = R|<local>/x|
|
||||
public get(): R|(kotlin/String.() -> kotlin/Unit)?|
|
||||
|
||||
public final val y: R|kotlin/String.() -> kotlin/Int| = R|<local>/y|
|
||||
public get(): R|kotlin/String.() -> kotlin/Int|
|
||||
@@ -14,7 +14,7 @@ FILE: propertyWithExtensionType.kt
|
||||
public final fun test(a: R|A|): R|kotlin/Unit| {
|
||||
when () {
|
||||
!=(R|<local>/a|.R|/A.x|, Null(null)) -> {
|
||||
lval b: R|kotlin/String.() -> kotlin/Unit| = R|<local>/a|.R|/A.x|
|
||||
lval b: R|(kotlin/String.() -> kotlin/Unit)?| = R|<local>/a|.R|/A.x|
|
||||
R|<local>/b|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(String())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ FILE: lambda.kt
|
||||
}
|
||||
)
|
||||
R|/itIs|(<L> = itIs@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| <inline=NoInline> {
|
||||
^ <strcat>(String(this is ), R|<local>/it|.R|kotlin/Any.toString|(), String( test))
|
||||
^ <strcat>(String(this is ), R|<local>/it|, String( test))
|
||||
}
|
||||
)
|
||||
R|/multipleArgs|(<L> = multipleArgs@fun <anonymous>(a: R|kotlin/String|, b: R|kotlin/String|): R|kotlin/String| <inline=NoInline> {
|
||||
^ <strcat>(String(This is test of ), R|<local>/a|.R|kotlin/Any.toString|(), String(, ), R|<local>/b|.R|kotlin/Any.toString|())
|
||||
^ <strcat>(String(This is test of ), R|<local>/a|, String(, ), R|<local>/b|)
|
||||
}
|
||||
)
|
||||
lval s: R|kotlin/String| = fun <anonymous>(): R|kotlin/String| <inline=Unknown> {
|
||||
|
||||
@@ -40,5 +40,5 @@ FILE: localObjects.kt
|
||||
|
||||
Q|B|.R|/B.foo|()
|
||||
}
|
||||
public final val bb: R|ERROR CLASS: Unresolved name: foo| = <Unresolved name: B>#.<Unresolved name: foo>#()
|
||||
public get(): R|ERROR CLASS: Unresolved name: foo|
|
||||
public final val bb: <ERROR TYPE REF: Unresolved name: foo> = <Unresolved name: B>#.<Unresolved name: foo>#()
|
||||
public get(): <ERROR TYPE REF: Unresolved name: foo>
|
||||
|
||||
@@ -25,7 +25,7 @@ FILE: nestedObjects.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final val err: R|ERROR CLASS: Unresolved name: B| = Q|B|.<Unresolved name: A>#.<Unresolved name: B>#
|
||||
public get(): R|ERROR CLASS: Unresolved name: B|
|
||||
public final val err: <ERROR TYPE REF: Unresolved name: B> = Q|B|.<Unresolved name: A>#.<Unresolved name: B>#
|
||||
public get(): <ERROR TYPE REF: Unresolved name: B>
|
||||
public final val correct: R|A.B.A| = Q|A.B.A|
|
||||
public get(): R|A.B.A|
|
||||
|
||||
@@ -11,8 +11,8 @@ open class Outer {
|
||||
|
||||
class Derived : Outer() {
|
||||
fun foo() {
|
||||
Outer.<!HIDDEN!>PrivateNested<!>()
|
||||
super.<!HIDDEN!>PrivateInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>PrivateNested<!>()
|
||||
super.<!INVISIBLE_REFERENCE!>PrivateInner<!>()
|
||||
|
||||
Outer.ProtectedNested()
|
||||
super.ProtectedInner()
|
||||
@@ -23,11 +23,11 @@ class Derived : Outer() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
Outer.<!HIDDEN!>PrivateNested<!>()
|
||||
Outer().<!HIDDEN!>PrivateInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>PrivateNested<!>()
|
||||
Outer().<!INVISIBLE_REFERENCE!>PrivateInner<!>()
|
||||
|
||||
Outer.<!HIDDEN!>ProtectedNested<!>()
|
||||
Outer().<!HIDDEN!>ProtectedInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>ProtectedNested<!>()
|
||||
Outer().<!INVISIBLE_REFERENCE!>ProtectedInner<!>()
|
||||
|
||||
Outer.PublicNested()
|
||||
Outer().PublicInner()
|
||||
|
||||
@@ -33,7 +33,7 @@ FILE: privateObjectLiteral.kt
|
||||
|
||||
internal get(): R|kotlin/Any|
|
||||
|
||||
public final val w: R|ERROR CLASS: Unresolved name: foo| = this@R|/C|.R|/C.z|.<Unresolved name: foo>#()
|
||||
public get(): R|ERROR CLASS: Unresolved name: foo|
|
||||
public final val w: <ERROR TYPE REF: Unresolved name: foo> = this@R|/C|.R|/C.z|.<Unresolved name: foo>#()
|
||||
public get(): <ERROR TYPE REF: Unresolved name: foo>
|
||||
|
||||
}
|
||||
|
||||
@@ -9,21 +9,21 @@ private class Private {
|
||||
bar()
|
||||
Nested()
|
||||
fromCompanion()
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun foo() {
|
||||
bar()
|
||||
fromCompanion()
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
}
|
||||
}
|
||||
|
||||
private class Nested {
|
||||
fun foo() {
|
||||
fromCompanion()
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ fun withLocals() {
|
||||
|
||||
Local().baz()
|
||||
|
||||
Local().<!HIDDEN!>bar<!>() // hidden
|
||||
Local().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
}
|
||||
|
||||
fun test() {
|
||||
@@ -62,14 +62,14 @@ fun test() {
|
||||
Private().baz()
|
||||
Private().Inner()
|
||||
|
||||
Private().<!HIDDEN!>bar<!>() // hidden
|
||||
Private.<!HIDDEN!>Nested<!>() // hidden
|
||||
Private.<!HIDDEN!>fromCompanion<!>() // hidden
|
||||
Private().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
Private.<!INVISIBLE_REFERENCE!>Nested<!>() // hidden
|
||||
Private.<!INVISIBLE_REFERENCE!>fromCompanion<!>() // hidden
|
||||
}
|
||||
|
||||
// FILE: second.kt
|
||||
|
||||
fun secondTest() {
|
||||
<!HIDDEN!>foo<!>() // hidden
|
||||
<!HIDDEN!>Private<!>() // hidden
|
||||
<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
<!INVISIBLE_REFERENCE!>Private<!>() // hidden
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class Derived : Protected() {
|
||||
fun foo() {
|
||||
bar()
|
||||
Nested().foo()
|
||||
Nested().<!HIDDEN!>bar<!>() // hidden
|
||||
Nested().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
|
||||
fromCompanion()
|
||||
protectedFromCompanion()
|
||||
@@ -48,8 +48,8 @@ fun test() {
|
||||
Protected().baz()
|
||||
Protected().Inner()
|
||||
|
||||
Protected().<!HIDDEN!>bar<!>() // hidden
|
||||
Protected.<!HIDDEN!>Nested<!>() // hidden
|
||||
Protected().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
Protected.<!INVISIBLE_REFERENCE!>Nested<!>() // hidden
|
||||
}
|
||||
|
||||
open class Generic<T>(val x: T) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user