Commit Graph

60810 Commits

Author SHA1 Message Date
Ilya Chernikov 891914167a Switch cli expression evaluation argument syntax to -expression/-e
#KT-35414 fixed
2020-01-21 17:42:48 +01:00
Ilya Chernikov 5f15cacb1b Fix ivy mapping to the maven repos in main-kts 2020-01-21 17:42:48 +01:00
Ilya Chernikov b5ac35dec1 Implement automatic loading of .main.kts scripts support
also fix discovery from ScriptDefinitionsProvider
2020-01-21 17:42:48 +01:00
Ilya Chernikov d15d62a338 Check REPL snippet syntax before calling analysis
restores the behaviour of the GenericRepl implementation and fixes
issues then invalid code is being compiled
#KT-34888 fixed
2020-01-21 17:42:48 +01:00
Steven Schäfer 8e07482862 JVM IR: Fix generation of parameterless default constructor
The JVM backend does not generate parameterless default constructors for
private constructors and constructors of local, inner, or inline
classes.
2020-01-21 16:34:33 +01:00
Alexander Udalov 5321a6af33 Forbid spread operator in signature-polymorphic calls
#KT-35226 Fixed
2020-01-21 15:57:35 +01:00
Alexander Udalov b6feec4115 Add language version 1.5 2020-01-21 15:57:35 +01:00
Alexander Udalov 8e2b76698a Remove -Xno-use-ir from modules where JVM IR problems are fixed
The problems in JVM IR backend in these modules are fixed by:
* kapt3-cli -- 1c527fc1
* frontend -- 174b3db7
* daemon-common-new -- 6fe214d8 & d17afdda
2020-01-21 15:09:29 +01:00
Alexey Tsvetkov d3a93b2015 Remove unneeded IncrementalCompilerRunner#postCompilationHook
The method is no longer needed, since the only implementation is empty.
2020-01-21 16:36:37 +03:00
Alexey Tsvetkov ba0ce92159 Report messages only after IC scope expansion converged
Incremental compilation scope (set of files to be compiled)
could be expanded, even if the frontend reported some errors
to a message collector.
The next iteration of IC could produce a different set of
compiler messages, so we want to report them only after
scope expansion converged.
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov c912f76d6f Add IC scope expansion tests
#KT-13677
  #KT-28233
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov b979be701e Remove some unneeded gradle specific IC logs
They stoped being different from JPS logs for some time
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov ef83431618 Recompile all dirty files in case of error 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 2d598d50d7 Expand compilation scope for IC before backend is run
Sometimes IC raises compilation errors when rebuild succeeds.
This happens because IC uses serialized decriptors
for non-dirty files. Serialized descriptors can be different
from source file descriptors. For example, a source file
may contain an implicit return type or an implicit visibility
for overridden methods, but serialized descriptors always
contain explicit return types & methods' visibilities.

These problems can be solved by expanding a scope of incremental compilation
just after the analysis, but before error reporting & code generation.
In other words, we need to compare descriptors before error reporting and code generation.
If there are new dirty files, current round of IC must be aborted,
next round must be performed with new dirty files.

This commit implements IC scope expansion for JS Klib compiler

    #KT-13677
    #KT-28233
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 4f3418dc89 Minor: use CompilerConfiguration#putIfNotNull for IC services 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov a950226602 Format and cleanup incremental-compilation-impl 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 5816722a64 Minor: remove unused property 2020-01-21 16:36:36 +03:00
Ilya Gorbunov db252f60cd Rename task generateTests in android-tests project
The new name is generateAndroidTests.

The output of this task is not committed to VCS, so there's no need
to run it when "Generate All Tests" run configuration is executed.
2020-01-21 16:20:47 +03:00
Natalia Selezneva f0cb51a5bc KotlinDslScriptModel request shouldn't fail the gradle build 2020-01-21 15:56:01 +03:00
Natalia Selezneva 606279b462 as36: Update to AS 3.6 RC (192.7142.36.36.6071332)
^KT-36005 Fixed
2020-01-21 15:56:01 +03:00
Natalia Selezneva 4699ba758e Remove unnecessary bunch file for AS4.0 2020-01-21 15:56:01 +03:00
Ilya Gorbunov 61b3f447b1 Remove jsIrDist (kotlin.stdlib.js.ir.dist) flag and the logic it enables
It is no longer needed since JS IR is published in JS artifacts,
and there's no longer separate "-js-ir" artifacts.

