Dmitry Petrov
79a2d9858c
JVM_IR emulate JVM stub generation scheme
...
KT-42114
KT-42115
2020-09-29 21:06:30 +03:00
pyos
6dc08cb2fd
Add a bytecode test that checks inlining of adapted references
2020-09-29 19:49:46 +02:00
pyos
0e8a664c9b
JVM_IR: fix bound suspend-converted references
...
Note: inlining of adapted callable references is still suboptimal.
#KT-42021 Fixed
2020-09-29 19:49:46 +02:00
Mikhail Glukhikh
ac50433e17
Fix failing bytecode text test
...
In this commit I moved IGNORE_BACKEND_FIR to the end or deleted it
when it was applicable, to preserve correct line numbers
2020-09-29 19:16:42 +03:00
Dmitry Petrov
1fc459ab4c
JVM_IR KT-42260 add abstract overrides for generated stubs
2020-09-29 14:06:12 +03:00
Alexander Udalov
445b2d6eb1
JVM IR: minor, unmute bytecode text test
...
Also fix typo in the name
2020-09-29 12:38:54 +02:00
Mikhail Glukhikh
cebbd21a1e
FIR2IR: simplify analysis of companion' callable references
2020-09-29 11:51:21 +03:00
Jinseong Jeon
3151fc8577
FIR2IR: set dispatch receiver for companion member reference
...
#KT-42132 fixed
2020-09-29 11:51:21 +03:00
Jinseong Jeon
01d852c006
FIR: carry annotations on delegated property accessors
2020-09-29 11:35:19 +03:00
Ilmir Usmanov
6ae2951850
Minor. Do not check suffix of function for tail-call optimization hit
2020-09-29 10:04:03 +02:00
Mark Punzalan
238cc7c257
[FIR] Enable BytecodeText tests for FIR.
...
143 out of 767 tests (18.6%) are currently failing.
2020-09-29 10:21:21 +03:00
Mark Punzalan
69cd729506
[FIR] Enable BlackBoxAgainstJavaCodegen tests for FIR.
...
23 out of 156 tests (14.7%) are currently failing.
2020-09-29 10:21:21 +03:00
Mark Punzalan
348ba3e08c
[FIR] Enable BlackBoxInlineCodegen tests for FIR.
...
16 out of 638 tests (2.5%) are currently failing.
2020-09-29 10:21:21 +03:00
Dmitriy Novozhilov
cc4f72e032
[FIR] Capture type from type parameter upper bound when needed
2020-09-29 10:17:43 +03:00
Dmitriy Novozhilov
0c0a8f9849
[FIR] Properly pass type attributes for inference of lambda with type variable as expected type
...
#KT-41989 Fixed
#KT-37317 Fixed
2020-09-29 10:17:42 +03:00
Dmitry Petrov
d9906ae8da
Minor: unmute some bytecode listing tests in JVM_IR
2020-09-28 21:48:14 +03:00
Alexander Udalov
ae6d89b100
Minor, mute new test for FIR
2020-09-25 16:50:58 +02:00
pyos
bd6ead0467
JVM_IR: check for null when converting unboxed inline classes to strings
...
`C?` can be unboxed into `T?` if if wraps a reference type `T!!`, but in
this case `null` is not a valid value to pass to `toString-impl`.
#KT-42005 Fixed
2020-09-25 16:50:34 +02:00
Alexander Udalov
f8f2be3d9f
Minor, improve test on suspend invoke function reference
...
Add WITH_RUNTIME to enable it for the old backend, check the generated
function reference methods by starting the coroutine.
2020-09-25 14:52:46 +02:00
Steven Schäfer
20a5c44e41
JVM IR: Fix types in generated function reference constructor
...
For references to suspend functions this fixes an IllegalStateException
in the type mapper, which is what the "suspendFunctionMethodReference"
test is about.
2020-09-25 14:52:19 +02:00
Jinseong Jeon
f3db113a82
FIR2IR: use @Target to put annotations on either property or backing field
2020-09-25 14:45:49 +03:00
Jinseong Jeon
dc2226b42f
FIR2IR: put @JvmField on field, not property
...
#KT-42118 fixed
2020-09-25 14:45:48 +03:00
Mikhail Glukhikh
fe8e3e99ab
[FIR Java] Hide function in scope in case it's an accessor by fact
...
#KT-42116 Fixed
2020-09-25 14:44:09 +03:00
Dmitry Petrov
70095712eb
Minor: drop new bytecode listing test that passes only in JVM_IR
...
Unfortunately, there's no way to mute it in JVM right now.
Corresponding case is tracked as KT-42179, anyway.
2020-09-25 13:49:53 +03:00
Dmitry Petrov
cfd62c15bf
JVM_IR KT-36994 don't generate stub if present in superclass
2020-09-25 11:57:33 +03:00
Dmitry Petrov
1adce11257
Add tests for KT-40191
2020-09-25 11:57:32 +03:00
pyos
f30e564c90
JVM_IR: do not use fields' superQualifierSymbol to cast the receiver
...
It's only for computing the field owner.
#KT-42131 Fixed
2020-09-24 18:28:23 +02:00
Dmitriy Novozhilov
0d29d6d361
[FIR] Transform when conditions with boolean expected type
...
#KT-42130 Fixed
2020-09-24 14:59:35 +03:00
Jinseong Jeon
5b136516c4
FIR: utilize checking subtype of functional type and finding invoke symbol
2020-09-24 14:05:52 +03:00
Jinseong Jeon
b10466f6a2
FIR: extend suspend conversion to subtype of functional type
2020-09-24 14:05:52 +03:00
Roman Artemev
6670e4b21d
[JS IR] Fix callable reference to generic constructor
...
- add tests
- fix KT-42025
2020-09-24 12:50:47 +03:00
Ilmir Usmanov
4da67bf013
Minor. Unmute tests
2020-09-24 10:08:43 +02:00
Ilmir Usmanov
f22f10febb
JVM_IR: Unbox inline classes in suspend functions
...
if the function can be verified to safely returning unboxed
inline class.
Box the return value on resume path.
2020-09-24 10:08:41 +02:00
Steven Schäfer
3a7cc93c4e
JVM IR: More precise check for calls to the implementation method in a default stub
2020-09-24 07:53:31 +02:00
Steven Schäfer
111c550f3c
JVM IR: More tests for inlining in $default stubs
2020-09-24 07:53:31 +02:00
Steven Schäfer
5e27d9b089
JVM IR: Make inlining in $default stubs compatible with the JVM BE
...
The JVM BE inlines calls to the underlying function in a $default stub
verbatim, e.g., without renaming LVT entries or regenerating anonymous
objects. This commit introduces the same behavior in the JVM IR BE.
Fixes KT-36769.
2020-09-24 07:53:31 +02:00
Dmitry Petrov
1c4567c999
Add tests for KT-40152
2020-09-23 18:14:21 +03:00
Dmitry Petrov
cd37301ea2
Minor: TARGET_BACKEND=JVM in JVM-specific tests
2020-09-23 18:14:21 +03:00
Dmitry Petrov
99dbeecc40
Some more bytecode listing tests for JVM_IR
2020-09-23 18:14:20 +03:00
Alexander Udalov
84df996204
JVM IR: fix "step over" for inline function calls in conditions
...
Reimplement the same hacky approach used in the old backend (see
cc2fe6b0c6 ).
Previously, the debugger incorrectly stepped into Collections.kt on
"step over" inline function calls from stdlib like 'any'.
Since `if` and `when` expressions are represented the same way in IR,
the behavior is fixed for both of them. It's not the case in the old JVM
backend, where stepping over `when` conditions still suffers from the
same problem, which the newly added test checks.
2020-09-23 15:54:15 +02:00
Dmitriy Novozhilov
10e7c0f1b2
[TEST] Fix long literal in testdata broken in 4374c06
2020-09-23 15:22:03 +03:00
Roman Artemev
76ed09482f
[IR BE] Fix inline class lowering
...
- provide additional type parameters from context when transforming
constructor into static function.
- fix KT-41771
- add test
2020-09-23 14:49:38 +03:00
pyos
5954db18cb
JVM_IR: fix lifting of arguments to object super constructors
...
If the arguments are reordered, they can not only be reads of temporary
variables, but also implicit type casts of said reads.
Fixes #KT-42002
2020-09-23 13:49:16 +02:00
Dmitriy Novozhilov
40a9bb6eac
[FIR] Assume nullable types as good types for ILT approximation
...
#KT-41982 Fixed
2020-09-23 14:05:10 +03:00
Dmitriy Novozhilov
4374c06537
[FIR] Approximate all integer literals which resolved in independent mode
...
#KT-42016
2020-09-23 14:05:10 +03:00
Alexander Udalov
d48307ec34
JVM IR: do not copy type parameters into suspend lambda classes
...
Declarations inside that class are referencing the type parameters of
the containing function anyway, since we don't do any remapping. So the
resulting IR is slightly more correct, and doesn't lead to type
parameter/argument size mismatch error on IrBased/Wrapped-descriptors.
This reverts a part of 01da7f289b , which looks like it was no longer
necessary after 8d0ffa1444 .
#KT-42028 Fixed
2020-09-23 12:21:37 +02:00
Mikhail Glukhikh
b64b32e06b
FIR: keep captured types in substitution scope
2020-09-23 09:00:57 +03:00
Georgy Bronnikov
8990344bb2
Varargs: add test
2020-09-22 23:53:41 +03:00
Georgy Bronnikov
67d7bf3269
IR: take care of supertypes when copying IrTypeParameters
2020-09-22 23:53:40 +03:00
Georgy Bronnikov
382f423ab9
Mute a test under DCE
2020-09-22 23:53:40 +03:00