Commit Graph

2905 Commits

Author SHA1 Message Date
Nikolay Krasko 4e806a6322 Bump junit-bom in our project 5.7.0 -> 5.8.1 and clean up old versions 2021-11-24 19:35:35 +03:00
pyos 001ddda935 IR/Android: place the cache field first
to avoid NPEs if it is used during instance initialization.
2021-11-23 13:39:11 +01:00
Dmitriy Novozhilov ae967ec31b [FIR] Fix detecting version of plugin annotations if it differs from 1.6.255-SNAPSHOT 2021-11-23 15:01:36 +03:00
Dmitriy Novozhilov edb62e247f [FIR] Drop redundant class from fir plugin annotations module 2021-11-23 15:01:35 +03:00
Dmitriy Novozhilov 2d0bbf6e4b [FIR] Fix build configuration for tests in :fir-plugin-prototype 2021-11-23 15:01:34 +03:00
Dmitriy Novozhilov 409f96678a [Parcelize] Extract common names, class ids and FQNs into separate object 2021-11-23 15:01:33 +03:00
Dmitriy Novozhilov edc74b8838 [Parcelize] Add test for Parcelable implementation with overriden describeContents 2021-11-23 15:01:33 +03:00
Dmitriy Novozhilov 8cdddbfd9d [FIR] Implement checkers for FIR parcelize plugin
There is one of checks left unimplemented (FirParcelizePropertyChecker.checkParcelableClassProperty)
  because it requires huge commonization of detecting which type can be
  serialized and which not, which is not prioritized job for now
2021-11-23 15:01:31 +03:00
Dmitriy Novozhilov eac9a9fc79 [FIR] Implement FIR version of parcelize plugin
This commit includes only generation of declarations and
  ir backend part, checkers are added in separate commit
2021-11-23 15:01:29 +03:00
Dmitriy Novozhilov cb0705ec03 [FIR] Change scheme of generating declarations by plugins
Methods `needToGenerateAdditionalMembersInClass` and
  `needToGenerateNestedClassifiersInClass` are removed, now compiler
  uses `get...Names` and `getTopLevel...` methods to determine which
  extension may generate declaration with specific classId/callableId

This is needed to simplify API of FirDeclarationGenerationExtension and
  provide guarantee that `generate...` method will be called with
  specific classId/callableId only if specific extensions returned name
  for this id from `getName...` functions
2021-11-23 15:01:28 +03:00
Dmitriy Novozhilov 40d8451698 Add compiler diagnostic tests for parcelize checkers 2021-11-23 15:01:26 +03:00
Dmitriy Novozhilov b84ee64994 Move parcelize checkers testdata to :parcelize-compiler module 2021-11-23 15:01:23 +03:00
Dmitriy Novozhilov a093052b77 Delete sources of parcelize IDE plugin
They are moved to intellij community repo, so those sources in kotlin
  repository are actually redundant
2021-11-23 15:01:22 +03:00
Dmitriy Novozhilov 9948ba57c0 [FIR] Add ability to generate companion object from compiler plugin 2021-11-23 15:01:15 +03:00
Dmitriy Novozhilov 93378b1a04 [FE 1.0] Resolve private constructors of sealed classes same as for regular classes
^KT-44866
^KT-49729
2021-11-18 13:54:05 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Yan Zhulanow 8916626cc3 [Pill] Preserve kotlin_test_wasm_js library artifact 2021-11-12 20:09:50 +09:00
Dmitriy Novozhilov 0a902c1bef [Build] Remove dist_root artifact from JPS project configuration
This artifact was used to build compiler artifact during each project
  build, which is not needed for running compiler tests. Removal of
  this artifact from build chain reduces time of build for ~3 seconds
  which is a lot for rebuilds after minor changes (which are usually
  take only few seconds)
2021-11-09 20:06:08 +03:00
Mads Ager 6622846bc1 [JVM IR] Do not put destructuring params or underscores in LVT.
Putting them in the local variable table means that the debugger
needs to have special handling for parameters with specific names.
That forces us to generate mangled names for these.

Instead of also implementing the name mangling for FIR, this
change gets rid of the parameters from the LVT instead.
2021-11-02 15:13:14 +03:00
Dmitriy Novozhilov 4490f64666 [FIR] Get rid of FirAnnotatedDeclaration
Now all fir declarations have annotations

