Commit Graph

72980 Commits

Author SHA1 Message Date
Ilya Gorbunov ca6ce151a2 Unify test package names in kotlin-stdlib tests
This makes 'test.' an implicit package prefix, thus fixing the inspection
"Package directive doesn't match file location" positive in almost all
test files.
2021-02-25 09:58:14 +03:00
Alexander Udalov a6d8bf8127 Fix compilation of idea-fir-low-level-api 2021-02-24 21:31:19 +01:00
Alexander Udalov aeb0906f2d Build: suppress warnings for kotlin-stdlib-wasm 2021-02-24 20:48:26 +01:00
Ilya Kirillov 9ce4decb73 FIR IDE: use WhenMissingCase in NoElseInWhen diagnostic 2021-02-24 20:13:45 +01:00
Ilya Kirillov f19a9af7b3 Unify WhenMissingCase from FIR and FE1.0 2021-02-24 20:13:43 +01:00
Ilya Kirillov f4371c670e Move WhenMissingCase from fir module to compiler.common to use in IDE 2021-02-24 20:13:42 +01:00
Ilya Kirillov 83f8650e80 Move CallableId from fir module to compiler.common to use in IDE 2021-02-24 20:13:41 +01:00
Alexander Udalov 7e149a3a44 IR: remove unneeded dependencies on psi2ir 2021-02-24 19:07:38 +01:00
Alexander Udalov e69cc183a4 IR: remove dependency of 'ir.tree' on 'frontend' 2021-02-24 19:07:38 +01:00
Alexander Udalov addabae8d2 IR: move frontend-dependent code into implementations in psi2ir 2021-02-24 19:07:38 +01:00
Alexander Udalov d991a3e40f IR: simplify initialization cycle of TypeTranslator/ConstantValueGenerator 2021-02-24 19:07:38 +01:00
Alexander Udalov 5ea3d32b98 IR: remove TranslationPluginContext.bindingContext
This removes another dependency of 'ir.tree' on 'frontend', and among
other things, makes it possible to implement TranslationPluginContext
for FIR in the future.
2021-02-24 19:07:38 +01:00
Alexander Udalov 274e0ad136 IR: remove unused dependency on BindingContext 2021-02-24 19:07:37 +01:00
Alexander Udalov 837eb739ea IR: move CompilationErrorException to frontend.common 2021-02-24 19:07:37 +01:00
Alexander Udalov 1ae46b529f IR: move ExpectDeclarationRemover to ir.backend.common 2021-02-24 19:07:37 +01:00
Victor Petukhov 26a96a1c19 Don't throw an exception while loading type use annotations on implicit bounds of a wildcard
^KT-45067 Fixed
2021-02-24 21:06:32 +03:00
Pavel Semyonov 7669d8ff26 Add README.md for the kotlin-parcelize plugin 2021-02-25 02:59:50 +09:00
Alexander Udalov 2e2caae05c Extract control flow analysis to separate module
Extract a service interface out of ControlFlowInformationProviderImpl
and register its implementation in two "leaf" modules: 'cli',
'idea-core'.

This improves parallel build, since a lot of modules depend on
'frontend' but only these two modules reference the implementation and
thus depend on the full CFA implementation now.
2021-02-24 17:17:04 +01:00
Alexander Udalov c744515832 Minor, pass CliSealedClassInheritorsProvider explicitly in some places
Do not use default parameter value for functions with only 1 or 2 call
sites, since it doesn't add much value but provides a dangerous
possibility to forget to pass the real implementation.
2021-02-24 17:17:03 +01:00
Alexander Udalov ca5a35b4b3 Move CompilerEnvironment from 'frontend' to 'cli'
This is needed in order to have a single convenient place where to
register frontend services implemented _outside_ of the 'frontend'
module, such as the control flow analysis, extracted to a separate
module in a subsequent commit.
2021-02-24 17:17:03 +01:00
Alexander Udalov 3efbca85ea Minor, rename file ControlFlowInformationProvider{ -> Impl}.kt 2021-02-24 17:17:03 +01:00
Alexander Udalov 5ad0033d42 Extract some cfg utilities into separate files
These utilties are used not only within CFG, but from the frontend and
idea as well. Therefore upon extraction of CFG into another module,
these two new files will remain in 'frontend'.
2021-02-24 17:17:03 +01:00
Mikhail Glukhikh a9b9cced15 IrInterpret: remove thread creation / joining (performance fix) 2021-02-24 18:56:06 +03:00
Anton Bannykh df62b5e311 JS IR: special origins for declaration created during lowerings
Otherwise the lazy properties lowering may try to process them
2021-02-24 18:32:56 +03:00
Tianyu Geng aec498a4ea Add quickfixes for NON_FINAL_MEMBER_IN_FINAL_CLASS 2021-02-24 15:56:35 +01:00
Nikita Katkov e1b3cd32f3 IDEA-253605 jvmClassPathUtil: preserve old behaviour 2021-02-24 11:48:32 +00:00
Nikita Katkov 738c6d3119 IDEA-253605 jvmClassPathUtil: correct collection of parent classloaders 2021-02-24 11:48:32 +00:00
Vladimir Dolzhenko 81efdab4e4 Do not swallow any exceptions apart FNFE
Relates to #KT-39776
2021-02-24 11:06:49 +00:00
Mikhail Glukhikh cf830887ec FIR2IR: optimize override binding for Fir2IrLazySimpleFunction 2021-02-24 13:50:47 +03:00
Tianyu Geng 5bdea9652b FIR: fix position and reporting of PRIVATE_SETTER_*
Previously `FirPropertyAccessor.source` references the `KtProperty` if
the user code contains a setter or getter that doesn't contain a body.
For example, with the following

