Commit Graph

80218 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy bb2e9e2d56 Extract new method from the publicly used interface for compatibility
Note that we can't just use ``@JvmDefault` annotation as the main change
 is in the `core` module which targets Java 6

 #KT-42259 Fixed
2020-10-27 14:14:39 +03:00
Georgy Bronnikov 344b865232 IrFunctionReference.fromSymbolDescriptor
(cherry picked from commit f9b70d2fa8649132ba344a9983553835c4afb3dd)
2020-10-27 11:07:44 +01:00
Georgy Bronnikov db9e3c9085 IrDelegatingConstructorCall.fromSymbolDescriptor
(cherry picked from commit 7c8a598c36165a9f6f15e5dcd87acd44008c1400)
2020-10-27 11:07:44 +01:00
Georgy Bronnikov 3087bdea22 IrCall.fromSymbolDescriptor
(cherry picked from commit a1d3e915465ea3c5f35657fe2dcc81f9e7b6a28e)
2020-10-27 11:07:44 +01:00
Alexander Dudinsky 0e7e657657 Migrate MultiModuleLineMarkerTest to the new CodeMetaInfo test infrastructure 2020-10-27 12:31:45 +03:00
Alexander Dudinsky 94bf38a7b5 Added support for various platforms for CodeMetaInfo tests. ^KT-41996
The tests need to be able to parse and render CodeMetaInfo for different
 platforms. For example, we must draw a run gutter a MAC application on
 OSX, but for a Win application, the gutter should not be drawn at the
 same time. This commit allows to do such checks. In order to indicate
 on which platform it should be rendered, it is necessary to specify the
 platform for a specific CodeMetaInfo in the test data in the format
 {OSX,Unix,Win}, if the block with platforms is missing, this means
 that it should be rendered on each platform.

