Commit Graph

68263 Commits

Author SHA1 Message Date
Dmitriy Dolovov 3dc3c19c02 [Commonizer] Fix ImportAndCheckNavigation IT 2020-08-17 21:52:40 +07:00
Georgy Bronnikov df8b819a55 JVM_IR: restore dumping for IrLowering phase 2020-08-17 15:57:12 +03:00
Ilya Goncharov c70759673c [Gradle, JS] Update npm versions
^KT-41125 fixed
2020-08-17 15:22:30 +03:00
Steven Schäfer 6100166185 JVM IR: Fix special bridge generation with external Kotlin dependencies 2020-08-17 13:42:32 +02:00
Ilya Kirillov 730e07c52a Wizard: fix ExpectedFileTest.kt 2020-08-17 12:22:38 +03:00
Toshiaki Kameyama 35459d2ca7 "Add not-null asserted (!!) call": add '!!' to receiver of function reference
#KT-37841 Fixed
2020-08-17 12:05:45 +03:00
Ilya Kirillov 5e5e19f482 FIR IDE: temporary disable AddFunctionReturnTypeIntention 2020-08-17 11:38:05 +03:00
Ilya Kirillov b79deafbc7 FIR IDE: fix testdata 2020-08-17 11:38:04 +03:00
Ilya Kirillov 27c045d035 FIR IDE: move all all symbol markers to markers package 2020-08-17 11:38:02 +03:00
Ilya Kirillov 052e8e5069 FIR IDE: make a symbol hierarchy a sealed one 2020-08-17 11:38:01 +03:00
Ilya Kirillov 018dd673b3 FIR IDE: simplify containing declaration provider 2020-08-17 11:38:00 +03:00
Ilya Kirillov 37ac654444 FIR IDE: rework high level API
Make analysis session to always be a receiver parameter
2020-08-17 11:37:58 +03:00
Ilya Kirillov cadf99ca1e FIR IDE: introduce containingDeclarationProvider for symbols 2020-08-17 11:37:57 +03:00
Ilya Kirillov b5a4e4c409 FIR IDE: introduce applicable computation & -based inspection 2020-08-17 11:37:56 +03:00
Ilya Kirillov c8ab0766c9 FIR IDE: Implement symbol restoring for member symbols 2020-08-17 11:37:55 +03:00
Ilya Kirillov e4995175a4 FIR IDE: fix idea-frontend-fir testdata 2020-08-17 11:37:53 +03:00
Ilya Kirillov 5f20910c79 FIR IDE: always try to find symbol origin in overridden symbols 2020-08-17 11:37:52 +03:00
Ilya Kirillov a700d1fccb FIR IDE: resolve kt symbols only to the phase they actually need 2020-08-17 11:37:51 +03:00
Dmitriy Dolovov 75be9cf31f [Commonizer] Tests on rewriting callables names to succeed commonization
^KT-34602
2020-08-17 09:31:28 +07:00
Dmitriy Dolovov de0b6e06cf [Commonizer] Keep parameters names hash in approximation keys for ObjC callables
^KT-34602
2020-08-17 09:31:21 +07:00
Dmitriy Dolovov 3b901a28d5 [Commonizer] More compact approximation keys
^KT-34602
2020-08-17 09:31:12 +07:00
Dmitriy Dolovov 4418dc85ca [Commonizer] Allow rewriting callables names to succeed commonization
^KT-34602
2020-08-17 09:31:03 +07:00
Dmitriy Dolovov 8904f5652b [Commonizer] Allow extended lookup for classifiers in test mode
Only for commonizer tests!

Allow to look up classifiers from the standard Kotlin packages (kotlin, kotlinx)
both in the default built-ins module and in test data sources. This is necessary
to write tests that refer to C-interop classifiers that are not available without
Kotlin/Native distribution.

^KT-34602
2020-08-17 09:30:57 +07:00
Dmitriy Dolovov 3b398ed57f [Commonizer] Small clean-up in IllegalCommonizerStateException 2020-08-17 09:30:47 +07:00
Dmitriy Dolovov 494fb39399 [Commonizer] CLI: Report duration even if it's 0ms long 2020-08-17 09:30:42 +07:00
Dmitriy Dolovov 9ef727747b [Commonizer] Use Array instead of List in AbstractListCommonizer 2020-08-17 09:30:36 +07:00
Igor Chevdar e468a347b5 [box-tests] Tests on field init optimization
Added tests on all primitive types and a test when the field's type is an inline class
2020-08-15 12:16:33 +05:00
Steven Schäfer 0328fcaf5d JVM IR: Avoid IMPLICIT_NOTNULL checks on special bridge methods
...with dynamic type checks, except for the `@PlatformDependent`
methods, for which the JVM backend adds null checks.
2020-08-14 21:59:33 +02:00
Steven Schäfer 9026f89ba5 JVM IR: Avoid CHECKCASTs on type operators (KT-39520)
The type information coming from Java or Kotlin generics may be wrong
due to type erasure and a CHECKCAST instruction could throw an
exception.
2020-08-14 21:58:47 +02:00
Alexander Udalov 469b164555 IR: minor optimizations to IR validation 2020-08-14 21:55:37 +02:00
Alexander Udalov 7468518f35 JVM IR: minor, optimize forceSingleValueParameterBoxing
In JVM IR, both `valueParameters` and `isFromJavaOrBuiltins` take
noticeable time (1% of all compilation) because the logic for these in
IrBasedDescriptors is not trivial.
2020-08-14 21:55:37 +02:00
Alexander Udalov 35cace2540 JVM IR: collect potentialBridgeTargets in a list, then create bridges for all of them
This takes BridgeLowering time percentage from 1.3% to 1.0% of all
compiler time on a sample project, perhaps due to better data locality.
In addition, it simplifies stack traces by effectively merging all
bridge generation call sites into one, helping in future performance
investigations.
2020-08-14 21:55:37 +02:00
Alexander Udalov 9607414cf1 IR: make allOverridden return Set instead of Sequence, move to IrUtils
This doesn't hurt performance, but improves stack traces, in particular
in JVM's BridgeLowering.
2020-08-14 21:55:37 +02:00
Alexander Udalov adcfbdec24 JVM IR: optimize special method / signature computation in BridgeLowering
First of all, put method signature caches of BridgeLowering into
JvmBackendContext. Since method hierarchies can span several files, and
a new instance of BridgeLowering is created to lower each file, keeping
them cached for the whole module makes BridgeLowering faster.

