Commit Graph

54382 Commits

Author SHA1 Message Date
Simon Ogorodnik 93cb23a498 Raw FIR: support type placeholders 2019-04-30 18:45:36 +03:00
Simon Ogorodnik 0e0c188e05 Rebuild fir-provider indexes on changes 2019-04-30 18:45:36 +03:00
Simon Ogorodnik 5f0fe4785d Implement FirProvider consistency checker 2019-04-30 18:45:35 +03:00
Simon Ogorodnik 1dae135840 Expand ConeTypeContext, implement FIR type inference & related checkers 2019-04-30 18:45:35 +03:00
Simon Ogorodnik f1eb66819b Revert "FIR body resolve: support variable assignments"
Performed to make long branch rebasing easier
This reverts commit af8c3788
2019-04-30 18:45:35 +03:00
Simon Ogorodnik 935c21f906 FIR scopes: use use-site member scopes for imports 2019-04-30 18:45:35 +03:00
Simon Ogorodnik 3533541702 Provide class use-site scopes from FirSymbolProviders 2019-04-30 18:45:34 +03:00
Simon Ogorodnik 1cd25da7af FIR scope processors: add function to check is stop on ProcessorAction 2019-04-30 18:45:34 +03:00
Simon Ogorodnik 082e9d1cd7 FIR Java: implement knownClassNamesInPackage optimization 2019-04-30 18:45:34 +03:00
Yanis Batura a51b7fb8d0 Fix typos 2019-04-30 18:42:07 +03:00
Leonid Startsev 0ecf20bd62 Revert back visibility in deserialization ctor to public so inheritors can access it from other modules.
Fix instantiating of polymorphic serializer with generics.
Move context creation below as asked.
2019-04-30 17:53:40 +03:00
Dmitriy Dolovov 3610c99163 Move IDE-related CIDR modules into 'ide' directory 2019-04-30 21:32:21 +07:00
Svyatoslav Kuzmich 379cb08226 [JS] Reduce usage of 'js' function in stdlib
Function 'kotlin.js.js' is to be redesigned in JS IR backend,
partially because it is a hard feature to support.

Current implementation is unstable and can cause problems around
 inlining and name generator. Luckily most of its use-cases
can be covered by simpler features like dynamic expressions and
external declarations.

Thus we are reducing it's usage in stdlib to make IR backend more
stable in current state. JavaScript features that can't be covered by dynamic expression are
implemented in 'jsOperators.kt' file respectively for each backend:

 - 'internal inline' function which calls 'js' function inside for current
   pre-IR backend

 - 'internal' function with '_hack' parameters for JS IR backend which will be
   later intinsicified in a compiler
2019-04-30 15:27:19 +03:00
Alexander Udalov e22594acde JVM IR: slightly change field renaming convention implementation
Prefer to rename fields from the class, not from the companion, to be
more in line with the old backend's behavior. This has no effect on the
behavior of current tests but removes differences in metadata (since
metadata has information about every property->field mapping) in some of
them
2019-04-30 13:15:29 +02:00
Alexander Udalov 6cc293a0c5 JVM IR: record FIELD_FOR_PROPERTY for property delegates
Delegated properties now have their $delegate fields recorded in the
metadata (in `ClassCodegen.generateField`). This part of metadata is
used by `KPropertyN.getDelegate` functions, so almost all tests on
getDelegate are now unmuted
2019-04-30 13:15:29 +02:00
Alexander Udalov 5aae832c5f Minor, update doc on -Xsanitize-parentheses
The ASM issue with parentheses was fixed in
https://gitlab.ow2.org/asm/asm/commit/02f00c4a82d9252b34d08dad47c540309fda3b7e

 #KT-29475
