Commit Graph

603 Commits

Author SHA1 Message Date
Denis.Zharkov 00821bbc63 FIR: Update test data (repeated diagnostics)
They are a bit redundant, but it needs additional work to be done
to avoid them
2021-05-20 17:24:33 +03:00
Ilya Goncharov f40110eb83 [JS IR] Fixes after rebase 2021-05-20 16:37:52 +03:00
Ilya Goncharov d65cbdf44d [JS IR] Fixes in tests
- Compilation of tests
- add arguments to extra help
2021-05-20 16:37:50 +03:00
Dmitriy Novozhilov 2ee54c2201 [FIR] Remove way to create FirSession using Module
The problem is that Module may not contain some default dependencies in
  classpath roots, so it's incorrect to take them from it
2021-05-19 16:29:19 +03:00
Dmitry Petrov 851980e36f JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs 2021-05-18 22:20:12 +03:00
Mikhail Glukhikh 0f9f63400e FirSupertypesChecker: implement six more diagnostics 2021-05-13 16:13:43 +03:00
Ilya Goncharov b9fc97b44f [Gradle, JS] Add arguments for building caches 2021-05-12 11:57:14 +03:00
Xin Wang b9209962cd CLI: Add documentation for -J argument in kotlinc -help 2021-05-11 19:50:24 +02:00
Jinseong Jeon bdfc879f00 FIR checker: report UNINITIALIZED_PARAMETER 2021-05-10 14:26:14 +03:00
Dmitriy Novozhilov 9cb740bfdb Fix tests broken in c6fa3634 2021-04-26 15:11:46 +03:00
Dmitriy Novozhilov 7fb2bf00c5 Force resolve annotations in annotation checker
#KT-46173 Fixed
2021-04-19 14:32:36 +03:00
Dmitriy Novozhilov 803d47daaa Distinguish classes from different sourcesets in SealedInheritorInSameModuleChecker
#KT-45848 Fixed
#KT-46031
2021-04-13 11:21:58 +03:00
Ivan Kochurkin ad9b962536 [FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE) 2021-04-12 23:49:55 +03:00
Mikhail Glukhikh 9af1de272e FIR: support private-in-file effective visibility 2021-04-08 09:41:26 +03:00
Ilmir Usmanov b5ecccb610 Enable suspend in fun interfaces by default
#KT-45836 Fixed
2021-04-01 20:26:42 +03:00
Ilmir Usmanov cf73f182c7 Minor. Change warning message 2021-03-31 09:04:35 +03:00
Victor Petukhov 9c38db754e Add compiler flag to enable strict mode for improvements in the type enhancement
^KT-45674 Fixed
2021-03-26 11:04:01 +03:00
Ilmir Usmanov 9c97f1ce35 Allow Result return type and nullability operators on Result type
by default
2021-03-22 14:56:16 +00:00
Alexander Udalov 415d52fe54 Deprecate KotlinJvmOptions.useIR
Starting from language version 1.5, JVM IR is enabled by default, so
this option has no effect. To rollback to the old JVM backend, the new
option useOldBackend can be used.

 #KT-45504 Fixed
2021-03-19 14:57:55 +01:00
Alexander Udalov 27174de891 Add JVM target bytecode version 16
#KT-45515 Fixed
2021-03-17 21:31:08 +01:00
Ilmir Usmanov a90a5f6dd4 Check for backend when checking for suspend in fun interfaces 2021-03-16 22:37:44 +01:00
Victor Petukhov b45d5abeb1 [jspecify] Change annotations' package from org.jspecify.annotations to org.jspecify.nullness, and DefaultNonNull to NullMarked
^KT-45409 Fixed
2021-03-11 15:32:14 +03:00
Jinseong Jeon e009b71f88 FIR checker: report uninitialized member/extension properties 2021-03-04 17:56:29 +03:00
Ilmir Usmanov d67e4f0c48 Rename inline class -> @JvmInline value class in stdlib and compiler 2021-02-25 16:06:51 +01:00
Ilya Goncharov bd2601f289 [JS IR] Extract adding of function call to another function
[JS IR] Add option for dce mode

[JS IR] Add logging to non useful declarations if appropriate dce mode

[JS IR] Add mode with throwing exception

[JS IR] unreachableDeclaration method is in rootDeclarations

[JS IR] Add js extra help arg with dce mode and include debug.kt to compile unreachableMethod

[JS IR] unreachableDeclaration as internal to not reproduce stdlib api

[JS IR] Fix description of dce mode argument

- Use console.error instead of console.log
- Use JsError instead Kotlin exception for lightweight

[JS IR] Remove body for throwing exception

[JS IR] Remove default parameter in unreachableDeclaration

[JS IR] Process without removing fields and declaration containers

[JS IR] Rename dce mode on dce runtime diagnostic

[JS IR] Use console.trace instead of console.error

[JS IR] Extract JsError

- Fix naming in prependFunctionCall
- Fix description on runtime diagnostic argument
- Using message collector instead of throwing exception

[JS IR] Distinguish unreachableMethods for log and exception

[JS IR] Extract checking of Kotlin packages of IrField

