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
Georgy Bronnikov
33a2c69122
IR: remap types in LocalDeclarationsLowering
2020-09-22 23:53:40 +03:00
Mikhael Bogdanov
7d4a734791
Fix nullability of typePath parameter
...
#KT-41484 Fixed
2020-09-22 15:37:02 +02:00
Dmitry Petrov
0539b2b389
Mute some FIR->JVM_IR box tests
...
FIR generates delegated class members incorrectly (with non-substituted
signatures).
2020-09-22 16:32:27 +03:00
Dmitry Petrov
c03573fc18
JVM_IR fix override equivalence check for collection stub generation
...
KT-42043 KT-42033
2020-09-22 15:26:34 +03:00
Mark Punzalan
8cac3f654c
[FIR] Handle pre/postfix dec/increment of labeled expression
2020-09-22 11:06:27 +03:00
Mark Punzalan
f55ff8eb1b
[FIR] Capture receiver for pre/postfix dec/increment of qualified access
...
This prevents double-evaluation of the receiver expression, which may
have side-effects. E.g.: a.b++
2020-09-22 10:20:46 +03:00
pyos
6e143a2656
JVM_IR: collect free type parameters when serializing FIR metadata
...
The "free" in "createFreeFakeLambdaDescriptor" and such refers to the
fact that there are no references to type parameters from outside the
current declaration. This is necessary because at the point where the
metadata is written, the type parameters may not even be in scope (e.g.
local delegated properties are serialized at class level, but may refer
to function-scope type parameters).
2020-09-22 09:35:50 +03:00
pyos
aa58ed9234
JVM_IR: partially implement FIR local delegated property reflection
...
Type parameter references are broken, just like for lambdas. Also, the
code is super ugly.
2020-09-22 09:35:45 +03:00
Dmitry Petrov
ee3ada4e55
JVM_IR KT-40304 KT-41998 special handling for 'removeAt'
2020-09-18 14:27:36 +03:00
Ilmir Usmanov
b406022315
Mark Unit unspillable if it is merged with unspillable Unit
...
#KT-42004: Fixed
2020-09-17 23:23:14 +02:00