2019-04-30 13:15:29 +02:00
Alexander Udalov bd6e90f302 FIR: remove dependency of :compiler:fir:resolve on :compiler:cli 2019-04-30 12:01:23 +02:00
pyos c77e8a8c2d JVM_IR: remove another redundant lowering 2019-04-30 08:20:37 +02:00
Dmitriy Dolovov c017ef9bc8 Properly detect Kotlin/Native libraries
Issue #KT-30598 fixed
2019-04-30 13:05:22 +07:00
Dmitriy Dolovov 20d77afcce Refactor Kotlin/Native path constants
Use java.io.File instead of java.nio.Path to have more uniform API
2019-04-30 13:05:14 +07:00
Dmitriy Dolovov 2ef7cde34b Add tests for "lite" API for Kotlin/Native libraries 2019-04-30 13:05:06 +07:00
Dmitriy Dolovov 07f6059f44 Refactor "lite" API for Kotlin/Native libraries 2019-04-30 13:04:56 +07:00
Andrey Uskov 6039d86388 Importing projects with granular metadata is partially supported
(except k-lib data format of metadata libraries and multiple target
platforms per source set)
2019-04-29 19:49:18 +03:00
Andrey Uskov 998a24414a Improved parsing of internal compiler arguments with boolean state in
case when the argument is listed twice in the list of command line
arguments. The last value will be used.
#KT-27181 Fixed
2019-04-29 19:48:01 +03:00
Andrey Uskov affe8baf74 Fix import with jps enabled. kotlin-js-ir and kotlin-test-js-ir were
removed from jps build
2019-04-29 19:45:01 +03:00
Mikhael Bogdanov 0482f7e9c5 Restrict general compare intrinsic optimization to CompareTo intrinsic 2019-04-29 16:27:35 +02:00
Simon Ogorodnik 51f5042315 Fix FIR compilation 2019-04-29 16:51:39 +03:00
Mikhail Glukhikh b8e6291265 Inference: use generic version of error type in type approximator 2019-04-29 16:51:39 +03:00
Simon Ogorodnik db8bd8c197 Fix check isCapturedTypeFromSubtyping to support KotlinTypeMarkers 2019-04-29 16:51:38 +03:00
Simon Ogorodnik aabc9fa10f Abstract PostponedResolvedAtom & buildCurrentSubstitutor 2019-04-29 16:51:37 +03:00
Simon Ogorodnik 58029830f0 Skip star-projection to avoid failures 2019-04-29 16:51:37 +03:00
Simon Ogorodnik 2ea7fb8801 Cleanup ConstraintStorage.buildResultingSubstitutor 2019-04-29 16:51:36 +03:00
Simon Ogorodnik 57a3b1a773 Abstract TypeApproximator from NewCapturedType 2019-04-29 16:51:36 +03:00
Simon Ogorodnik 9306f3840f Abstract buildResultingSubstitutor & ResultTypeResolver from KotlinType 2019-04-29 16:51:35 +03:00
Simon Ogorodnik fe2e5b7301 Abstract FlatSignature from kotlin types 2019-04-29 16:51:34 +03:00
Simon Ogorodnik 8e595f015e Initial OverloadingConflictResolver abstraction from KotlinTypes 2019-04-29 16:51:34 +03:00
Simon Ogorodnik 9a1678728d Implement inference context and simple components 2019-04-29 16:51:33 +03:00
Simon Ogorodnik 04324b6723 Provide overloads with explicit resolutionFacade for resolutionApi
To ensure stable results of subsequent resolution api method calls,
it is require to provide same resolution facade, as
getResolutionFacade function doesn't guarantee to have same result in
subsequent calls due to soft caching
2019-04-29 16:51:32 +03:00
Roman Elizarov 1e5d973bb1 Fix CoroutineContext documentation with respect to equality
KT-26398 had updated behavior from reference comparison to regular
equality, but the documentation for CoroutineContext was left out.
The whole "by reference" needs to be removed, because it now
follows default behavior of all Kotlin collections and need no
further clarification.
2019-04-29 16:33:22 +03:00
Vyacheslav Gerasimov 389490ad79 Build: resolve :idea project resources lazily in ultimate plugin
to avoid using `evaluationDependsOn`
2019-04-29 16:23:16 +03:00
Vyacheslav Gerasimov c218385ba8 Build: Collect sources for compiler lazily to avoid evaluationDependsOn 2019-04-29 16:23:16 +03:00
Vyacheslav Gerasimov 8851029baa Build: Use embedded configuration for compiler plugins 2019-04-29 16:23:16 +03:00
Vyacheslav Gerasimov 50e145f239 Build: remove various evaluationDependsOn calls across the build
`evaluationDependsOn` may lead to obscure gradle errors on project configuration
2019-04-29 16:23:16 +03:00
Vyacheslav Gerasimov 0ec1df89fa Build: use configuration for dependency on android-extensions-runtime
`evaluationDependsOn` may lead to obscure gradle errors on project configuration
2019-04-29 16:23:16 +03:00
Vyacheslav Gerasimov b3720a55d2 Build: Make root ideaPlugin task depend on :prepare:idea-plugin
Since it's only one left in the project
2019-04-29 16:23:16 +03:00
Mikhail Glukhikh 3f6be95801 Include FIR modules into compiler #KT-30243 Fixed
(cherry picked from commit 053aa8ca1e)
2019-04-29 16:23:16 +03:00
Nicolay Mitropolsky bd16c4629a KotlinElementActionsFactory.createChangeModifierActions modernisation
to allow IDEA relatively safely remove `createChangeModifierActions(target: JvmModifiersOwner, request: MemberRequest.Modifier)` in 192
2019-04-29 16:18:14 +03:00
Jiaxiang Chen 4b99d85322 Optimize JVM byte code generation for conditional conjunction
Implement an intrinsic method for boolean.and operation, and replace
ANDAND condition with a call to such intrinsic method.
2019-04-29 13:28:18 +02:00
Vasily Levchenko 53493657ff [kotlin-native-shared][version]bump 2019-04-29 14:08:16 +03:00
Nikolay Krasko 07ea0ffe16 Reformat and clean up idea.actions.internal 2019-04-29 12:13:18 +03:00