^KT-49260 Fixed
2021-10-28 15:01:18 +03:00
Ilya Chernikov 524e40708d Move report helpers to frontend.common 2021-10-27 22:17:40 +02:00
Ilya Chernikov e9f59e8d1d Move common diagnostics infrastructure to frontend.common 2021-10-27 22:17:39 +02:00
Ilya Chernikov a65beb2dc5 Move Fir*SourceElement to frontend.common, rename to Kt* (complete) 2021-10-27 21:44:11 +02:00
Steven Schäfer 05da65654e Parcelize: Enable warnings in tests 2021-10-26 17:06:18 +02:00
Steven Schäfer ca74b7becc AsmLikeInstructionListingTest: Handle remaining instructions
Adds argument printing for TypeInsnNode, IincInsnNode,
MultiANewArrayInsnNode, InvokeDynamicInsnNode,
TableSwitchInsnNode, and LookupSwitchInsnNode.
2021-10-26 16:50:12 +02:00
Dmitriy Novozhilov af0e40a0d2 [JS Test] Support RECOMPILE directive in js box tests in new infrastructure 2021-10-25 00:14:21 +03:00
Ivan Kylchik 225b064470 Implement new 'mix' test mode
This mode must be used when one configuration will run several tests
for different JUnit versions.
2021-10-25 00:14:20 +03:00
Aleksei.Cherepanov 276fb77155 Fix incremental build after changing Java const used as class property
Report Java static final constant with InlineConstantTracker, used as class property in Kotlin for further registration in JPS

#KT-49177 Fixed
2021-10-20 15:06:19 +03:00
Yan Zhulanow 20b73499f5 Pill: Add Analysis API test generator to the "Generate all tests" run configuration 2021-10-19 19:55:09 +03:00
Yan Zhulanow cb74247f8f Pill: Update options passed in test configurations 2021-10-19 19:55:08 +03:00
Yan Zhulanow 1f2508c177 Pill: recognize 'protobufCompare' as a test module 2021-10-19 19:55:07 +03:00
Yan Zhulanow f1fa17f896 Pill: Better support for compiler arguments in generated facets 2021-10-19 19:55:07 +03:00
Yan Zhulanow 6cd25984ca Pill: Always map kotlin-reflect-api to the kotlin-reflect.jar artifact 2021-10-19 19:55:06 +03:00
Yan Zhulanow 17120bf258 Pill: Fix Kotlin facet creation 2021-10-19 19:55:05 +03:00
Yan Zhulanow 099a44283f Pill: Disable Kotlin IDE plugin artifact building if not in cooperative mode 2021-10-19 19:55:05 +03:00
Yan Zhulanow 5627bbb535 Pill: Remove IDEA Ultimate run configuration 2021-10-19 19:55:04 +03:00
Yan Zhulanow 66005d9c3b Pill: Remove Android Studio support 2021-10-19 19:55:03 +03:00
Dmitriy Novozhilov bee44c6e0f [FIR] Split :compiler:fir:resolve module into three different modules
Those modules are:
- :compiler:fir:providers, which contains Fir and Symbol providers,
    scopes, and different utilities used by them
- :compiler:fir:semantics, which contains different abstractions and
    entities which are used in resolution and in checkers
- :compiler:fir:resolve, which contains all stuff related to resolution
    and inference

There are two pros of this change:
1. It may increase gradle build, because it allows to compile :fir:resolve
  and :fir:checkers modules in parallel
2. Logic of working FIR (scopes, providers, DFA logic system, etc) is
  now separated from logic of resolution phases, so for example checkers,
  which are depend on scopes physically will not be able to run resolve
  in any way
2021-10-18 11:10:47 +03:00
Dmitriy Novozhilov eadb91f9b2 [FIR] Move accessors to main session components close to declarations of those components 2021-10-18 10:55:39 +03:00
Dmitriy Novozhilov 7f836ee6c3 [FIR] Remove AllOpen prefixes from fir plugin prototype entities 2021-10-12 17:26:43 +03:00
Dmitriy Novozhilov 6712191538 [FIR] Update plugin prototype testdata 2021-10-12 17:26:41 +03:00
Dmitriy Novozhilov 9a802e7cd7 [FIR] Return symbols instead of FIR from FirPredicateBasedProvider 2021-10-12 17:26:40 +03:00
Dmitriy Novozhilov 6a14d91dbd [FIR] Change predicate providing API for FIR extensions
Predicate declaration was split into two parts:
- registering any number of predicates which are used in specific extension
- special checks for declaration applicability for each specific extension
2021-10-12 17:26:39 +03:00
Dmitriy Novozhilov 20e35167c8 [FIR] Add simple IR body generator to FIR plugin prototype 2021-10-12 17:26:39 +03:00
Dmitriy Novozhilov b3768a201f [FIR2IR] Create special IrDeclarationOrigin for generated declarations 2021-10-12 17:26:37 +03:00
Dmitriy Novozhilov 233b9f1242 [FIR] Generate IR for generated FIR declarations 2021-10-12 17:26:37 +03:00
Dmitriy Novozhilov e3579389ee [FIR] Create IR text tests for declarations generators 2021-10-12 17:26:36 +03:00
Dmitriy Novozhilov 0f076e16ed [FIR] Update plugin testdata 2021-10-12 17:26:35 +03:00
Dmitriy Novozhilov ea93d23dca [FIR] Move fir plugin tests to diagnostics sub directory 2021-10-12 17:26:34 +03:00
Dmitriy Novozhilov 79f1779d89 [FIR] Add methods to collect all class and callable ids from extensions
They will be needed for generating IR for all declarations from plugins
2021-10-12 17:26:33 +03:00