Mikhail Glukhikh
3576cbf0d8
[FIR] Add test for KT-42805
2020-10-22 13:04:59 +03:00
Mikhail Glukhikh
f2c651ec9c
[FIR2IR] Don't generate Any delegated members for data class
...
#KT-42771 Fixed
2020-10-22 13:04:59 +03:00
Mikhail Glukhikh
44459e8ac7
FIR mangler: fix alias-based type handling #KT-42770 Fixed
2020-10-22 13:04:58 +03:00
Victor Petukhov
6251568e17
Fix test after 84129098cb
2020-10-22 12:17:26 +03:00
Mikhail Glukhikh
289efd47b2
[FIR2IR] Cleanup code around implicit casts
2020-10-22 11:03:48 +03:00
Juan Chen
620a5d404d
[FIR2IR] Keep redundant cast on 'this' for local anonymous function
...
#KT-42517 Fixed
2020-10-22 10:51:23 +03:00
Jinseong Jeon
f4531b0f34
FIR: set missed source in various FirElements
...
This could be caught by debuggability tests, such as stepping tests,
which are not enabled for FIR yet.
Instead, for now, full pipeline tests will raise index out-of-bound
errors due to the undefined offsets, which stem from null source.
2020-10-22 10:51:21 +03:00
Jinseong Jeon
46cc01602e
FIR2IR: add implicit NOT_NULL cast if needed
2020-10-22 10:51:20 +03:00
Sergey Bogolepov
eeda48e63e
Allow prefix and relative path in resolvable properties.
...
It allows us to move more logic to konan.properties from ClangArgs.
E.g., something like `-$absoluteTargetSysRoot/usr/include/c++/4.9.4`
2020-10-22 12:45:49 +07:00
Victor Petukhov
84129098cb
Add equality constraints without subtyping
...
^KT-42195 Fixed
^KT-41741 Fixed
2020-10-21 21:23:13 +03:00
Dmitry Petrov
b1b87becc8
PSI2IR more JVM-like exhaustive when behavior KT-36840
2020-10-21 20:07:11 +03:00
Ilya Goncharov
7edeccbdc7
Move labeling into NameTables with labeling loops which contain escaped break
...
^KT-42262 fixed
2020-10-21 16:59:24 +03:00
Ilya Goncharov
400a15e3d6
Add lowering on switch in loop
...
^KT-42262 fixed
2020-10-21 16:59:24 +03:00
Ilya Goncharov
14d9aa1660
Add test on break in when without label
...
^KT-42262 fixed
2020-10-21 16:59:24 +03:00
pyos
a4b67f007f
JVM_IR: treat suspend-converted references as lambdas for inlining
...
Again, this is consistent with adapted function references, since
they're pretty much the same anyway.
2020-10-21 15:21:01 +02:00
pyos
12bec7cca2
JVM_IR: when convering references to lambdas, bind the receiver
...
instead of storing it into a captured temporary.
This makes the resulting lambdas equivalend to adapted function
references produced by PSI2IR or FIR2IR.
#KT-42492 Fixed
2020-10-21 15:21:01 +02:00
pyos
95fb597da0
PSI2IR / FIR2IR: bind FunctionN as receiver when suspend-converting
...
This is more consistent with adapted references & allows skipping a
temporary variable.
2020-10-21 15:21:01 +02:00
pyos
ccf921510d
PSI2IR / FIR2IR: do not create temporaries for adapted references
...
Arguments to function references behave the same as arguments to
function calls and should be evaluated once regardless, so the temporary
is unnecessary.
2020-10-21 15:21:01 +02:00
Alexander Udalov
369056ca5d
Minor, add explicit type argument to workaround KT-42175
2020-10-21 15:19:25 +02:00
Kirill Shmakov
29aaf70d21
Launch common tests on local JVM via run gutter
...
For projects with android target and without jvm one. #KT-42463
2020-10-21 15:40:13 +03:00
Jinseong Jeon
1c1e8f7beb
FIR CFG: revise edge kind between local func node and fun enter node
...
so that local function enter node can be visited by FIR CFA
#KT-42814 Fixed
2020-10-21 14:01:31 +03:00
Pavel Punegov
ce8d983b2a
Fix test after the fix for KT-17691
2020-10-21 13:58:53 +03:00
Dmitry Petrov
0b34526321
JVM_IR remove lambda hack required for odd JVM+OI behavior in KT-35849
2020-10-21 13:47:01 +03:00
Mads Ager
ad88c60fd8
[JVM_IR] Copy offsets from the original function to invokeSuspend.
...
Otherwise, implicit returns in void returning suspend functions
will not have the line number of the end brace.
Fixes KT-41962 and KT-40464.
2020-10-21 12:38:45 +02:00
Dmitriy Novozhilov
800bfe2cdb
[TEST] Update testdata broken in c2d3a252
2020-10-21 12:49:45 +03:00
Dmitriy Novozhilov
c2d3a252a8
Mute very strange failing of FIR find usages test
2020-10-21 11:53:42 +03:00
Dmitriy Novozhilov
0484ab8cca
Don't unwrap captured types in IDE descriptors renderers
...
#KT-42263 Fixed
2020-10-21 11:53:42 +03:00
Dmitriy Novozhilov
3068d79d2b
[FIR-IDE] Add lock for status resolve
2020-10-21 11:53:11 +03:00
Dmitriy Novozhilov
6550bd09b1
[FIR] Ensure class resolve phase in status resolve
2020-10-21 11:53:10 +03:00
Dmitriy Novozhilov
699dd54be9
[FIR] Don't inherit some declaration modifiers (like tailrec)
2020-10-21 11:53:10 +03:00
Dmitriy Novozhilov
bf1a00c73a
[FIR] Rework resolution of declaration statuses
...
There is introduced algorithm of resolution with jumps: before
resolution of some class we resolve all status of members of its
supertypes, so we can properly determine inherited visibility
and modifiers
2020-10-21 11:53:10 +03:00
Mikhail Glukhikh
0b8116dff0
[FIR] Change some phase requirements: STATUS -> DECLARATIONS
...
NB: Also not quite sure this is better. IMO this shows more clearly that
we require results of declarations resolve and not some strange 'STATUS'
2020-10-21 11:53:10 +03:00
Mikhail Glukhikh
275260720d
Add replacePhase in FirTypeResolveTransformer.transformEnumEntry
2020-10-21 11:53:10 +03:00
Mikhail Glukhikh
c171dafd91
FIR serializer: always normalize visibility
...
Without this commit we fail on package-private or so in serializer
2020-10-21 11:53:10 +03:00
Dmitriy Novozhilov
1ff5da5f41
[FIR] Add forgotten fake override type calculation
2020-10-21 11:53:10 +03:00
pyos
5c55f67923
JVM_IR: generate shorter names for classes in delegate initializers
...
#KT-41493 Fixed
2020-10-20 21:14:44 +02:00
LepilkinaElena
b786cf7559
[IR] Made signature nullable ( #3860 )
2020-10-20 21:13:40 +03:00
Alexander Udalov
6a9c72e77c
IR: use one traversal instead of two for DeclarationContainerLoweringPass
2020-10-20 20:03:17 +02:00
Alexander Udalov
b5695188f9
IR: remove FunctionLoweringPass, refactor usages to FileLoweringPass
...
FunctionLoweringPass didn't add much value over FileLoweringPass, but
had a hidden footgun (like ClassLoweringPass) in that if your lowering
pass invoked a visitor/transformer on the function body and you forgot
to override visitFunction to stop visiting nested functions,
runOnFilePostfix would work with the complexity of the squared number of
nesting levels. It looks like this was happening with K/N's
DataClassOperatorsLowering (I haven't measured though).
2020-10-20 20:03:14 +02:00
Alexander Udalov
c110031935
IR: refactor DeclarationTransformer
...
Do not create extra DeclarationTransformer and FileLoweringPass
instances, instead inline all transformations to
DeclarationTransformer.lower.
2020-10-20 20:02:45 +02:00
Alexander Udalov
2be7afc7f9
IR: minor, give names to anonymous lowering visitors
...
To improve stacktraces and make the code a bit more readable.
2020-10-20 19:15:50 +02:00
Dmitry Petrov
3979cde738
Add box and PSI2IR tests for special cases listed in KT-35849
2020-10-20 19:31:40 +03:00
Ilya Goncharov
efee322830
[Gradle, JS] Update Dukat on 0.5.8-rc.3
2020-10-20 16:12:38 +03:00
Victor Turansky
4d4aabab8d
[JS BE] Make properties configurable when implementing an interface by delegation
...
#KT-42364 Fixed
2020-10-20 15:49:29 +03:00
Sergey Bogolepov
2ad13847d1
[KT-40670] Allow to override konan.properties from CLI
2020-10-20 17:00:00 +07:00
Konstantin Tskhovrebov
ea34a588f3
Update KMM project wizard.
2020-10-20 12:03:17 +03:00
Dmitry Petrov
47c784f023
JVM_IR fix Java wildcard types translation
...
Types such as 'Collection<? extends CharSequence>' are treated as
'(kotlin.collections.MutableCollection<out kotlin.CharSequence!>
..kotlin.collections.Collection<kotlin.CharSequence!>?)'
by the front-end.
When generating generic signatures, JVM BE takes lower bound (which is
'kotlin.collections.MutableCollection<out kotlin.CharSequence!>').
Emulate this behavior in TypeTranslator.
2020-10-19 20:52:53 +03:00
zhelenskiy
19ed04e3fe
Bad capitalization fixed
2020-10-19 16:16:56 +03:00
zhelenskiy
ba08cbbb20
Other typos fixed
2020-10-19 16:16:56 +03:00
zhelenskiy
6e0aa007da
Typos fixed
2020-10-19 16:16:56 +03:00