Dmitrii Gridin
82061a73eb
[util] SmartPrinter: override toString to print content instead of identity hash
...
Otherwise, all current exceptions contain only something like SmartPrinter@1234
2023-07-21 12:40:00 +00:00
Ilya Kirillov
25911b1fec
Move SmartPrinter to kotlin.core.util.runtime so it's accessible from KotlinExceptionWithAttachments
2023-07-18 11:49:20 +00:00
Abduqodiri Qurbonzoda
7346cf4777
Introduce jdk-api-validator to ensure kotlin-reflect uses jdk6 API
...
Merge-request: KT-MR-6930
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com >
2023-07-12 05:13:08 +00:00
Dmitriy Novozhilov
d3a098e7ef
[FIR] Remove redundant TODOs from FirSamResolver
2023-07-05 08:25:42 +00:00
Artem Kobzar
64158a8a2f
[K/JS] Add file-to-file compilation ^KT-6168 Fixed
2023-06-22 18:23:45 +00:00
Vladimir Dolzhenko
05652e7d8d
Improve exception handling and reporting
...
#KT-59445
2023-06-22 14:14:18 +00:00
Dmitriy Novozhilov
b26b649d4e
[FE] Introduce commonized version of expect/actual compatibility calculator
...
This is needed to use the same code for those checks between
both frontends and backend
^KT-58578
2023-05-19 10:19:17 +00:00
Yahor Berdnikau
eb4e96a113
Add kotlin-build-tools-enum-compat workaround
...
It acts as a workaround for the case when build tools or dependencies
are compiled with latest 'kotlin-stdlib' version, but at a runtime older
'kotlin-stdlib' is provided, which does not know about new
`EnumEntries`.
^KT-57317 Fixed
2023-04-21 14:57:17 +00:00
Artem Kobzar
33c5068b79
[K/JS] Rework IR deserialization and lowering phases to consume less memory
2023-04-19 13:10:19 +00:00
Vladimir Dolzhenko
3e99807436
Add ability to provide specific AbsentDescriptorHandler
...
#EA-457188
Merge-request: KT-MR-8900
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com >
2023-02-22 12:44:46 +00:00
Yahor Berdnikau
0cad069522
[Build] Pin api and language level to 1.8 in Kotlin compiler modules used by KGP
...
This is required to be able to compile KGP and it's dependencies which
set LV to 1.4 when repo will use LV 1.9. This caused by the change how
enums are compiled (KT-48872).
2023-02-18 13:26:54 +00:00
Dmitriy Novozhilov
a9248569a6
[FIR] Fix reporting of UNINITIALIZED_ENUM_ENTRY in init blocks
...
^KT-41126 Fixed
2023-02-10 12:30:12 +00:00
Dmitriy Novozhilov
bd26c29229
[FIR] Resolve arguments of error types during type resolution
2023-01-12 17:45:06 +00:00
Dmitriy Novozhilov
aaf0a1f396
[FIR] Introduce shouldNotBeCalled utility function
2022-12-01 07:29:38 +00:00
Dmitriy Novozhilov
01c6c7dc59
[FIR] Properly approximate return type of callable declarations
...
- approximate intersection types in all non-local declarations
- approximate local types in non-private non-local declarations
2022-11-22 15:46:20 +00:00
Dmitriy Novozhilov
9b63dde1c3
Add error-level OptIn on safeAs, cast and assertedCast functions in addToStdlib
...
Usage of this function is unsafe because it does not have native compiler
support. This means that compiler won't report UNCHECKED_CAST,
CAST_NEVER_SUCCEED or similar diagnostics in case of error cast
(which can happen immediately or after some refactoring of class hierarchy)
2022-10-06 06:57:07 +00:00
Abduqodiri Qurbonzoda
34e50649e8
Switch JVM target of the standard libraries to 1.8 #KT-51907
2022-08-13 01:33:45 +03:00
mcpiroman
529c03ab08
Switch to auto generated IR tree
...
Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com >
2022-06-13 18:58:05 +02:00
Yahor Berdnikau
af6f17c243
Unify kotlinCompilerClasspath for all projects
...
This will prevent spawning second Kotlin daemon during compilation
except 'buildSrc' compilation. Original change was introduced in
2e515f3945 commit.
2022-05-24 07:58:38 +00:00
Alexander Udalov
2e515f3945
Prohibit JVM target 1.6
...
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.
#KT-45165 Fixed
2022-04-19 22:54:40 +02:00
Dmitriy Novozhilov
6f64aedaf0
[FIR] Fix FindReferencePositioningStrategy for light tree
...
There was a problem which causes to lookup for assign token inside
functions from arguments of call
2022-03-11 15:36:05 +03:00
Dmitriy Novozhilov
ccb74b6477
[FIR] Fix computing compatibility of expect and actual modality
2022-02-18 17:44:39 +03:00
Stanislav Erokhin
1326ca674e
Introduced IDEAPluginsCompatibilityAPI and returned some API
...
Please read the description of IDEAPluginsCompatibilityAPI.
Also, you may notice, that Deprecation annotation was removed.
That is because with level ERROR it isn't possible to opt-in
to such API in the legit cases. And with level WARNING it won't be
reported because We have diagnostic with level ERROR about OptIn marker.
Sadly, there is no way to add ReplaceWith to the OptIn marker
2022-01-13 18:03:07 +01:00
Denis.Zharkov
a33d9df0cd
NI: Support forking inference with heuristics
...
Mostly, it only affects FIR
It partially allows to consider several variance of constraints like
A<Int> & A<T> <: A<X_var> that are mostly brought by smart casts
^KT-49542 Fixed
^KT-50489 Relates
2022-01-11 20:45:55 +03:00
Ilya Kirillov
25fe14b514
Move PerformanceCounter to runtime utils, so it can be used outside FE1.0
2021-12-27 16:23:07 +03:00
Dmitriy Novozhilov
cb0705ec03
[FIR] Change scheme of generating declarations by plugins
...
Methods `needToGenerateAdditionalMembersInClass` and
`needToGenerateNestedClassifiersInClass` are removed, now compiler
uses `get...Names` and `getTopLevel...` methods to determine which
extension may generate declaration with specific classId/callableId
This is needed to simplify API of FirDeclarationGenerationExtension and
provide guarantee that `generate...` method will be called with
specific classId/callableId only if specific extensions returned name
for this id from `getName...` functions
2021-11-23 15:01:28 +03:00
Denis.Zharkov
019001ca20
Optimize memory footprint related to empty/single element collections
...
^KT-47926 Related
2021-08-30 16:51:55 +03:00
Ilya Kirillov
c17a4a5a3b
FIR IDE: move light classes to separate module
2021-08-24 20:13:09 +03:00
Alexander Udalov
0a9498f7e2
Build: suppress deprecated JVM target warning globally
...
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.
Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
2021-07-27 13:35:39 +02:00
Dmitriy Novozhilov
8e0793091a
Add @NoInfer to safeAs type
...
This change will force specify type argument of every safeAs call
2021-07-12 10:11:36 +03:00
Victor Petukhov
18384788a4
Move type enhancement state stuff into core:descriptors.jvm
2021-07-06 09:54:29 +03:00
Victor Petukhov
8de05691a9
Revert "Move fqname related stuff into core:util.runtime module"
...
This reverts commit e651e1c6
2021-07-06 09:54:28 +03:00
Victor Petukhov
ea901d81fb
Get rid of redundant Jsr305State
2021-07-06 09:54:28 +03:00
Victor Petukhov
f46dc713d7
Support rxjava 3 nullability annotations
2021-07-06 09:54:28 +03:00
Victor Petukhov
61c2f1b203
Extract building JSR-305 settings to separate function
2021-07-06 09:54:27 +03:00
Victor Petukhov
e16033f8d8
Add androidx recently nullability annotations
2021-07-06 09:54:26 +03:00
Victor Petukhov
d5180f79aa
Support picking settings of exacter annotations by the length of the matching part of fqname
2021-07-06 09:54:25 +03:00
Victor Petukhov
46d0b16142
Use new default settings for java nullability annotations in JavaTypeEnhancementState and get rid of all hardcoded defaults
2021-07-06 09:54:24 +03:00
Victor Petukhov
8e7c0e8c61
Describe default settings for java nullability annotations depending on current kotlin version
2021-07-06 09:54:24 +03:00
Victor Petukhov
205087cae3
Move fqname related stuff into core:util.runtime module
2021-07-06 09:54:23 +03:00
Victor Petukhov
c8af1b735f
Introduce compiler flag to manage status of specific Java nullability annotations
2021-07-06 09:54:23 +03:00
Yahor Berdnikau
7789054547
Migrate repo to use JVM toolchains Gradle feature.
...
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Dmitriy Novozhilov
e5b7cf23d6
Drop min functions from addToStdlib.kt
2021-05-14 14:30:20 +03:00
Dmitriy Novozhilov
d114913cd2
Replace usages of addToStdlib.firstNotNullResult with firstNotNullOfOrNull
2021-05-14 14:30:19 +03:00
Abduqodiri Qurbonzoda
40d1849f33
Migrate compiler, idea and others to new case conversion api
2021-04-08 03:22:02 +03:00
Ilya Kirillov
e41ad2ea06
FIR IDE: implement generators for IDE diagnostics
2021-02-09 17:14:23 +01:00
Alexander Udalov
e0b6d4d917
Add -Xsuppress-deprecated-jvm-target-warning to modules compiled with 1.6
...
Currently this leads to an unknown argument warning, but it'll be
removed automatically on the next bootstrap.
2021-02-03 12:51:39 +01:00
Ilya Chernikov
02c617468f
Add support for a callback on recursion for memoized functions
2020-12-21 09:43:43 +01:00
Victor Petukhov
2685c7efce
Jspecify: Rename codeanalysis annotations to jspecify ones
2020-10-08 14:00:10 +03:00
Denis Zharkov
f3a490ee16
Support compiler flag -Xcodeanalysis-annotations
2020-10-08 14:00:09 +03:00