<!LINE_MARKER{OSX}(...)!> - should only be on OSX
<!LINE_MARKER(...)!> - should be on any platform
2020-10-27 12:31:18 +03:00
Alexander Dudinsky 84d24e5b76 Migrate MultiplatformAnalysisTest to new test runner 2020-10-27 12:23:50 +03:00
Alexander Dudinsky ac98bc9853 New highlighting/line markers/diagnostics test infrastructure
The current test framework has a number of shortcomings, such as
different markups for different kinds, those formats can not be
mixed in one test file, lacks composability, re-use of it is complicated
This commit contains the first version of the new test runner
to which tests will be migrated in the future.
2020-10-27 12:23:50 +03:00
Yan Zhulanow 994cb6f28e Update deprecation message for the Android Extensions plugin 2020-10-27 18:08:39 +09:00
Igor Chevdar d67067a49e [IR] Supported non-reified typeOf 2020-10-27 11:48:11 +03:00
Toshiaki Kameyama 5e9333773c Remove explicit type arguments: don't report when type argument has annotations
#KT-40985 Fixed
2020-10-27 15:44:44 +07:00
nataliya.valtman e1a380ec95 KT-34862 use relative path for incremental build cache 2020-10-27 10:45:06 +03:00
Mikhail Glukhikh 09043fb98d [FIR] JvmMappedScope: add mutable methods or not depending on a class 2020-10-27 10:27:06 +03:00
Mikhail Glukhikh 5c3269f489 [FIR] JvmMappedScope: don't add Java methods if Kotlin ones are here 2020-10-27 10:26:55 +03:00
Toshiaki Kameyama ce407471ec Convert to secondary constructor: suggest on class name
#KT-40861 Fixed
2020-10-27 14:05:28 +07:00
Alexander Shabalin 1aef9da517 Extract memory manager into a separate module (#4446) 2020-10-27 09:48:09 +03:00
Ivan Gavrilovic 2c5c15f503 Clean-up outputs on non-incremental run
Always clean all outputs on non-incremental run of the
Kotlin compile task.
#KT-38692 Fixed
2020-10-27 09:44:06 +03:00
Igor Chevdar d12669f926 [IR] More agressive psi2ir for klib producing 2020-10-27 08:01:10 +03:00
Igor Chevdar 53e4effd05 [IR] Refactored Psi2Ir for klibs 2020-10-27 08:01:10 +03:00
Igor Chevdar eec9e6b8d5 Refactored LlvmModuleSpec 2020-10-27 08:01:10 +03:00
Igor Chevdar 91e457f07a [IR] Replaced compilation errors with just exceptions 2020-10-27 08:01:10 +03:00
Igor Chevdar 5b457eadb1 [IR] Extracted different backend checks into a separate pass 2020-10-27 08:01:10 +03:00
Igor Chevdar e7441037f6 [tests] Added samples for compiler checks 2020-10-27 08:01:10 +03:00
Abduqodiri Qurbonzoda 2fd7d64db0 Promote CancellationException to stable #KT-41837 2020-10-27 05:06:50 +03:00
Vasily Levchenko 44358697f8 [kotlin compiler][update] isPublicApi 2020-10-26 19:12:20 +01:00
Vasily Levchenko b3c1c30f2e [kotlin compiler][update] adoption [type,value]ArgumentCount 2020-10-26 19:12:20 +01:00
Alexander Udalov 297361f0c8 IR: remove FunctionLoweringPass, refactor usages to FileLoweringPass
FunctionLoweringPass didn't add much value over FileLoweringPass, but
had a hidden footgun (like ClassLoweringPass) in that if your lowering
pass invoked a visitor/transformer on the function body and you forgot
to override visitFunction to stop visiting nested functions,
runOnFilePostfix would work with the complexity of the squared number of
nesting levels. It looks like this was happening with K/N's
DataClassOperatorsLowering (I haven't measured though).

(cherry picked from commit 822410a647560826e8cce96921eae32f237cf335)
2020-10-26 19:12:20 +01:00
Alexander Udalov 306fd2ae07 IR: refactor DeclarationTransformer
Do not create extra DeclarationTransformer and FileLoweringPass
instances, instead inline all transformations to
DeclarationTransformer.lower.

(cherry picked from commit 7d0e643c92d1f42ed4ae8fc350da1c92d3e2b2ae)
2020-10-26 19:12:20 +01:00
Leonid Startsev f4f8763f4d Pass project instance while creating descriptor serializer
(cherry picked from commit 42ff47ec3272af57edb028877f7eeff411c69dca)
2020-10-26 19:12:20 +01:00
Mikhail Glukhikh 025c4b3850 Use special generic signatures from compiler.common.jvm
(cherry picked from commit 1c14b71f707465265326e89d3858c0ab364c950f)
2020-10-26 19:12:20 +01:00
Georgy Bronnikov 4aa73c5b35 Adapt to changes in Scope.kt
(cherry picked from commit 9bafee3bf0393e6a25f2ee2f610b553392acc492)
2020-10-26 19:12:20 +01:00
Georgy Bronnikov c5ff865529 EnumConstructorCall.fromSymbolDescriptor
(cherry picked from commit 97f1bfae30e80d0a73cd691a1de71a3bd5032028)
2020-10-26 19:12:20 +01:00
Alexander Gorshenev 38fbb7480a K/N counterpart for private fake overrides construction on klib load
(cherry picked from commit 7f51998848204f2ca8e4f94100f942d9b3d4cf14)
2020-10-26 19:12:20 +01:00
Vasily Levchenko 1bdd07d24d [kotlin compiler][update] 1.4.30-dev-1895
* 0a18be62e5 - (HEAD -> master, tag: build-1.4.30-dev-1895, origin/master, origin/HEAD) Add prefix for inner test classes in ide perf tests to avoid metric name clashes (vor 17 Stunden) <Vladimir Dolzhenko>
* 08b8939b80 - (tag: build-1.4.30-dev-1887) IR: make IrSymbol.isPublicApi an extension (vor 3 Tagen) <Alexander Udalov>
* 4bd08e5e0c - IR: clear callToSubstitutedDescriptorMap for each file to avoid leaking memory (vor 3 Tagen) <Alexander Udalov>
* 7ac981d4d3 - Psi2ir: refactor ModuleGenerator.generateModuleFragment (vor 3 Tagen) <Alexander Udalov>
* 7b53d668ab - (tag: build-1.4.30-dev-1883) Fix test after 4f06162446 (vor 3 Tagen) <Victor Petukhov>
* c07f25fa44 - (tag: build-1.4.30-dev-1882) Revert "FoldInitializerAndIfToElvisInspection: don't add explicit type if var is used as non-nullable" (vor 3 Tagen) <Yan Zhulanow>
* 87574dddd9 - Revert "ReplaceWith: suggest for "invoke" extension" (vor 3 Tagen) <Yan Zhulanow>
* 04457e92d0 - Revert ""Put/Join arguments/parameters" intention: don't suggest on nested argument list" (vor 3 Tagen) <Yan Zhulanow>
* 3321ce6325 - Revert ""Code Cleanup": don't remove deprecated imports when file has `@file:Suppress("DEPRECATION")` annotation" (vor 3 Tagen) <Yan Zhulanow>
* 839c30d04b - Revert "Additional minor fixes for KT-33594: avoid using hard-coded annotation name, simplify hasAnnotationToSuppressDeprecation()" (vor 3 Tagen) <Yan Zhulanow>
* 9320637efe - Revert "Redundant companion reference: do not report 'values/valueOf' function in enum" (vor 3 Tagen) <Yan Zhulanow>
* 383190f25e - Revert "Replace with ordinary assignment: do not suggest when operator is augmented assignment operator function" (vor 3 Tagen) <Yan Zhulanow>
* 7fccd0153b - Revert "Refactoring: Remove hard-coded augmented assignment check with a Name check" (vor 3 Tagen) <Yan Zhulanow>
* 0ae21a157f - Revert ""Change to return with label" quick fix: apply for type mismatch" (vor 3 Tagen) <Yan Zhulanow>
* 601198634d - Revert "Minor: Extract lambda return expression handling" (vor 3 Tagen) <Yan Zhulanow>
* b18de1e3ff - Revert "Provide quickfix for specifying type of variable initialized with null" (vor 3 Tagen) <Yan Zhulanow>
* 4327bc4ac3 - Revert "KT-23394: Add a test with a property" (vor 3 Tagen) <Yan Zhulanow>
* fe64fcf8a3 - Revert "Minor: update order in IntentionTestGenerated" (vor 3 Tagen) <Yan Zhulanow>
* c4a48598c0 - Revert ""Add parameter to function" for TYPE_MISMATCH: fix it works correctly for extension function" (vor 3 Tagen) <Yan Zhulanow>
* 16dbf7ba74 - Revert "Convert to range check: don't report it if recursive call will be created" (vor 3 Tagen) <Yan Zhulanow>
* d735637f1e - Revert "RemoveBracesIntention: add new line for long expression" (vor 3 Tagen) <Yan Zhulanow>
* f615ed2f26 - Revert ""Use destructuring declaration": fix it works correctly if variable name is shadowed" (vor 3 Tagen) <Yan Zhulanow>
* ab70cc35ea - Revert "Add quick fix for 'JAVA_CLASS_ON_COMPANION'" (vor 3 Tagen) <Yan Zhulanow>
* 6cc4d70b07 - Revert "Minor: Remove hard-coded 'Companion' name" (vor 3 Tagen) <Yan Zhulanow>
* 19f518c037 - Revert "IfThenToSafeAccessInspection: fix it works correctly for variable/operator call" (vor 3 Tagen) <Yan Zhulanow>
* 19896f9616 - Revert "Minor: Use second pattern argument instead of explicit `callee.text`" (vor 3 Tagen) <Yan Zhulanow>
* 519f92599c - Revert "Minor: Import DebuggerUtils" (vor 3 Tagen) <Yan Zhulanow>
* 9b2aa0951b - (tag: build-1.4.30-dev-1880) [box-tests] Turned on tests on typeof for K/N (vor 3 Tagen) <Igor Chevdar>
* 9d1cb6a2c0 - Turned off TypeOfChecker for K/N (vor 3 Tagen) <Igor Chevdar>
* 4f06162446 - (tag: build-1.4.30-dev-1879) Get a callable reference expression to report an error on it properly, taking into account possible wrapping (vor 3 Tagen) <Victor Petukhov>
* cb020fb9f4 - (tag: build-1.4.30-dev-1873) Change repository adding logic (vor 3 Tagen) <Ilya Muradyan>
* 7062bf5737 - (tag: build-1.4.30-dev-1872) [JS_IR] Additional check on loop label to not persist name for labeled loop (vor 3 Tagen) <Ilya Goncharov>
* 1a9e516dc0 - (tag: build-1.4.30-dev-1871) [ir-plugin] Referenced binary operators with the new API (vor 3 Tagen) <Igor Chevdar>
* 23d12a717e - (tag: build-1.4.30-dev-1866) [box-tests] Added a test (vor 3 Tagen) <Igor Chevdar>
* 27aed0ccbc - [IR] Inliner: erase non-reified parameters for casts (vor 3 Tagen) <Igor Chevdar>
* 27fb46712a - (tag: build-1.4.30-dev-1865) [JVM+IR] Unify new debugger tests expectations (vor 3 Tagen) <Kristoffer Andersen>
* e19ecdfb3d - [Tests] Suspend Codegen Tests Improvements (vor 3 Tagen) <pyos>
* 3291f8455b - [JVM+IR] Update straight-forward LVT tests (vor 3 Tagen) <Kristoffer Andersen>
* 2c9bf95227 - [JVM+IR] New LVT debugging test harness improvements (vor 3 Tagen) <Kristoffer Andersen>
* 4479bf0933 - (tag: build-1.4.30-dev-1862) [JS_IR] Enum constructor copy parameters with mapping by index (vor 3 Tagen) <Ilya Goncharov>
* 2790bc1105 - (tag: build-1.4.30-dev-1856) Split perf test json reports in a separate files/docs (vor 3 Tagen) <Vladimir Dolzhenko>
* d7a783e077 - Add prefix for inner test classes (vor 3 Tagen) <Vladimir Dolzhenko>
* 58f606e1f5 - (tag: build-1.4.30-dev-1854) Minor: Import DebuggerUtils (vor 3 Tagen) <Yan Zhulanow>
* 55e36fa1ab - Minor: Use second pattern argument instead of explicit `callee.text` (vor 3 Tagen) <Yan Zhulanow>
* 5095caee50 - IfThenToSafeAccessInspection: fix it works correctly for variable/operator call (vor 3 Tagen) <Toshiaki Kameyama>
* 871ad2b909 - Minor: Remove hard-coded 'Companion' name (vor 3 Tagen) <Yan Zhulanow>
* 15a615d63b - Add quick fix for 'JAVA_CLASS_ON_COMPANION' (vor 3 Tagen) <Toshiaki Kameyama>
* d61158a176 - "Use destructuring declaration": fix it works correctly if variable name is shadowed (vor 3 Tagen) <Toshiaki Kameyama>
* f4b9c4777f - RemoveBracesIntention: add new line for long expression (vor 3 Tagen) <Toshiaki Kameyama>
* 731848849e - Convert to range check: don't report it if recursive call will be created (vor 3 Tagen) <Toshiaki Kameyama>
* 03e725d5da - "Add parameter to function" for TYPE_MISMATCH: fix it works correctly for extension function (vor 3 Tagen) <Toshiaki Kameyama>
* 6515d53b94 - Minor: update order in IntentionTestGenerated (vor 3 Tagen) <Yan Zhulanow>
* f2dc132d5d - KT-23394: Add a test with a property (vor 3 Tagen) <Yan Zhulanow>
* cdf7f46ce1 - Provide quickfix for specifying type of variable initialized with null (vor 3 Tagen) <Toshiaki Kameyama>
* 55038e19ec - Minor: Extract lambda return expression handling (vor 3 Tagen) <Yan Zhulanow>
* f76e98868c - "Change to return with label" quick fix: apply for type mismatch (vor 3 Tagen) <Toshiaki Kameyama>
* 016e78e483 - Refactoring: Remove hard-coded augmented assignment check with a Name check (vor 3 Tagen) <Yan Zhulanow>
* 73e319ca7a - Replace with ordinary assignment: do not suggest when operator is augmented assignment operator function (vor 3 Tagen) <Toshiaki Kameyama>
* 55d55446c8 - Redundant companion reference: do not report 'values/valueOf' function in enum (vor 3 Tagen) <Toshiaki Kameyama>
* 2a841550d4 - Additional minor fixes for KT-33594: avoid using hard-coded annotation name, simplify hasAnnotationToSuppressDeprecation() (vor 3 Tagen) <Yan Zhulanow>
* cf5a6274e2 - "Code Cleanup": don't remove deprecated imports when file has `@file:Suppress("DEPRECATION")` annotation (vor 3 Tagen) <Toshiaki Kameyama>
* 4a328981c6 - "Put/Join arguments/parameters" intention: don't suggest on nested argument list (vor 3 Tagen) <Toshiaki Kameyama>
* be194c3460 - ReplaceWith: suggest for "invoke" extension (vor 3 Tagen) <Toshiaki Kameyama>
* bb7d4c224f - FoldInitializerAndIfToElvisInspection: don't add explicit type if var is used as non-nullable (vor 3 Tagen) <Toshiaki Kameyama>
* 3e632d074e - Enable Parcelize IDE plugin in Android Studio 4.2 (KT-42859) (vor 3 Tagen) <Yan Zhulanow>
* 47a4bd1701 - (tag: build-1.4.30-dev-1852) [FIR Java] Look into type arguments during dependent type parameter search (vor 3 Tagen) <Mikhail Glukhikh>
* 7f3d0af4f7 - [FIR Java] Soften rules for matching types for may-be-special-builtins (vor 3 Tagen) <Mikhail Glukhikh>
* 81529a835b - Drop FirAbstractOverrideChecker.isEqualTypes (vor 3 Tagen) <Mikhail Glukhikh>
* abc2866902 - [FIR] Fold flexible types after substitution if possible (vor 3 Tagen) <Mikhail Glukhikh>
* acb03cb28c - [FIR2IR] Expand type during super qualifier search (vor 3 Tagen) <Mikhail Glukhikh>
* c50aa5f2ec - [FIR TEST] Bad test data changes due to Java signature transformation (vor 3 Tagen) <Mikhail Glukhikh>
* d3e85dbce0 - [FIR] Implement replacing Object with type parameters for specials builtins (vor 3 Tagen) <Mikhail Glukhikh>
* d40248cb53 - [FIR] Extract computeJvmDescriptorReplacingKotlinToJava (vor 3 Tagen) <Mikhail Glukhikh>
* f866eff93e - Extract special generic signatures to compiler.common.jvm to reuse in FIR (vor 3 Tagen) <Mikhail Glukhikh>
* 0e7acd6e8b - [FIR Java] Add better type parameter erasure for override matching (vor 3 Tagen) <Mikhail Glukhikh>
* 17de486c23 - [FIR Java] Drop nasty code providing type parameter erasure (vor 3 Tagen) <Mikhail Glukhikh>
* 999627952a - (tag: build-1.4.30-dev-1851) [Gradle, K/N] Add proper assumptions for Mac only integration tests (vor 4 Tagen) <Alexander Likhachev>
* ac7b7abcc0 - [Gradle, JS] Fix K/JS project build with configuration cache (part 3) (vor 4 Tagen) <Alexander Likhachev>
* 97d39c102a - (tag: build-1.4.30-dev-1835) Fix BWC for Search utils (vor 4 Tagen) <Igor Yakovlev>
* 71023cd596 - (tag: build-1.4.30-dev-1834) [KT-40688] Inlay Hints: inlay hints are duplicated on code editing (vor 4 Tagen) <Andrei Klunnyi>
* b7a07fdf03 - (tag: build-1.4.30-dev-1832) Review fix: unify irTemporary variants (vor 4 Tagen) <Georgy Bronnikov>
* 8e331c8afe - IR: relax type cast for WrappedVariableDescriptor.containingDeclaration (vor 4 Tagen) <Georgy Bronnikov>
* b588839752 - EnumConstructorCall.fromSymbolDescriptor (vor 4 Tagen) <Georgy Bronnikov>
* 887dd10764 - IR: remove descriptor usage (vor 4 Tagen) <Georgy Bronnikov>
* e5cf7a1be7 - Remove descriptor usage from Scope.kt (vor 4 Tagen) <Georgy Bronnikov>
* 8d999a2c13 - Disable kx.ser plugin inside descriptors serialization in the IDE (vor 4 Tagen) <Leonid Startsev>
* 4ec90b18bc - Rework DescriptorSerializerPlugin to be a part of Project's extensions (vor 4 Tagen) <Leonid Startsev>
* ef907e0c46 - (tag: build-1.4.30-dev-1821) Fix FIR IDE test broken by Jinseong commit (vor 4 Tagen) <Mikhail Glukhikh>
* ad12cc296b - (tag: build-1.4.30-dev-1816) [FIR] Expand type before adding equality constraint (vor 4 Tagen) <Mikhail Glukhikh>
* 7815529eed - (tag: build-1.4.30-dev-1811) [Private fake overrides] Tests for private fake overrides construction (vor 4 Tagen) <Alexander Gorshenev>
* 294e7dd902 - [Private fake overrides] Renamed FakeOverrideBuilder object to FakeOverrideBuilderForLowering (vor 4 Tagen) <Alexander Gorshenev>
* 81c06b24f7 - [Private fake overrides] Private fake overrides linkage (vor 4 Tagen) <Alexander Gorshenev>
* 223d1dd5e6 - [Private fake overrides] Private fake override construction (vor 4 Tagen) <Alexander Gorshenev>
* c90556a883 - [Private fake overrides] FakeOverrideDeclarationTable for private fake override construction (vor 4 Tagen) <Alexander Gorshenev>
* 623f9a54c6 - [Private fake overrides] Tweak DeclarationTable to be open (vor 4 Tagen) <Alexander Gorshenev>
* c7ea8b1ab6 - [Private fake overrides] Prepare IdSignature for private fake override construction (vor 4 Tagen) <Alexander Gorshenev>
* 91089f5f7a - (tag: build-1.4.30-dev-1810) IrValidator: add more details to duplicate message for type parameter (vor 4 Tagen) <Mikhail Glukhikh>
* 44bb12480b - [FIR2IR] Forbid private fake overrides in generator (vor 4 Tagen) <Mikhail Glukhikh>
* 3663bc6be3 - FirClassSubstitutionScope: eliminate second constructor to simplify code (vor 4 Tagen) <Mikhail Glukhikh>
* 80f8b5b234 - IrValidator: mention file in exception message (vor 4 Tagen) <Mikhail Glukhikh>
* 23e7468e57 - [FIR2IR] Cache Java field-based properties more correctly #KT-42805 Fixed (vor 4 Tagen) <Mikhail Glukhikh>
* 3576cbf0d8 - [FIR] Add test for KT-42805 (vor 4 Tagen) <Mikhail Glukhikh>
* f2c651ec9c - [FIR2IR] Don't generate Any delegated members for data class (vor 4 Tagen) <Mikhail Glukhikh>
* 44459e8ac7 - FIR mangler: fix alias-based type handling #KT-42770 Fixed (vor 4 Tagen) <Mikhail Glukhikh>
* 6251568e17 - (tag: build-1.4.30-dev-1807) Fix test after 84129098cb (vor 4 Tagen) <Victor Petukhov>
* 289efd47b2 - (tag: build-1.4.30-dev-1805) [FIR2IR] Cleanup code around implicit casts (vor 4 Tagen) <Mikhail Glukhikh>
* 620a5d404d - [FIR2IR] Keep redundant cast on 'this' for local anonymous function (vor 4 Tagen) <Juan Chen>
* f4531b0f34 - FIR: set missed source in various FirElements (vor 4 Tagen) <Jinseong Jeon>
* 46cc01602e - FIR2IR: add implicit NOT_NULL cast if needed (vor 4 Tagen) <Jinseong Jeon>
* eeda48e63e - (tag: build-1.4.30-dev-1803) Allow prefix and relative path in resolvable properties. (vor 4 Tagen) <Sergey Bogolepov>
* 84129098cb - (tag: build-1.4.30-dev-1792) Add equality constraints without subtyping (vor 5 Tagen) <Victor Petukhov>
* b1b87becc8 - (tag: build-1.4.30-dev-1791) PSI2IR more JVM-like exhaustive when behavior KT-36840 (vor 5 Tagen) <Dmitry Petrov>
* 7edeccbdc7 - (tag: build-1.4.30-dev-1787) Move labeling into NameTables with labeling loops which contain escaped break (vor 5 Tagen) <Ilya Goncharov>
* 400a15e3d6 - Add lowering on switch in loop (vor 5 Tagen) <Ilya Goncharov>
* 14d9aa1660 - Add test on break in when without label (vor 5 Tagen) <Ilya Goncharov>
* a4b67f007f - (tag: build-1.4.30-dev-1784) JVM_IR: treat suspend-converted references as lambdas for inlining (vor 5 Tagen) <pyos>
* 12bec7cca2 - JVM_IR: when convering references to lambdas, bind the receiver (vor 5 Tagen) <pyos>
* 95fb597da0 - PSI2IR / FIR2IR: bind FunctionN as receiver when suspend-converting (vor 5 Tagen) <pyos>
* ccf921510d - PSI2IR / FIR2IR: do not create temporaries for adapted references (vor 5 Tagen) <pyos>
* 369056ca5d - Minor, add explicit type argument to workaround KT-42175 (vor 5 Tagen) <Alexander Udalov>
* 29aaf70d21 - (tag: build-1.4.30-dev-1783) Launch common tests on local JVM via run gutter (vor 5 Tagen) <Kirill Shmakov>
* 1c1e8f7beb - (tag: build-1.4.30-dev-1777) FIR CFG: revise edge kind between local func node and fun enter node (vor 5 Tagen) <Jinseong Jeon>
* ce8d983b2a - (tag: build-1.4.30-dev-1776) Fix test after the fix for KT-17691 (vor 5 Tagen) <Pavel Punegov>
* 0b34526321 - JVM_IR remove lambda hack required for odd JVM+OI behavior in KT-35849 (vor 5 Tagen) <Dmitry Petrov>
* ad88c60fd8 - (tag: build-1.4.30-dev-1772) [JVM_IR] Copy offsets from the original function to invokeSuspend. (vor 5 Tagen) <Mads Ager>
* 800bfe2cdb - (tag: build-1.4.30-dev-1770) [TEST] Update testdata broken in c2d3a252 (vor 5 Tagen) <Dmitriy Novozhilov>
* c2d3a252a8 - (tag: build-1.4.30-dev-1767) Mute very strange failing of FIR find usages test (vor 5 Tagen) <Dmitriy Novozhilov>
* 0484ab8cca - Don't unwrap captured types in IDE descriptors renderers (vor 5 Tagen) <Dmitriy Novozhilov>
* 3068d79d2b - [FIR-IDE] Add lock for status resolve (vor 5 Tagen) <Dmitriy Novozhilov>
* 6550bd09b1 - [FIR] Ensure class resolve phase in status resolve (vor 5 Tagen) <Dmitriy Novozhilov>
* 699dd54be9 - [FIR] Don't inherit some declaration modifiers (like `tailrec`) (vor 5 Tagen) <Dmitriy Novozhilov>
* bf1a00c73a - [FIR] Rework resolution of declaration statuses (vor 5 Tagen) <Dmitriy Novozhilov>
* 0b8116dff0 - [FIR] Change some phase requirements: STATUS -> DECLARATIONS (vor 5 Tagen) <Mikhail Glukhikh>
* 275260720d - Add replacePhase in FirTypeResolveTransformer.transformEnumEntry (vor 5 Tagen) <Mikhail Glukhikh>
* c171dafd91 - FIR serializer: always normalize visibility (vor 5 Tagen) <Mikhail Glukhikh>
* 1ff5da5f41 - [FIR] Add forgotten fake override type calculation (vor 5 Tagen) <Dmitriy Novozhilov>
* 5c55f67923 - (tag: build-1.4.30-dev-1748) JVM_IR: generate shorter names for classes in delegate initializers (vor 6 Tagen) <pyos>
* b786cf7559 - [IR] Made signature nullable (#3860) (vor 6 Tagen) <LepilkinaElena>
* 6a9c72e77c - IR: use one traversal instead of two for DeclarationContainerLoweringPass (vor 6 Tagen) <Alexander Udalov>
* b5695188f9 - IR: remove FunctionLoweringPass, refactor usages to FileLoweringPass (vor 6 Tagen) <Alexander Udalov>
* c110031935 - IR: refactor DeclarationTransformer (vor 6 Tagen) <Alexander Udalov>
* 2be7afc7f9 - IR: minor, give names to anonymous lowering visitors (vor 6 Tagen) <Alexander Udalov>
* 3979cde738 - (tag: build-1.4.30-dev-1743) Add box and PSI2IR tests for special cases listed in KT-35849 (vor 6 Tagen) <Dmitry Petrov>
* efee322830 - (tag: build-1.4.30-dev-1731) [Gradle, JS] Update Dukat on 0.5.8-rc.3 (vor 6 Tagen) <Ilya Goncharov>
* 4d4aabab8d - (tag: build-1.4.30-dev-1728) [JS BE] Make properties configurable when implementing an interface by delegation (vor 6 Tagen) <Victor Turansky>
* 2ad13847d1 - (tag: build-1.4.30-dev-1715) [KT-40670] Allow to override konan.properties from CLI (vor 6 Tagen) <Sergey Bogolepov>
* ea34a588f3 - (tag: build-1.4.30-dev-1709) Update KMM project wizard. (vor 6 Tagen) <Konstantin Tskhovrebov>
* 47c784f023 - (tag: build-1.4.30-dev-1695) JVM_IR fix Java wildcard types translation (vor 7 Tagen) <Dmitry Petrov>
* 19ed04e3fe - (tag: build-1.4.30-dev-1680) Bad capitalization fixed (vor 7 Tagen) <zhelenskiy>
* ba08cbbb20 - Other typos fixed (vor 7 Tagen) <zhelenskiy>
* 6e0aa007da - Typos fixed (vor 7 Tagen) <zhelenskiy>
* 0367dec035 - [Gradle, JS] Dukat change default mode onto source (vor 7 Tagen) <Ilya Goncharov>
* 0ce6d694b7 - (tag: build-1.4.30-dev-1679) Fix tests for as42. (vor 7 Tagen) <Konstantin Tskhovrebov>
* 48cd86b717 - (tag: build-1.4.30-dev-1678) Add JVM target bytecode version 15 (vor 7 Tagen) <Alexander Udalov>
* 819d64a2ef - (tag: build-1.4.30-dev-1676) Box inline class returned from suspend lambda non-locally in JVM_IR (vor 7 Tagen) <Ilmir Usmanov>
* 70a4ed3ebc - Box inline class returned from suspend lambda non-locally (vor 7 Tagen) <Ilmir Usmanov>
* c1765a5306 - (tag: build-1.4.30-dev-1668) Add changelog for 1.4.20-M2 (vor 7 Tagen) <anastasiia.spaseeva>
* b70a173595 - (tag: build-1.4.30-dev-1666) Formatting changes (vor 7 Tagen) <Georgy Bronnikov>
* 44893e09c1 - IR: remove unneeded ObsoleteDescriptorBasedAPI uses from backend.common (vor 7 Tagen) <Georgy Bronnikov>
* a0a6a4b0f1 - JVM_IR: make ObsoleteDescriptorBasedApi use explicit in all of backend.jvm (vor 7 Tagen) <Georgy Bronnikov>
* 305da8ee10 - IR: IrFunctionReference.fromSymbolDescriptor (vor 7 Tagen) <Georgy Bronnikov>
* 14b3beefb3 - IR: IrDelegatingConstructorCall.fromSymbolDescriptor (vor 7 Tagen) <Georgy Bronnikov>
* b28c85f5ea - IR: IrCall.fromSymbolDescriptor (vor 7 Tagen) <Georgy Bronnikov>
* ab3ef3a7e9 - IR: remove descriptor usage (vor 7 Tagen) <Georgy Bronnikov>
* 065edac64b - IR: remove unused functions (vor 7 Tagen) <Georgy Bronnikov>
* 726282c1ee - IR: remove a descriptor usage (vor 7 Tagen) <Georgy Bronnikov>
* c69402c800 - (tag: build-1.4.30-dev-1665) [Commonizer] Fix computing underlyingType and expandedType in CirTypeAlias (vor 7 Tagen) <Dmitriy Dolovov>
2020-10-26 19:12:20 +01:00
Mikhail Glukhikh caafe21e84 [FIR] Add CheckLowPriorityStage to callable reference resolve 2020-10-26 20:07:37 +03:00
Ilmir Usmanov a775fa195b Unbox inline class parameter of lambda if underlying type is Any or Any?
The inline class is boxed when we pass it as lambda argument, now we
unbox it. If the underlying type is not Any or Any?, bridge method does
the unboxing.

 #KT-32450 Fixed
 #KT-39923 Fixed
 #KT-32228 Fixed
 #KT-40282 Fixed
2020-10-26 17:34:37 +01:00
Toshiaki Kameyama 752f6d8f72 Elvis -> if intention: don't introduce new variable when RHS type is Nothing 2020-10-26 20:57:16 +07:00
Toshiaki Kameyama f9f8fd055b Convert receiver to parameter: place value argument list after type argument list
#KT-41499 Fixed
2020-10-26 20:47:35 +07:00
Dmitry Petrov b1629cc5f4 JVM KT-22465 don't generate accessor to private setter in other class 2020-10-26 14:56:07 +03:00
Roman Artemev 4d63ecd83c [JS IR] Do not copy prototype references of FO from super class
Reduce bundle size from issue from 4.9M to 3.4M

 - fix KT-41227
 - add simple test
2020-10-26 14:30:54 +03:00
Matthew Gharrity 99a6bdeec7 Fix KotlinCoreEnvironment projectCount disposable
The disposable which decrements ourProjectCount was a non-capturing
lambda, meaning it had a single identity and could only be registered
in the Disposer tree once. Therefore the application environment
would never be disposed if ourProjectCount ever went above 1.
2020-10-26 12:23:10 +01:00
Mikhail Glukhikh e9b51b42f9 [FIR] Add test for both KT-10240 and KT-19446 2020-10-26 14:09:36 +03:00
Alexander Udalov 382a0bd298 JVM IR: clear BindingContext after psi2ir
This helps to reduce peak memory in lowerings/codegen by a lot.

A more robust approach would be to have a separate BindingContext for
each file, and clear each of them after running psi2ir on it. This would
also lower peak memory usage in psi2ir.

Provide a fallback workaround compiler argument
-Xir-do-not-clear-binding-context just in case BindingContext is in fact
used somewhere and it's not caught by tests.
2020-10-26 10:34:43 +01:00
Alexander Udalov bc76f1fec3 Refactor test utilties to reuse GenerationState construction 2020-10-26 10:34:43 +01:00
Alexander Udalov dd813777b9 Refactor Main-Class computation in CLI for JVM with .jar outputs
Compute FQ name of the main class right after running the analysis and
before invoking codegen. This is needed because MainFunctionDetector
depends on BindingContext, and JVM IR needs to clear BindingContext as
soon as it's not necessary to reduce peak memory usage, thus breaking
any usages of data from it after the codegen.

Also refactor and use the extracted, but not properly reused previously,
copy of findMainClass in findMainClass.kt.

Note that this replaces NPE in KT-42868 with an UOE.
2020-10-26 10:34:43 +01:00
LepilkinaElena 1b5a366668 Update mimalloc up to version 1.6.7 (#4459) 2020-10-26 09:52:32 +03:00
Vladimir Dolzhenko 0a18be62e5 Add prefix for inner test classes in ide perf tests to avoid metric name clashes 2020-10-25 22:49:30 +01:00
Alexander Udalov 08b8939b80 IR: make IrSymbol.isPublicApi an extension 2020-10-23 20:56:08 +02:00
Alexander Udalov 4bd08e5e0c IR: clear callToSubstitutedDescriptorMap for each file to avoid leaking memory
This map is populated during psi2ir and is only used in
insertImplicitCasts, after which it makes sense to clear it, otherwise
it strongly references a lot of descriptors for calls in other files
which would never be used.
2020-10-23 20:50:08 +02:00
Alexander Udalov 7ac981d4d3 Psi2ir: refactor ModuleGenerator.generateModuleFragment
Move `postprocess` into `generateSingleFile` and do those steps on each
file instead. This will allow to create
`GeneratorContext.callToSubstitutedDescriptorMap` for each file and
clear it after its only call site (InsertImplicitCasts) has used it.
Also simplify code a bit.
2020-10-23 20:50:08 +02:00