Dmitriy Novozhilov
01c0cf80d0
[FIR] Support @kotlin.jvm.PurelyImplements annotation
2021-11-22 17:01:17 +03:00
Tianyu Geng
8ba2e4d221
FIR: move JavaAnnotationMapper.javaToKotlinNameMap to common
...
so that FIR IDE logic can reference it
2021-11-04 20:52:50 +01:00
Victor Petukhov
d015d3bc0e
Don't enhance previously erased value parameters for jspecify strict mode
...
^KT-48261 Fixed
2021-10-26 19:37:55 +03:00
Denis.Zharkov
0bdea4f20a
FIR: Do not create incorrect synthetic property
2021-10-26 18:45:59 +03:00
Denis.Zharkov
fe1b4d61c2
Move some property convention helpers to compiler.common.jvm
...
Since it will be used in FIR, too
2021-10-26 18:45:58 +03:00
Georgy Bronnikov
41e38d5a1a
JVM_IR: move serialized IR to a separate annotation
2021-10-02 00:56:46 +03:00
Victor Petukhov
70d70b9042
Use warn mode by default for jspecify nullability annotations in 1.6
...
^KT-48851 Fixed
2021-09-30 20:08:35 +03:00
Denis.Zharkov
9ac29e0714
Fix enhancement when mixing TYPE_USE and non-TYPE_USE annotations
2021-09-28 22:59:18 +03:00
Denis.Zharkov
38fa900e56
FIR: Optimize case with no annotations on package
2021-09-23 16:58:26 +03:00
Dmitriy Novozhilov
9d09b9605f
[FIR] Cleanup and reorganize utils in :compiler:fir:java
2021-09-15 17:11:30 +03:00
Ilya Kirillov
a8d321db63
FIR IDE: do not use FE1.0 compiler jars in frontend-independent-modules
2021-09-14 14:45:43 +02:00
Dmitriy Novozhilov
5769d42248
[FIR] Fix all usages of annotations due to new FirAnnotation hierarchy
2021-09-13 13:53:12 +03:00
Ivan Kochurkin
8cdb79f969
Move JvmNames, JvmFieldApplicabilityProblem to common.jvm module
2021-09-10 00:49:10 +03:00
Ivan Kochurkin
69a13a3269
[FIR] Use getAnnotationByClassId instead of getAnnotationByFqName in JVM checkers
2021-09-10 00:49:09 +03:00
pyos
94402ba488
FE: prefer enhancements for errors over enhancements for warnings
2021-09-08 16:54:17 +03:00
pyos
afa1d18cc2
FE: in NullMarked scope, enhance T! to at least T
...
#KT-44436 Fixed
2021-09-08 16:54:17 +03:00
pyos
f793afbfea
FE: do not enhance ? into ? extends @NotNull Object in JSR-305
...
This is already done in jspecify and makes more sense anyway.
2021-09-08 16:54:17 +03:00
pyos
9ee0d6b60a
FE: don't use an experimental stdlib function
...
...for compatibility? idk.
2021-09-06 13:11:21 +03:00
pyos
0d78bcebca
FE: rename an extension to avoid conflicts with FIR member
2021-09-06 13:11:20 +03:00
pyos
476513fe96
FIR: rename type parameter: Annotation -> TAnnotation
2021-09-06 13:11:18 +03:00
pyos
090b90f62e
FIR: load type qualifiers from module, package, and parent classes
2021-09-06 13:11:13 +03:00
pyos
03304bce96
FIR: enhance Java type parameter bounds
...
This also fixes handling of self-recursive types.
TODO: fix jspecify/{strict,warn}Mode/Captured.fir.kt
2021-09-06 13:11:08 +03:00
pyos
c85329905c
FE: remove ? enhancement code that is never used
...
Using `starProjectionType` to enhance `?` is pointless because
1. we explicitly ignore nullability annotations for `?` below;
2. mutability is irrelevant;
3. `starProjectionType` never returns references to other type
parameters due to how the type substitutor works.
2021-09-06 13:11:01 +03:00
pyos
a8b09a2016
FE: extract FIR-reusable code from SignatureParts
2021-09-06 13:11:00 +03:00
pyos
b31925e6c9
FE: slowly refactor extractQualifiersFromAnnotations 3
2021-09-06 13:10:59 +03:00
pyos
8d39d155bb
FE/FIR: extract common code for mutability qualifiers
2021-09-06 13:10:57 +03:00
pyos
c753e547c6
FE/FIR: extract common code for type qualifier inheritance
2021-09-06 13:10:56 +03:00
pyos
e0d0bf9ede
FIR/FE: extract common code for type qualifier defaults
2021-09-06 13:10:54 +03:00
pyos
8bf5e86788
FIR/FE: extract common code for handling known nullability annotations
2021-09-06 13:10:53 +03:00
pyos
9349d4b0d2
FIR/FE: extract common AnnotationTypeQualifierResolver code
...
TODO: extract the equivalent code that uses it...
2021-09-06 13:10:52 +03:00
Steven Schäfer
de9d2919a8
JVM Metadata: Add a bit to mark anonymous objects in inline functions
...
Anonymous objects in the scope of an inline functions are copied to
all call-sites. This makes them part of the public ABI of a Kotlin
library.
We introduce a flag to mark all classes in the scope of an inline
function. When compiling with assertions enabled, we check that
this flag is set whenever we inline an anonymous object from another
module.
2021-08-23 18:25:33 +02:00
pyos
47d0211370
FE: do not enhance ? in jspecify NullMarked scope
...
No clue whether this should be done for `@TypeQualifierDefault` since it
appears to have no specification whatsoever.
#KT-48262 Fixed
2021-08-18 16:41:00 +03:00
Alexander Udalov
f8af127a4e
Do not load Java @Repeatable for Kotlin-repeatable annotations
...
#KT-48131 Fixed
2021-08-06 22:47:36 +02:00
Alexander Udalov
92a73d7636
Generate container class for repeatable annotations
...
#KT-12794
2021-07-30 19:53:32 +02:00
Mikhael Bogdanov
c8094f7439
Add readable toString for JavaTypeEnhancementState
2021-07-29 19:45:55 +02:00
Alexander Udalov
0a9498f7e2
Build: suppress deprecated JVM target warning globally
...
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.
Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
2021-07-27 13:35:39 +02:00
Alexander Udalov
56866e6927
JVM IR: move java.lang.annotation symbols to JvmSymbols.javaAnnotations
...
Since a separate instance of AdditionalClassAnnotationLowering is
created for each source file, symbols for these classes were created as
many times as there were source files in the module.
Also inline some variables in the process and move around some methods.
2021-07-26 14:33:32 +02:00
Georgy Bronnikov
baaecaa052
JVM_IR: write serialized IR to an annotation
2021-07-14 21:20:06 +03:00
Alexander Udalov
173e194dac
Remove dependency on JVM specifics in serialization.common
...
Move handling of EnhancedNullability to JVM subclasses in
serialization.jvm. Looks like this was possible because of accidental
dependency of frontend on compiler.common.jvm introduced in 564d382b9d .
Also fix a minor typo in the file name typeEnhancementUtils.kt.
2021-07-13 01:54:41 +02:00
Victor Petukhov
1224d28deb
Move java type enhancement stuff to :core:compiler.common.jvm
2021-07-09 13:22:02 +03:00
Andrey Zinovyev
02297d2c75
[FIR] Rollback exposure of j.u.List.sort method
2021-07-08 18:13:51 +03:00
Andrey Zinovyev
b44785c24e
[FIR] NOTHING_TO_OVERRIDE diagnostic
2021-07-08 18:13:47 +03:00
Victor Petukhov
f46dc713d7
Support rxjava 3 nullability annotations
2021-07-06 09:54:28 +03:00
Victor Petukhov
70dbc50305
Rename JSPECIFY_DEFAULT_NOT_NULL to JSPECIFY_NULL_MARKED
2021-07-06 09:54:25 +03:00
Yahor Berdnikau
7789054547
Migrate repo to use JVM toolchains Gradle feature.
...
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Denis.Zharkov
18e93b50d9
FIR: Fix loading read-only collection Java types with incorrect variance
2021-06-07 15:25:56 +03:00
Mikhail Glukhikh
9ce8420491
FIR: introduce not implemented checker
2021-03-24 16:07:25 +03:00
Victor Petukhov
b45d5abeb1
[jspecify] Change annotations' package from org.jspecify.annotations to org.jspecify.nullness, and DefaultNonNull to NullMarked
...
^KT-45409 Fixed
2021-03-11 15:32:14 +03:00
Dmitriy Novozhilov
1f6ce874a1
Don't fail on unsupported default values of java annotations
2021-03-05 13:00:12 +03:00
Alexander Udalov
f63ffc51ae
Remove JvmBytecodeBinaryVersion from the compiler code
...
Move it to build-common where it's still used in incremental compilation
caches, and simplify a bit. In the future, it'll make sense to remove it
completely and to avoid writing it to caches. In this commit, I don't do
that to prevent the IC cache version to be updated, causing rebuilds for
all JPS projects.
#KT-41758
2021-02-23 12:45:41 +01:00