Changes in BuildProperties.kt will take effect after the next
kotlin-build-gradle-plugin publishing.
2020-01-21 15:54:24 +03:00
Tsvetan 5f0e3018db KT-27856 Add contracts to Timing.kt lambdas (#1987) 2020-01-21 15:42:21 +03:00
Vladimir Ilmov 7dc29a1840 Coroutine debugger starting even if registry key set to false - fixed 2020-01-21 11:39:13 +01:00
Vladimir Ilmov 9f720e576d [coroutine] ComboBox disabled as in progress 2020-01-21 11:39:13 +01:00
Vladimir Ilmov c33546f678 [coroutine] Exception fixed for SUSPEND coroutines. 2020-01-21 11:39:13 +01:00
Alexander Udalov 99294cfdae Minor, fix test data
TypeCastException was unresolved after an accidental change in
f48bdc1fcb.
2020-01-21 11:26:21 +01:00
Mads Ager 79840a05b2 Fix test expectations.
Do not check for occurrences of "this" on the current backend.
I accidentally unified the checking for the two backends
without checking that it worked (used the wrong test suite to
test).
2020-01-21 11:26:02 +01:00
Georgy Bronnikov 1c527fc159 IR: avoid name clashes between raised local functions. 2020-01-21 12:50:55 +03:00
Dmitriy Novozhilov 4e0b54e1a6 [FIR] Add equality to ConeTypeVariableType 2020-01-21 12:06:34 +03:00
Toshiaki Kameyama 2daedc98b5 KT-35648 RemoveArgumentNameIntention: Support MixedNamedArgumentsInTheirOwnPosition
- ^KT-35648 Fixed
2020-01-21 11:43:37 +03:00
Yaroslav Chernyshev 401baa35ab [Gradle, Native] Implement custom name for generated framework for XCode 2020-01-21 10:23:53 +03:00
Natalia Selezneva a24e62eaf7 Scripting: do not call getConfiguration inside ScriptClassRootsCache
We already have all configurations inside `all` property.
If script doesn't have loaded configuration getting script sdk - ask for configuration explicitly to avoid situations when configuration is already loaded but not yet saved in memory cache

Looks related to KT-35590
^KT-35590
2020-01-21 10:07:25 +03:00
Ilya Gorbunov 1336da8453 Rename Clock to TimeSource, ClockMark to TimeMark
Step 2: rename classes and interfaces.
Provide deprecated typealiases to smooth migration.
2020-01-21 03:28:35 +03:00
Ilya Gorbunov a11a25087a Rename Clock to TimeSource, ClockMark to TimeMark
Step 1: rename files
2020-01-21 03:28:35 +03:00
Igor Yakovlev ac9c106a77 Fix of UL classes muted tests
Add visibility modifier to companion field
Const initializer is now getting for const properties only

Fixed tests:
UltraLightClassLoadingTestGenerated.testAnnotations
UltraLightClassLoadingTestGenerated.testInheritance
UltraLightClassLoadingTestGenerated.testProperties
UltraLightClassSanityTestGenerated.IdeRegression.testImplementingMutableSet
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingFinalInternal_extra
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingInternal
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingInternal_extra
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingProtected_extra
UltraLightFacadeClassTestGenerated.testProperties
UltraLightClassLoadingTestGenerated.testObjects
2020-01-21 03:26:09 +03:00
Ilya Gorbunov 15a441141f Update public API dump after KT-11567 codegen changes came into effect
The only questionable case left is a private companion
in a public interface, which is generated as a public synthetic field
2020-01-20 21:29:50 +03:00
Alexander Udalov c0600e6873 JVM IR: minor, mute and adapt noCallAssertions.kt to 1.4 2020-01-20 19:12:59 +01:00
Alexander Udalov 078b934580 Mute/unmute JVM backend tests for language version 1.4 2020-01-20 19:12:59 +01:00
Alexander Udalov f48bdc1fcb Fix codegen box tests for language version 1.4
Since API version 1.4, NullPointerException is thrown for casts of null
to any type instead of TypeCastException.
2020-01-20 19:12:59 +01:00
Alexander Udalov 6a90dc2efe Fix bytecode text tests for language version 1.4
New null check assertions are generated a bit more efficiently, with a
call to `checkNotNull` instead of IFNONNULL+jump.
2020-01-20 19:12:59 +01:00
Ilmir Usmanov 1ef5e25c60 JVM_IR: Minor. Update test data 2020-01-20 18:59:00 +01:00
Ilya Gorbunov 51c5fcc8b8 Drop experimental stdlib sourceset
Haven't used it after pre 1.3
2020-01-20 18:35:21 +03:00
Ilmir Usmanov 6ede10c1ca JVM_IR: Minor. Add test for SMAP of inner object/lambda of inline suspend function 2020-01-20 16:00:36 +01:00
Ilmir Usmanov 877509306d JVM_IR: Minor. Unmute tests. 2020-01-20 16:00:36 +01:00
Ilmir Usmanov 891a55d79a JVM_IR: Fix visibility of inner suspend lambda inside inline function
It should be public, otherwise, after inlining, we will get IllegalAccessError.
2020-01-20 16:00:36 +01:00
Ilmir Usmanov 56c8fdc6c4 JVM_IR: Perform tail-call optimization on IR
It is easier to introduce a new lowering so the codegen will emit code for the old
tail-call optimizer to understand. Also, this is more flexible and would allow to
optimize cases, which are now feasible with the old optimizer.
Note, that because of bytecode inlining, we cannot replace the old one, but we cannot
emit code, that is simpler for it to optimize.
2020-01-20 16:00:35 +01:00
Ilmir Usmanov 9f5b51ed43 JVM_IR: Do not generate fake continuation markers inside inline suspend lambdas
Since the markers replace ALOAD 0 as continuations, passed to suspend calls, in
JVM_IR we do not need this, since in JVM_IR all inline lambdas are static
functions.
2020-01-20 16:00:35 +01:00
Ilmir Usmanov 16d63cd1d0 JVM_IR: Use attributes to find $$forInline version of crossroutine
This way it would not get unlowered version.
2020-01-20 16:00:35 +01:00
Ilmir Usmanov 4d9d62ad12 JVM_IR: Also check attributes for suspendImpls when generating continuation
Otherwise, it would not generate continuations for overloads.
2020-01-20 16:00:34 +01:00