Igor Chevdar
caa852061a
[box-tests] Ignored a test for K/N
...
More info in https://youtrack.jetbrains.com/issue/KT-44571
2021-06-16 17:25:07 +05:00
pyos
392e4fba42
JVM: fix inlining of default lambdas of signature (Result) -> Any
...
They have no `invoke` bridge, and the overridden invoke expectes a boxed
`Result` as an argument.
2021-06-16 12:13:32 +02:00
pyos
3be348f910
JVM_IR: fix parentClassId for property accessors
2021-06-11 15:03:13 +02:00
pyos
ade8b0a7d3
JVM_IR: box bound receiver before calling the reference constructor
...
This is needed for the inliner: since the information about Kotlin type
of the bound receiver is nowhere in the output binary, the inliner will
have no clue how to box inline class values. Moving the boxing outside
the object means the inliner doesn't need to know about it; from its
point of view, the captured value has type `Any`.
2021-06-09 14:36:07 +03:00
pyos
33ddeffcfd
JVM_IR: box inline class values returned by suspend inline lambdas
...
The call site inside the inline function expects them to return a boxed
value, like FunctionN.invoke would.
#KT-46915 Fixed
2021-05-26 08:33:55 +02:00
Dmitriy Novozhilov
df60e7368a
[Test] Fix syntax errors in few boxInline tests
2021-05-19 00:52:24 +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
pyos
21f2b3fa2b
JVM: expect a continuation parameter in default suspend references
2021-05-18 10:48:31 +02:00
pyos
7eedcf75f9
Add tests for default inline suspend lambdas
...
Broken on JVM and JVM_IR
2021-05-18 10:48:31 +02:00
pyos
57c934987c
JVM_IR: try to load mangled invoke from default lambdas
...
Old compiler versions still won't be able to load default lambdas
generated by JVM_IR, but this way we avoid incorrect behavior of
function references taking inline class types that unbox to Any.
#KT-46601 Fixed
2021-05-18 10:48:31 +02:00
pyos
34ac232a82
Add a test for KT-46601
2021-05-18 10:48:31 +02:00
pyos
3fc2cc410c
JVM_IR: propagate reified type parameter usages from inline lambdas
...
...to whichever class they are inlined into, not the class they are
declared in (which is not the same if the lambda is crossinline).
#KT-46584 Fixed
2021-05-12 15:09:35 +03:00
Mikhael Bogdanov
84e67da2af
Mute test on JDK 6
2021-04-30 18:24:10 +02:00
Mikhael Bogdanov
95d95f9a9b
Put reification markers came from super object signature
...
#KT-44770 Fixed
#KT-30696 Open
2021-04-30 17:34:16 +02:00
pyos
e6d923f65c
FIR: rename HIDDEN to INVISIBLE_REFERENCE
...
Some of them should be INVISIBLE_MEMBER though
2021-04-21 16:18:21 +03:00
Alexander Udalov
7fe10e27a1
Minor, fix failing codegen tests on different JDKs
...
#KT-46238
2021-04-21 14:43:10 +02:00
Alexander Udalov
27ddc31f15
Ignore codegen test using streams on Android
2021-04-21 11:39:08 +02:00
Alexander Udalov
21e9bd7ea2
Add regression tests for obsolete issues
...
#KT-9304
#KT-14961
#KT-16549
#KT-21080
#KT-28234
#KT-30102
#KT-31994
#KT-34291
#KT-38099
#KT-41174
#KT-44622
#KT-44701
#KT-44781
#KT-44849
#KT-44978
#KT-45081
#KT-45286
#KT-45383
#KT-45444
#KT-45907
2021-04-20 21:24:29 +02:00
Abduqodiri Qurbonzoda
d28d0a6321
Advance String(CharArray) deprecation level to ERROR in Common and JS
2021-04-07 00:23:29 +03:00
Mads Ager
41f5ac393a
Update D8 used for dexing tests to version 2.1.96.
2021-03-24 20:16:15 +01:00
Jinseong Jeon
922419efb8
FIR CFG: route to exit of try main for throw in try main
...
to make the remaining part of try main marked as dead.
^KT-45475 Fixed
2021-03-16 15:11:56 +03:00
Jinseong Jeon
55561fad37
FIR CFG: correct target and label for rethrow in try expression
...
^KT-45385 Fixed
2021-03-11 16:19:16 +03:00
Dmitry Petrov
0cca07fa19
Bump d8 used in box tests to 2.1.75
2021-03-10 21:04:12 +03:00
Dmitriy Novozhilov
a6d1d47918
[FIR] Fix clearing info about DF variable after reassignment
2021-03-04 17:09:17 +03:00
Alexander Udalov
b417786fd4
JVM IR: do not hide constructor with inline class in anonymous object
...
#KT-45131 Fixed
2021-02-25 14:44:16 +01:00
pyos
1310a65f0c
JVM: rename this$0 when regenerating nested objects too
...
In the old backend, this was unnecessary because nested objects would
reference their lambdas' captures through the original this$0. On
JVM_IR, using loose capture fields means a name/descriptor clash can
occur on any level of nesting, not just the top.
2021-02-17 07:56:03 +01:00
Alexander Udalov
73aa465ee9
Add tests for issues fixed in JVM IR
...
Note that KT-30696 is fixed only in the single-module case, and KT-42012
is not fixed fully (see KT-44855).
#KT-30041
#KT-30629
#KT-30696
#KT-30933
#KT-32351
#KT-32749
#KT-38849
#KT-42012
#KT-42990
#KT-44234
#KT-44529
#KT-44631
#KT-44647
2021-02-10 21:42:10 +01:00
Dmitriy Novozhilov
606ae45f5f
[Test] Replace remaining KOTLIN_CONFIGURATION_FLAGS directives with specific ones
2021-02-10 13:02:06 +03:00
Igor Chevdar
6f9bcf249b
[IR] Supported inlining of adapted references + tests
2021-02-09 17:23:19 +05:00
Mikhail Glukhikh
694d69fbfa
FIR2IR: select return target inside accessor properly
2021-02-08 14:28:24 +03:00
Ilmir Usmanov
a30a961cf5
Minor. Throw exceptions in test coroutine builders
2021-02-03 19:18:24 +01:00
Dmitriy Novozhilov
ebced14db2
[FIR] Implement suppressing diagnostics with @Suppress
2021-02-03 18:10:48 +03: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
Dmitriy Novozhilov
4bf6e58f2b
[TD] Fix directive order in codegen testdata
2021-02-02 20:37:47 +03:00
Dmitriy Novozhilov
49c2bfe637
[Test] Enable SMAP dump handler in boxInline tests
2021-02-02 17:53:53 +03:00
Dmitriy Novozhilov
64a300bfcd
[TD] Update testdata according to previous commit
2021-02-02 17:53:52 +03:00
Dmitriy Novozhilov
8973e3f362
[TD] Update fir directives in boxInline tests
2021-02-02 17:50:07 +03:00
Mikhael Bogdanov
c13f38f6df
Support proper frame maps for enumValues
2021-02-02 14:32:50 +01:00
Mikhael Bogdanov
1a044e5af4
Support proper frame maps for enum valueOf
2021-02-02 14:32:50 +01:00
Mikhael Bogdanov
16928d6e3f
Don't remove checkcast for reified values
...
#KT-35511 Fixed
2021-02-02 14:32:50 +01:00
Alexander Udalov
5480faf5c5
Add tests for issues fixed in JVM IR and other obsolete issues
...
#KT-6007
#KT-16445
#KT-17753
#KT-22488
#KT-23881
#KT-24135
#KT-26360
#KT-27427
#KT-27449
#KT-27830
#KT-28042
#KT-29595
#KT-30708
#KT-32793
2021-02-01 18:29:59 +01:00
pyos
0f2ca5d84c
JVM_IR: support non-local break/continue in the inliner
...
Not in the frontend or psi2ir, though, so this not a complete
implementation of KT-1436, but rather a part of it that is currently
useful to make other code compile. In particular, lambdas passed to
array constructors and JVM-style `assert` are inlined as IR returnable
blocks, which are then converted into `do { ... } while (false)` loops,
so non-local returns from them become non-local `break`s.
2021-02-01 15:51:31 +01:00
Dmitriy Novozhilov
6a2796b067
[Test] Fix source maps in testdata according to KT-37704
2021-01-28 13:19:29 +03:00
pyos
4a76ea6ecb
JVM: regenerate objects if they have been regenerated in parent contexts
...
This is a hack to work around the fact that type mappings should not be
inherited by inlining contexts for lambdas called from anonymous
objects. As the lambda can call the inline function again, this could
produce a reference to the original object, which is remapped to a new
type in the parent context. Unfortunately, there are many redundant
`MethodRemapper`s between the lambda and the class file, so simply
editing `TypeRemapper` does not work. Hence, this hack. For now.
(Issue found by compiling IntelliJ IDEA BTW.)
2021-01-22 13:39:20 +01:00
Denis.Zharkov
ad30c6c380
FIR: Fix callable references resolution when they're being returned from lambdas
2021-01-21 18:53:03 +03:00
Mikhael Bogdanov
de00f72fa3
Generate linenumber for inline call site in case of implicit iterator/hasNext/next calls in for loop
...
Otherwise -1 is generated in smap
2021-01-21 12:04:09 +01:00
Mikhael Bogdanov
91717cdcdd
Perform inline checks in IR tests
2021-01-20 15:23:09 +01:00
Mikhael Bogdanov
147d60523d
Generate inline function arguments with parameters types
...
#KT-44429 Fixed
2021-01-20 15:23:08 +01:00
Alexander Udalov
bf3f6594d5
IR: do not lose $default function annotations when generating calls
...
Losing an annotation like `JvmName` resulted in the incorrect bytecode
generated in the JVM IR backend.
#KT-44160 Fixed
2020-12-31 18:36:24 +01:00
Dmitriy Novozhilov
b416c669b0
[TEST] Update testdata due to dropped COMMON_COROUTINE_TEST directive
2020-12-10 01:31:04 +03:00