Svyatoslav Kuzmich
f9503efb74
[JS IR] Make WITH_RUNTIME imply KJS_WITH_FULL_RUNTIME
...
There is a lot of intersection between these
2020-11-25 21:22:39 +03:00
Kristoffer Andersen
5967e8295e
[IR] Align captured receiver variable naming with old BE
2020-11-18 15:18:10 +01:00
Ilmir Usmanov
fa42a6ba58
Use non-local return target instead of inline site in suspend function
...
return type coercion.
#KT-43226 Fixed
2020-11-10 20:08:45 +01:00
Georgy Bronnikov
31bfc7d4e3
Fix test data
2020-11-10 17:49:55 +03:00
Georgy Bronnikov
d246005891
JVM_IR: fix unbound type parameters in AddContinuationLowering
2020-11-10 17:49:55 +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
Ilmir Usmanov
819d64a2ef
Box inline class returned from suspend lambda non-locally in JVM_IR
...
#KT-41194 Fixed
2020-10-19 14:28:39 +02:00
Ilmir Usmanov
70a4ed3ebc
Box inline class returned from suspend lambda non-locally
...
All inline classes should be boxed coming in and out of lambdas,
however, if the inline class was returned non-locally, it was not boxed.
This change fixes the issue in Old JVM BE.
#KT-41194 In progress
2020-10-19 14:28:36 +02:00
Roman Artemev
023a62395a
Add box test for KT-36897
2020-10-16 16:02:01 +03:00
Alexander Udalov
ac39e4d89c
Minor, add regression test
...
#KT-42554
2020-10-09 22:11:37 +02:00
Ilmir Usmanov
5e02a4efd7
Mark implicit receiver as captured if the function is expression
...
#KT-40260 Fixed
#KT-42280 Fixed
2020-10-05 09:36:54 +02:00
Ilmir Usmanov
6ae2951850
Minor. Do not check suffix of function for tail-call optimization hit
2020-09-29 10:04:03 +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
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
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
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
Ilmir Usmanov
b406022315
Mark Unit unspillable if it is merged with unspillable Unit
...
#KT-42004: Fixed
2020-09-17 23:23:14 +02:00
Jinseong Jeon
d1ba69044e
FIR: update the type of anonymous function as SAM
2020-09-17 12:45:26 +03:00
Ilmir Usmanov
f960201f52
Ignore type parameters of inline class
...
when checking whether we can return unboxed inline class
from suspend function
2020-09-17 11:20:48 +02:00
Jinseong Jeon
72dea05854
FIR2IR: approximate type argument if reified
2020-09-17 09:43:46 +03:00
Jinseong Jeon
2fad935ce2
FIR deserializer: load inline/external flags properly
2020-09-15 10:21:35 +03:00
Jinseong Jeon
0bd7de158c
FIR: update suspend lambda type during declaration resolution
2020-09-14 10:20:45 +03:00
Jinseong Jeon
680dd64211
FIR2IR: pick return target based on matched IrFunction
2020-09-14 10:09:51 +03:00
Jinseong Jeon
6de8ba40c1
FIR: initial support of suspend conversion on arguments
2020-09-10 11:31:24 +03:00
Ilmir Usmanov
52f9569d33
Generate CHECKCAST Object inside the markers
...
otherwise, the unboxing interferes with bytecode analysis.
2020-09-09 17:43:42 +02:00
Ilmir Usmanov
e8a451072e
Minor. Add tests with same JvmType in covariant override
2020-09-09 17:43:41 +02:00
Ilmir Usmanov
7cbd067460
Add tests with resume path
2020-09-09 17:43:39 +02:00
Ilmir Usmanov
1c97eafea8
Check for COROUTINE_SUSPENDED inside callable reference
...
#KT-41429 Fixed
2020-09-09 17:43:37 +02:00
Ilmir Usmanov
ccc5b7afe0
Box inline class in resume path of suspend call
...
#KT-41429
2020-09-09 17:43:35 +02:00
pyos
f198a19ab0
FIR2IR: add local delegated property generation
2020-09-08 08:40:07 +03:00
Jinseong Jeon
bf918e6184
FIR: hide local types if needed
2020-09-03 14:24:31 +03:00
Alexander Udalov
b8d16f3d46
Add EnclosingMethod information to bytecode listing tests
2020-09-02 16:46:05 +02:00
Jinseong Jeon
ca541337d1
FIR: skip return insertion for lambda w/ Unit return type
2020-08-21 19:16:43 +03:00
Dmitry Petrov
8f0aecce58
JVM_IR: KT-40330 Unify field names for captured 'this' with JVM
...
NB some cases such as captured extension receiver for an extension
lambda are not supported yet; to be discussed, to what extent should we
actually follow JVM code shape here.
2020-08-19 11:07:41 +03:00
Ilmir Usmanov
bcbb050326
Use fields for spilled variables for lambda parameters as well
...
In other words, do not generate p$ fields if we can use L$ fields,
which are being cleaned up.
#KT-16222 Fixed
2020-08-13 15:52:51 +02:00
Ilmir Usmanov
00bf07fc41
Force boxing kotlin.Result return type of suspend functions
...
#KT-40843 Fixed
2020-08-11 22:10:47 +02:00
Ilmir Usmanov
b06218c456
Minor. Update test data
2020-08-11 20:27:00 +02:00
Steven Schäfer
53fe30eb45
JVM IR: Don't produce CHECKCASTs on null constants (KT-36650)
2020-08-11 15:13:40 +02:00
Ilmir Usmanov
d861373c6d
Hack attributes for continuation of suspend function in SAM-adapter
2020-08-11 11:58:20 +02:00
Georgy Bronnikov
ea57b4cccb
IR: add and unmute tests
2020-08-10 10:16:24 +03:00
Mikhail Glukhikh
f1356a809e
Fir2IrLazySimpleFunction: generate overridden symbols via FirTypeScope
2020-08-05 12:11:33 +03:00
Ilmir Usmanov
405c9743ef
Do not spill dispatch receiver of suspend functions if it is not used
...
#KT-20571
2020-08-04 15:42:36 +02:00
Ilmir Usmanov
fa8c6deb18
Support restricted suspend lambdas in JVM_IR
...
#KT-40135 Fixed
2020-07-30 20:40:37 +02:00
Jinseong Jeon
bff36e0199
FIR2IR: convert annotations on FirTypeRef
2020-07-30 11:25:36 +03:00
Ilmir Usmanov
60875f96b4
Do not take LVT into account when calculating liveness of variables
2020-07-29 00:01:09 +02:00
Dmitry Petrov
89a0b3e944
Check class source in bytecode listing tests
2020-07-27 19:13:37 +03:00
Dmitry Petrov
0741781462
Compare inner class access flags in bytecode listing tests
2020-07-23 19:13:28 +03:00