Commit Graph

66577 Commits

Author SHA1 Message Date
Ilya Gorbunov a3e8f02330 Update proguard version in test
The latest version at this moment (6.2.2) that ignores mutlirelease jar
content automatically, e.g. META-INF/versions/9 directory content.

Previous versions fail with the error
"class [META-INF/versions/9/module-info.class] unexpectedly contains class [module-info]"
2020-05-18 11:21:13 +03:00
Ilya Gorbunov 843829116d Add module-info to kotlin-test-* framework adapter artifacts
#KT-21266
2020-05-18 11:21:13 +03:00
Ilya Gorbunov 92c4ccc65f Allow customizing compilation classpath for JPMS module-info build 2020-05-18 11:21:13 +03:00
Ilya Gorbunov e3d20a2f5c Update module-info exports for stdlib and suppress warnings
- include kotlin.time package

Suppress module-info warnings:

- terminal digits in module name
- open/export for another not yet built dependee module

#KT-21266
2020-05-18 11:21:12 +03:00
Ilya Gorbunov 01fb200791 Build default jvm core libraries artifacts as modular
#KT-21266
2020-05-18 11:21:12 +03:00
Denis Zharkov e1e149a062 FIR: Support coercion-to-unit semantics for callable references 2020-05-18 11:17:45 +03:00
Jinseong Jeon 61def4cdc5 FIR: set function factory (before it's used in SAM lowering). 2020-05-18 09:36:22 +03:00
Ilya Kirillov 9ca6091b1d Wizard: use correct version of react libraries
#KT-38929 fixed
2020-05-18 08:59:41 +03:00
Ilya Kirillov 321272abed Wizard: make new wizard non-experimental
relates to #KT-38952
2020-05-18 08:59:40 +03:00
Vladimir Dolzhenko 01992b581e Dropped KotlinNativeFileTypeFactory from native-common.xml
Relates to #KT-38571
2020-05-17 16:02:25 +00:00
Vyacheslav Gerasimov 005e62526b Build: Add distributionSha256Sum to gradle-wrapper.properties
To enable downloaded gradle checksum validation
https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:verification
2020-05-17 10:40:13 +03:00
Vladimir Dolzhenko 7afadb9b5e Init default profile for perf tests 2020-05-16 14:10:29 +02:00
Ilya Chernikov fb6ef38370 Revert "Add info about the end of range in scripting REPL compiler messages"
This reverts commit af251caf, because it breaks daemon/client
compatibility, which we'd like to keep as much as possible
2020-05-15 21:15:48 +02:00
Vyacheslav Karpukhin 1ba4d7d99b Update foreign references when renaming a Kotlin file
(cherry picked from commit 1571a87d8f2ac755d0ba0bcb71f331e654dc1a92)
2020-05-15 19:45:14 +02:00
Dmitry Savvinov 3793e485b6 Check for common klibs builtins_platform properly
Actually, common klibs don't have a corresponding record (and abscence
of that record should be treated as platform COMMON).