```
val i: Int = 1
  private set
```

The `FirPropertyAccessor` would reference the `KtProperty` as the
source.

This change makes `FirPropertyAccessor` reference `KtPropertyAccessor`
as the source if possible, regardless of whether the body is present or
not.
2021-02-24 13:50:46 +03:00
Tianyu Geng bdeecfc188 FIR: check multiple vararg param and forbidden vararg type 2021-02-24 13:50:46 +03:00
Jinseong Jeon 0e9474342d Simplify FirMethodOfAnyImplementedInInterfaceChecker
* Override CallableId and operator tag parts only,
  not entire function representation

* Even more lazyness for inspector creation
2021-02-24 13:50:46 +03:00
Jinseong Jeon 338595703c FIR: delegate to abstract override members of Any 2021-02-24 13:50:46 +03:00
Jinseong Jeon 0defdc9e70 FIR checker: fix typos in diagnostics list 2021-02-24 13:50:45 +03:00
Jinseong Jeon c4af92a86a FIR: don't raise an internal error for sealed members in intersection scope 2021-02-24 13:50:45 +03:00
Jinseong Jeon 4fba5891c7 FIR2IR: compute class localness before a loop 2021-02-24 13:50:45 +03:00
Yaroslav Chernyshev c571c5c441 Refactor and apply optimization to KaptModelBuilderService logic 2021-02-24 11:38:13 +03:00
Andrey Uskov 7ef136d142 Improve performance of import of pure kotlin project: do not force all tasks creation
#KT-34401 Fixed
2021-02-24 11:38:12 +03:00
Igor Chevdar 9d8abca195 [box-tests] Disabled a test for K/N 2021-02-24 11:00:27 +05:00
Stefan Wolf d88ef64288 Remove references to validateTaskProperties
The task is now called `validatePlugins`.
2021-02-23 23:26:41 +03:00
Stefan Wolf 200ef832d2 Add PathSensitive annotation to all input file properties
So new validation which will be added in Gradle 7.1
won't cause warnings during the build.
2021-02-23 23:26:39 +03:00
Stefan Wolf 8b01df6772 Enable stricker Kotlin Gradle Plugin validation 2021-02-23 23:26:35 +03:00
Mads Ager 8852323a76 [PSI2IR] Do not generate property reference setter if inaccessible.
Fixes KT-45064.
2021-02-23 19:33:49 +01:00
Ilmir Usmanov d44799fa78 JVM IR: Use INVOKESPECIAL instead of INVOKEVIRTUAL for default private
suspend functions.

 #KT-26592
2021-02-23 18:49:10 +01:00
Ilmir Usmanov 3ee62cb1b2 JVM IR: Do not generate private suspend functions as synthetic package-private
#KT-26592
2021-02-23 18:49:06 +01:00
Alexander Udalov 48fb085bf6 Deprecate kotlin.Metadata.bytecodeVersion
#KT-41758 Fixed
2021-02-23 12:45:41 +01: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
Alexander Udalov d300e05be9 Remove obsolete code in inliner for experimental coroutines 2021-02-23 12:45:41 +01:00
Alexander Udalov 448c6c2f0d kotlinx-metadata-jvm: deprecate KotlinClassHeader.bytecodeVersion
#KT-41758
2021-02-23 12:45:40 +01:00
Alexander Udalov c6f5ce6837 Do not write bytecode version to class file
#KT-41758
2021-02-23 12:45:40 +01:00