^KT-45059 fixed
2021-02-20 12:05:06 +03:00
Mikhael Bogdanov e3e7e6b740 Make indy-with-constants default for -jvm-target 9+
#KT-42522 Fixed
2021-02-17 18:43:23 +01:00
Dmitriy Novozhilov cdf7de5524 [FE] Change message for sealed interfaces with language target < 1.5 2021-02-17 13:51:14 +03:00
Georgy Bronnikov 103f82c95c IR: an option to automatically select the number of lowering threads 2021-02-17 11:03:27 +03:00
Georgy Bronnikov 52b3cb362b IR: thread pool in PerformByIrFilePhase 2021-02-17 11:03:27 +03:00
Georgy Bronnikov bea5d955d4 JVM_IR: perform file lowerings in parallel
Selected by -Xir-run-lowerings-in-paralled compiler flag.
2021-02-17 11:03:26 +03:00
Pavel Kirpichenkov 2a46da906c Provide additional information about missing supertypes
Add -X flag to report extra compiler diagnostics which migth break compatibility.
Use the flag to unconditionally check constructors without fear of
prematurely evaluating lazy supertypes.

KT-19234
KT-42404
KT-44583
2021-02-08 18:47:30 +03:00
Alexander Udalov bd45a6c11d Support -Xsuppress-version-warnings to suppress API/language version warnings
To be used in the project after bootstrap to get rid of warnings like
"Language version 1.3 is deprecated, ..." which prevent us from enabling
`-Werror` in `:compiler:cli` and other modules.
2021-02-03 13:07:04 +01:00
Alexander Udalov 99b5e5a373 Deprecate JVM target 1.6
#KT-44650 Fixed
2021-02-03 12:50:52 +01:00
Dmitry Petrov ab20a8ffff JVM_IR indy-lambdas: minor updates and fixes
KT-44278 KT-26060 KT-42621
2021-02-03 14:16:25 +03:00
Dmitry Petrov d94912ed62 JVM_IR indy-lambdas: initial implementation and tests
KT-44278 KT-26060 KT-42621
2021-02-03 14:16:22 +03:00
Alexander Udalov d022bb0248 Switch default JVM target to 1.8
#KT-29405 Fixed
2021-02-01 11:54:04 +01:00
Dmitry Petrov 5d7dc5fa39 JVM_IR indy-SAM conversions: minor updates
See: KT-44575 KT-44577

KT-44278 KT-26060 KT-42621
2021-01-29 12:59:48 +03:00
Dmitriy Novozhilov 81fd8b5940 [IR] Fix undeterministic order in signature clash reporting 2021-01-28 13:19:29 +03:00
Alexander Udalov 4dff7e648f Minor, restore abiStabilityUnstableWithOldBackend CLI test
Add -Xuse-old-backend to make it pass with LV=1.5 where JVM IR is
enabled by default.
2021-01-28 13:19:26 +03:00
Dmitriy Novozhilov 73e6d42224 [Test] Update CLI tests according to new default language version 2021-01-28 13:19:25 +03:00
Roman Artemev 2daf0cc11c [JS IR] Support additional repositories in CLI (cli part) 2021-01-26 19:23:22 +03:00
Pavel Kirpichenkov 2f3f75b512 Fix local anonymous class name error in K2MetadataCompiler
Extract the logic of approximating to denotable class supertype
from JS/KLIB and use it in metadata compiler.

^KT-20996 In Progress
2021-01-20 11:05:53 +03:00
Pavel Kirpichenkov b82a44fa63 Add test for KT-20996 2021-01-20 11:05:53 +03:00
Dmitriy Novozhilov e991c9d476 [CLI] Drop CommonCompilerArguments.coroutinesState 2021-01-12 16:47:54 +03:00
Alexander Udalov 12078666c2 Add warning if both -Xuse-ir and -Xuse-old-backend are passed 2021-01-11 12:57:03 +01:00
Alexander Udalov cb3191769d Enable JVM IR by default if language version is >= 1.5
#KT-44021 Fixed
2021-01-11 12:47:54 +01:00
Alexander Udalov 22d0e5eb65 Rename -Xno-use-ir -> -Xuse-old-backend, add Gradle option
As soon as JVM IR is enabled by default (in language version 1.5), use
the CLI argument `-Xuse-old-backend` or Gradle option `useOldBackend` to
switch to the old JVM backend.
2021-01-11 12:47:54 +01:00
Ilya Chernikov 9a7d1948a7 Implement support for -Xdefault-script-extension cli option 2021-01-07 10:37:22 +01:00
Alexander Udalov ee2ae0c471 JVM IR: remove obsolete -Xir-check-local-names
This flag was added a long time ago, at the time when we weren't sure if
we were going to keep the naming of local and anonymous classes
completely equal to the naming in the old backend. Now that we've
decided that we won't keep it equal and there are a lot of differences
already, it's not useful anymore.
2021-01-04 12:13:13 +01:00
Alexander Udalov eef06cded3 JVM IR: output stable ABI binaries by default
#KT-43592 Fixed
2020-12-20 23:14:54 +01:00