^KT-38769 Fixed
2020-05-15 20:25:48 +03:00
Anton Bannykh c6f38ebfbf JS IR: enable scope expansion strategy for JS IR KLIB incremental generation 2020-05-15 19:23:52 +03:00
Anton Yalyshev 59ca626487 Make JPS-based wizards available only for new_module use case 2020-05-15 19:11:47 +03:00
Anton Yalyshev f0ff4b066e Remove old Gradle-based new_project_wizards from the Kotlin group 2020-05-15 19:11:47 +03:00
Toshiaki Kameyama 82d81d5223 Change Signature: move lambda outside of parentheses if the arguments are reordered so that the lambda goes last
#KT-30128 Fixed
2020-05-15 17:58:33 +02:00
Konstantin Tskhovrebov 912fd556e5 Fix commonizer: merge klib manifest dependencies during commonization. 2020-05-15 18:27:13 +03:00
Konstantin Tskhovrebov 32e0ce8779 Disable default platform libs for konanc metadata compilation. 2020-05-15 18:27:13 +03:00
Konstantin Tskhovrebov 17ad0a97d8 Add commonized dependencies to metadata compilation. 2020-05-15 18:27:13 +03:00
Konstantin Tskhovrebov beb59b3075 Refactor: add Project.getMetadataCompilationForSourceSet extension. 2020-05-15 18:27:13 +03:00
Denis Zharkov 5bbb459993 FIR: Refactor FirTowerResolverSession.enumerateTowerLevels
- Leave only onScope callback as onLocalScope/onNonLocalScope are the same in most cases
- Pass towerGroup to callbacks as they are the same all the time
2020-05-15 16:04:44 +03:00
Denis Zharkov 475671563b FIR: Get rid of obsolete local scopes optimizations
They are already filtered out (see FirTowerResolverSession#localScopes initializer)
2020-05-15 16:04:44 +03:00
Denis Zharkov e7a67c7a16 FIR: Extract StandardClassIds.KClass 2020-05-15 16:04:44 +03:00
Denis Zharkov b691b13d8e FIR: Add separate local scopes for blocks 2020-05-15 16:04:44 +03:00
Denis Zharkov b084399b58 FIR: Cleanup local scope tracking 2020-05-15 16:04:44 +03:00
Denis Zharkov e7e84b18cd FIR: Do not retrieve symbol for type construction 2020-05-15 16:04:44 +03:00
Denis Zharkov 25bee057e0 FIR: Do not retrieve file for callable until it's needed 2020-05-15 16:04:44 +03:00
Denis Zharkov 295f7d7500 FIR: Do not add trivial constraints 2020-05-15 16:04:44 +03:00
Denis Zharkov 27aa0040be FIR: Cache supetypes scopes when building callable scopes for qualifier 2020-05-15 16:04:44 +03:00
Denis Zharkov 774c5b55c3 FIR: Avoid creating empty nested classes scopes 2020-05-15 16:04:44 +03:00
Denis Zharkov cd149957ee FIR: Filter out irrelevant local scopes during resolution 2020-05-15 16:04:44 +03:00
Denis Zharkov beb9a72e9d FIR: Optimize constructor of FirTowerResolverSession 2020-05-15 16:04:44 +03:00
Denis Zharkov 2e91bf7e50 FIR: Minor. Clarify name for addNonLocalTowerDataElements 2020-05-15 16:04:44 +03:00
Denis Zharkov 288db4fb1c Revert "FIR: make both ImplicitReceiverStack.get implementations consistent"
This reverts commit b058ca635c.

Change is not necessary anymore since there are no kinds for implicit
receivers
2020-05-15 16:04:44 +03:00
Denis Zharkov 808355d817 FIR: Fix test data for secondary constructor delegation calls
They appeared, after the changes in previous commits at
org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirExpressionsResolveTransformer#transformDelegatedConstructorCall

The idea is that dispatch receiver is available there in old FE, but additional
diagnostic should be reported on it (see KT-38813)

This change was not made intentionaly but it was the easiest way to
support new tower data elements structure and on the other side it's the
correct behavior as for old FE.

Also, if we once would prefer the previous behavior it's still not very
hard to support it
2020-05-15 16:04:44 +03:00
Denis Zharkov f71a56e742 FIR: Fix test data after rewritten scope structure
Mostly, the semantics for statics/companions has been changed there
Fixed test data now is much closer to semantics of old FE
2020-05-15 16:04:44 +03:00
Denis Zharkov f64c12efac FIR: Drop MutableImplicitReceiverStack and its implementation 2020-05-15 16:04:44 +03:00
Denis Zharkov 35e3942afb FIR: Drop unused ImplicitDispatchReceiverKind 2020-05-15 16:04:44 +03:00
Denis Zharkov 0ef1628751 FIR: Refactor scope structure on body resolve stage
Before this change:
- Local scopes, implicit receivers and type parameter scopes were separated.
- Static scopes for super classes were not present as a concept.
Instead of them, all-inherited-static for the current class has been used.
- During call resolution we were processing implicit receivers first and then non-local scopes,
while we should process them in the order of their syntax appearance from the closest
to the most distant

All these facts affect semantics (see test data changed here and the following commits)

The architecture changes are the following:
- FirTowerDataElement introduced as tower level that is used in resolution
  (effectively it's a union type between scope and implicit receiver + isLocal flag)
- FirTowerDataContext introduced for sake of encapsulation of tower data elements' list
  (it also has redundant implicitReceiverStack and localScopes)
- For each regular class we collect relevant tower data elements and add them to the current context
- Also, we preserve a special tower data context for static entities of the class
  (it doesn't have class' dispatch receiver and generic parameters)
2020-05-15 16:04:44 +03:00
Denis Zharkov cee38e0800 FIR: Implement FirScopeProvider.getStaticScope
It will be used in the following commits
2020-05-15 16:04:44 +03:00
Denis Zharkov 5268802d5d FIR: Minor. Move "storeFunction" call to transformSimpleFunction
It's only neede there and also scope structure will be cleaned up after transformFunctionWithGivenSignature
in the following commits
2020-05-15 16:04:44 +03:00
Denis Zharkov 3d6eedc962 FIR: Do not store nested local classes to local scopes 2020-05-15 16:04:44 +03:00
Denis Zharkov 07be2ae5c7 FIR: Use containers structure in FirContractResolveTransformer
transformDeclarationContent call remembers the container
2020-05-15 16:04:44 +03:00
Denis Zharkov a67e9966b8 FIR: Adapt DataFlowAnalyzer to PersistentReceiverStackImpl
It will be used as main implementation in further commits
2020-05-15 16:04:44 +03:00
Denis Zharkov 687a58843f FIR: Rewrite visibility checking
Unbound it from implicit receiver stack as it only needs scope structure/declaration nestedness
Semantics for protected has been changed in a way it works in old FE

NB: We should report additional diagnostic in case of CallCompanionProtectedNonStatic.fir.kt
(see KT-38814)
2020-05-15 16:04:44 +03:00
Denis Zharkov 825cdd3841 FIR: Move PersistentImplicitReceiverStack to resolve module 2020-05-15 16:04:44 +03:00
Denis Zharkov e8232fe471 FIR: Remove unused TowerGroupKind.Static 2020-05-15 16:04:44 +03:00