Also, do not attempt to compute special bridges if the method is
irrelevant, which can be deduced by its name. With this optimization,
the special method cache is no longer needed.

This brings BridgeLowering time from 3.8% down to 1.5% of all compiler
time on a sample project.
2020-08-14 21:55:37 +02:00
Alexander Udalov 0727e9055b JVM IR: use a simpler way to check if class is local 2020-08-14 21:55:37 +02:00
Alexander Udalov 6db5ad7310 IR: remove cast to IrStatement in IrDeclarationBase.transform
Default implementation of `IrStatement.transform` contained a cast to
`IrStatement`. Since almost all IR elements inherit from IrStatement,
this implementation was used in many subclasses. However, checkcast to
interface is slow and this place was indeed noticeable in the profiler
snapshot. Since not that many places really expected to get IrStatement
out of IrStatement.transform, introduce a new method
`transformStatement` that does this cast, and use it in all those
places. Meanwhile, most implementations will use the IrElement's
implementation of `transform` which merely invokes `accept` without
casts.
2020-08-14 21:55:37 +02:00
Alexander Udalov fb8e39a621 IR: optimize transformation of declarations/statements lists in-place
Also, inherit IrDeclarationBase from IrElementBase to be able to use a
cast to IrElementBase, which is faster than a cast to IrElement or
IrDeclaration.
2020-08-14 21:55:36 +02:00
Alexander Udalov 4f0585950e IR: inline some transformChildren calls in IrElementTransformer{,Void}
IrElementTransformer.visitDeclaration/visitExpression are very prominent
hotspots, and it seems that HotSpot doesn't optimize the inlined Kotlin
bytecode there well enough. Reduce the bytecode in these and similar
methods by inlining calls to also/apply/transformChildrenVoid.
2020-08-14 21:55:36 +02:00
Nikolay Krasko 3a883e1236 Replace bintray bootstrap with space bootstrap repo 2020-08-14 17:31:13 +03:00
Nikolay Krasko f484ceec80 Use GPG agent for signing in PublishedKotlinModule (KTI-314) 2020-08-14 17:31:13 +03:00
Nikolay Krasko bbf8b12c65 Sign with GnuPG agent (KTI-314) 2020-08-14 17:31:13 +03:00
Nikolay Krasko 635ffcd53b Update maven signing for working with gpg 2 (KTI-314)
Update to maven-gpg-plugin 1.6 and add workaround for https://issues.apache.org/jira/browse/MGPG-59
2020-08-14 17:31:13 +03:00
Ilya Matveev a121ec1e39 Update Kotlin/Native: 1.4.20-dev-16314 2020-08-14 09:41:47 +00:00
Roman Artemev fa2c49a311 [Plugin API] Add extension point to contribute synthetic properties
- needs to fix KT_41006
2020-08-14 11:59:37 +03:00
Denis Zharkov 5ede37d6ab Report warnings on safe call + nullable extension operator
^KT-41034 In Progress
2020-08-14 11:12:34 +03:00
Roman Golyshev 852d22470e Revert "FIR Completion: Add idea-fir dependency to run completion tests"
This reverts commit 7d883f18
2020-08-13 23:12:34 +03:00
Toshiaki Kameyama 89cc5777ce Put parameters on line: don't suggest if parameters has end-of-line comments
#KT-35214 Fixed
2020-08-13 19:53:46 +03:00
Toshiaki Kameyama efa981db36 "Create class from usage": add visibility to primary constructor if needed
#KT-29844 Fixed
2020-08-13 19:51:01 +03:00
Toshiaki Kameyama b1e8238ea2 "Convert reference to lambda" intention: handle extension function reference with extension function call
#KT-35558 Fixed
2020-08-13 19:48:07 +03:00
Toshiaki Kameyama 9ff7539ff0 "Merge 'if's" intention: do not remove nested comments
#KT-33258 Fixed
#KT-39552 Fixed
2020-08-13 19:43:39 +03:00