Commit Graph

3261 Commits

Author SHA1 Message Date
Alexander Udalov 2f003bdcb5 Minor, add regression test
#KT-42527
2020-10-07 21:31:43 +02:00
pyos dd1682510f JVM_IR: generate accessors for inherited abstract members too
#KT-41468 Fixed
2020-10-07 21:23:18 +02:00
pyos 98088f739d PSI2IR: do not generate when subjects multiple times
`in x` is represented as `<subject expression> in x` in psi, so
generating the entire call and then replacing the argument with a read
of a temporary results in redundant regenerations of the subject.

 #KT-42054 Fixed
 #KT-42455 Fixed
2020-10-07 17:22:25 +03:00
Alexander Udalov e280416fe2 Minor, add regression test 2020-10-07 14:31:01 +02:00
pyos adcbfc7b4c IR: add an emptiness check to all unsigned until loops
Unlike signed integers, a larger unsigned type does not mean a lower
minimum value, so `x - 1` can overflow even if `x` is casted to a larger
type.

 #KT-42186 Fixed
2020-10-07 12:53:00 +02:00
pyos 4a03006162 Generate min/max constants as non-const in ranges tests
in order to make them appear as unknown values to codegen.
2020-10-07 12:53:00 +02:00
Pavel Punegov 260f66183c Don't ignore the test on JS backend as it doesn't fail any more. 2020-10-07 12:22:49 +03:00
Pavel Punegov a439860e12 Replace IGNORE_BACKENDs to TARGET_BACKEND for the Java test 2020-10-07 12:18:09 +03:00
Pavel Punegov 33d28b44fa Unmute typeOf tests in Native backend 2020-10-07 12:18:09 +03:00
Mikhail Glukhikh aa4a042612 [FIR2IR] Use deepest matching symbol also for synthetic properties
#KT-42359 Fixed
2020-10-07 10:43:43 +03:00
Jinseong Jeon 49307e243c FIR deserializer: load annotations on default accessors 2020-10-07 09:46:40 +03:00
pyos a6d5c02d9b JVM_IR: add a transformChildren call to PropertyReferenceLowering
#KT-42354 Fixed
2020-10-06 17:06:34 +02:00
Mikhael Bogdanov eb32a6ddbd Add test for for kt42457 wrong behaviour. Align runtime concatenation with it
#KT-42457
2020-10-06 13:20:40 +02:00
Roman Artemev a52e045c91 [IR BE] Remap references in default arg value in inner class constructor
Make sure that there is no reference into zombie declarations.

 - fix KT-40771
 - add test
2020-10-06 00:06:47 +03:00
Jinseong Jeon 7af564c9f2 FIR: fix vararg remapping that merged named vararg 2020-10-05 12:33:03 +03: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
Jinseong Jeon 380226cba0 FIR2IR: correct dispatch receiver inside inner class constructor 2020-10-05 09:12:19 +03:00
Jinseong Jeon aa488eabc9 FIR2IR: distinguish constructor when picking return target 2020-10-05 09:09:39 +03:00
Dmitry Petrov e018f2bd3e JVM_IR more precise check for special bridges in super class
KT-41123
2020-10-02 12:51:49 +03:00
Mark Punzalan b58d75440b [FIR] Fix tests for vararg execution order after rebase. 2020-10-02 12:08:07 +03:00
Mark Punzalan a2a4d94834 [FIR] Capture array and indices for postfix/prefix increment/decrement
of array element (including overloaded indexed access operators, e.g.,
`a[b, c]++`).

This prevents double-evaluation of the array and indices expressions,
which may have side-effects.
2020-10-02 12:08:03 +03:00
Mark Punzalan eb631bc429 [FIR] Keep vararg argument order in resolved calls (KT-17691). 2020-10-02 12:08:02 +03:00
Mark Punzalan f6ce2d893c [FIR] Handle varargs in overloaded indexed access operator. 2020-10-02 12:08:01 +03:00
Denis Zharkov 3dfbd36f15 FIR: Unmute passing blackbox tests 2020-10-01 17:49:02 +03:00
Victor Petukhov d02432cf93 Introduce warning for the changing arguments execution order for named varargs (KT-17691) 2020-10-01 12:15:13 +03:00
Victor Petukhov d62c665e99 Introduce language feature to enable the correct arguments execution order for named varargs (KT-17691) 2020-10-01 12:14:49 +03:00
Jinseong Jeon b4ac2f5b55 FIR serializer: special handling of Continuation 2020-09-30 12:21:57 +03: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
Dmitry Petrov 1fc459ab4c JVM_IR KT-42260 add abstract overrides for generated stubs 2020-09-29 14:06:12 +03: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
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
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
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
Dmitry Petrov 1c4567c999 Add tests for KT-40152 2020-09-23 18:14:21 +03:00