pyos
6897e89bbc
JVM: add tests for optimized getDelegate
2021-07-12 22:38:45 +02:00
pyos
debd58d377
JVM: use $delegate methods in KProperty[0-2].getDelegate
...
#KT-39055 Fixed
2021-07-12 22:38:44 +02:00
pyos
1e7295c64e
JVM: add $delegate method support to kotlinx-metadata
...
and kotlinp as well -- it is now possible to see the effect of the
previous commit.
2021-07-12 22:38:44 +02:00
pyos
5d0102a966
JVM_IR: generate $delegate methods for val x by ::y
2021-07-12 22:38:44 +02:00
pyos
7ae4303e1b
JVM_IR: slightly refactor JvmPropertiesLowering
...
to make it easier to generate different kinds of synthetic methods.
#KT-47609 Fixed
2021-07-12 22:38:44 +02:00
pyos
a943cdadef
JVM_IR: support generation of bound reflected property references
...
Not currently used though, since only references for delegated
properties' accessors are reflected, and those are unbound.
2021-07-12 22:38:43 +02:00
pyos
664bb055c8
JVM_IR: support codegen of property delegate methods
...
The purpose of a property-related method is now determined by its
origin; codegen no longer assumes all methods with Property metadata
source are `getX$annotations`.
2021-07-12 22:38:43 +02:00
pyos
6a3c79bb9e
JVM: support on-the-fly generation of property delegates in metadata
...
Optimizations may remove the `x$delegate` field, in which case there
should be a `getX$delegate` method to reconstruct the value if needed
due to a call to `KProperty{0,1,2}.getDelegate`. We need to know the
signature of this method somehow.
2021-07-12 22:38:43 +02:00
pyos
e49410e07b
JVM_IR: optimize delegation by property references
...
E.g. a statement like
var x by ::y
is semantically equivalent to
var x
get() = y
set(value) { y = value }
and thus does not need a full property reference object, or even a field
if the receiver is not bound.
#KT-39054 Fixed
#KT-47102 Fixed
2021-07-12 22:38:43 +02:00
Ivan Kochurkin
66e052b9b3
[FIR] Implement SPREAD_OF_NULLABLE
2021-07-12 23:16:47 +03:00
Nikita Bobko
83c5c41dd4
Fix that marketplace identifies newly uploaded Kotlin plugin artifacts as Kotlin 1.2 artifacts
...
This `compiler.xml` is packed into `kotlin-idea.jar` and causes troubles for marketplace
in identifying correct Kotlin plugin version
2021-07-12 22:04:20 +03:00
Mikhail Glukhikh
a997a98054
Commend -Xopt-in deprecation warning (due to bootstrap problems)
2021-07-12 21:26:21 +03:00
Mikhail Glukhikh
a92ab1bc86
Deprecate EXPERIMENTAL_IS_NOT_ENABLED diagnostic #KT-47638 Fixed
2021-07-12 21:26:20 +03:00
Mikhail Glukhikh
5871f3d663
CLI: support -option=value syntax for non-advanced flags #KT-47640 Fixed
2021-07-12 21:26:19 +03:00
Mikhail Glukhikh
d8417fd622
Introduce -opt-in stable compiler option instead of -Xopt-in
...
#KT-47099 Fixed
2021-07-12 21:26:18 +03:00
Mikhail Glukhikh
47c8bab48e
Replace -Xuse-experimental with -Xopt-in in codebase
2021-07-12 21:26:17 +03:00
Mikhail Glukhikh
195b6d1fb1
Deprecate -Xuse-experimental #KT-47623 Fixed
2021-07-12 21:26:16 +03:00
Mikhail Glukhikh
d9531f0c61
Don't report EXPERIMENTAL_ANNOTATION_ON_WRONG_TARGET for forbidden targets
...
#KT-47589 Fixed
2021-07-12 21:26:15 +03:00
Ilmir Usmanov
ac7538a269
Set receivers for inline class default function stub calls
...
Default function stubs have dispatch and receiver parameters, but
inline class methods are static by design with receivers as ordinary
parameters. So, take these parameters and set them as receivers during
lowerings.
#KT-46230: Fixed
2021-07-12 19:46:09 +03:00
Florian Kistner
31420a934c
MI-187 Add asserts for module dependencies
2021-07-12 18:23:19 +03:00
Florian Kistner
3fe388bd17
MI-187 Also allow foreign DerivedModuleInfos, if their original module is known to the ResolverForProject
2021-07-12 18:23:17 +03:00
Mikhail Glukhikh
5f6be619c0
FIR: Don't get all*Checkers multiple times
2021-07-12 15:47:59 +03:00
Elena Lepilkina
3cabfb6a85
[K/N][New MM] Rare GC calls to optimize swiftinterop benchmarks
2021-07-12 12:27:05 +00:00
Elena Lepilkina
cdeda58ed4
[K/N][perf] Added opportunity to set up tagged branch and added benchmarks plots for new MM
2021-07-12 12:26:20 +00:00
Victor Petukhov
33a281c637
Introduce separate compiler flag for unrestricted builder inference
2021-07-12 13:57:13 +03:00
Alexander Shabalin
274dabb61d
Collect stacktraces without allocating kotlin objects.
2021-07-12 08:49:33 +00:00
Alexander Shabalin
fca89c2118
Backport span from C++20
...
Does not support ranges and construction from arbitrary contiguous iterators as both need C++20 concepts for an adequate implementation.
2021-07-12 08:48:20 +00:00
Dmitriy Novozhilov
5efde67a0c
[FIR IDE] Register java enhancement state in FirIdeSessions
...
This was forgotten in 6d364a5f
2021-07-12 11:47:25 +03:00
Dmitry Petrov
1f8d6d6edb
JVM additional DCE tests
2021-07-12 11:09:30 +03:00
Dmitriy Novozhilov
6d364a5fee
[FIR] Register enhancement state in library session too
...
This is needed for enhancement scopes for deserialized java declarations
2021-07-12 10:15:07 +03: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
Dmitriy Novozhilov
ddc3ef1121
Fix all illegal usages of safeAs function
...
Call of `safeAs` without specifying explicit type argument is hardly
readable and may leads to hardly detectable errors
2021-07-12 10:11:36 +03:00
Ilya Gorbunov
5072653957
Duration: parse explicit positive values parenthesized
2021-07-12 04:39:28 +00:00
Ilya Gorbunov
682cb8e34a
Duration default toString: use 0, 1, 2, 3, 6, or 9 decimal digits
...
KT-42851
2021-07-12 04:39:27 +00:00
Ilya Gorbunov
7551719b85
Duration parsing: simplify range checks
2021-07-12 04:39:27 +00:00
Ilya Gorbunov
0427eec20f
Quote invalid strings in exception messages
2021-07-12 04:39:26 +00:00
Ilya Gorbunov
3f6e2be687
Duration: do not use scientific format for large values
...
The largest duration value formatted in ns with maximal decimals
would fit in 40 chars.
2021-07-12 04:39:25 +00:00
Ilya Gorbunov
1be1e5279c
Duration: parse and format negative values parenthesized
2021-07-12 04:39:25 +00:00
Ilya Gorbunov
ca1a9e4ca3
Duration: longer than long values in ISO components, test negative cases
2021-07-12 04:39:24 +00:00
Ilya Gorbunov
1c6ab08220
Introduce functions to parse a duration from a string KT-45325
2021-07-12 04:39:23 +00:00
Ilya Gorbunov
7ab6f6c9b2
Change Duration.INFINITE.toIsoString representation
2021-07-12 04:39:23 +00:00
Ilya Gorbunov
ae3d9cc3cd
Small durations are formatted with sub-second units KT-42851
2021-07-12 04:39:22 +00:00
Ilya Gorbunov
150ce812f1
Use days component in the default duration format KT-42851
2021-07-12 04:39:21 +00:00
Ilya Gorbunov
255c4b405e
Duration: round Double value to Long ns instead of truncating it KT-47675
2021-07-12 04:39:21 +00:00
Ilya Gorbunov
42cd2e65e6
Change Duration.toString format KT-42851
2021-07-12 04:39:20 +00:00
Dmitry Petrov
804db3ce91
JVM KT-47613 custom control flow analyzer for CFG builder
2021-07-11 20:16:09 +03:00
Dmitry Petrov
fe71435104
JVM KT-47613 traverse nodes backwards in backward analysis
2021-07-11 20:16:09 +03:00
Viacheslav Kormushkin
8c021af646
M1 support for cocoapods
...
#KT-47078
2021-07-10 19:23:51 +00:00
Ilya Gorbunov
455fee29e4
Find correct next match after matchAt and matchEntire KT-47676
2021-07-10 21:31:20 +03:00
Ilya Gorbunov
28a0698463
Regex.matchAt/matchesAt #KT-34021
2021-07-10 21:31:19 +03:00