Mikhail Glukhikh
049bc6a431
[FIR2IR] Minor: extract variable
2020-03-18 17:09:36 +03:00
Mikhail Glukhikh
51c83e5f62
[FIR2IR] Move delegating constructor call to body start
2020-03-18 17:09:36 +03:00
Mikhail Glukhikh
10c2aa1657
[FIR2IR] Set origin properly for set field / variable
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
c0f8be5d4e
[FIR2IR] Generate setter call for assignments, if any
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
53cb9035b6
[FIR2IR] Use backing field to read property if no getter
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
b6fdd6197a
[FIR2IR] Extract CallGenerator from the main visitor
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
5357e7b3ab
[FIR2IR] Extract ClassMemberGenerator from the main visitor
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
63aa5191da
Move Fir2IrFakeOverrideGenerator to 'backend.generators' package
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
8f27129c36
[FIR2IR] Introduce & use components storage
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
175145ce4e
[FIR2IR] Extract separate classifier storage from declaration storage
2020-03-18 17:09:34 +03:00
pyos
2c06503311
JVM_IR: partially fix inline methods using captured crossinline lambdas
...
The fields containing crossinline lambdas should be package-private to
avoid generating synthetic accessors, which break object regeneration.
Note that the inline methods cannot actually be called, as call sites
will attempt to read the captured lambda from a field through a *copy*
of the local containing the object, so these reads will not be inlined,
causing an exception at runtime:
inline fun f(crossinline g: () -> Unit) = object : I {
inline fun h() = g()
// effectively `val tmp = this; return tmp.$g()`:
override fun run() = h()
}
f {}.run() // NoSuchFieldError: $g
This particular example can be fixed by reusing locals for receiver
parameters in IrInlineCodegen, but explicitly assigning `this` to
another variable and calling an inline method on it will break it again.
(This is only applicable to the JVM_IR backend, as the non-IR one fails
to generate `f` at all for some other reason.)
2020-03-18 13:13:54 +01:00
Dmitry Petrov
dd27b3d4f1
KT-36973 Keep private default interface members private
2020-03-18 14:18:47 +03:00
Dmitry Petrov
1c24a97b9e
KT-36972 Don't create proxies for companion @JvmStatic $default in host
...
When creating proxy functions in a host class for @JvmStatic members of
companion object, skip functions for default parameters handling.
2020-03-18 13:33:56 +03:00
Dmitriy Novozhilov
f85022532d
[FIR] Rename FirArraySetCall to FirAugmentedArraySetCall
2020-03-18 11:31:54 +03:00
Dmitriy Novozhilov
2b986194fb
[FIR] Add desugaring of array assignments and resolve of it
...
#KT-37516 Fixed
2020-03-18 11:31:53 +03:00
Mikhail Glukhikh
26f919df03
Fix some nullable usages of not-null type parameters (KT-36770)
2020-03-18 10:24:26 +03:00
Denis Zharkov
a2e7b6d20e
FIR: Do not add "field" to accessor of a property with receiver
2020-03-18 10:22:10 +03:00
Dmitry Petrov
ade18d144a
KT-36810 Implement javaPrimitiveType intrinsic in JVM_IR
2020-03-17 22:56:45 +03:00
Dmitry Petrov
2851fab281
KT-36809 Implement javaObjectType intrinsic in JVM_IR
2020-03-17 22:56:45 +03:00
pyos
2e542da91d
JVM_IR: fix accesses from crossinline lambdas in other packages again
2020-03-17 16:38:32 +01:00
Denis Zharkov
7a1eb9214d
FIR: Fix resolution for lambda returning resolved qualifier
2020-03-17 16:33:48 +03:00
Denis Zharkov
e1312a752a
FIR: Allow a field override another field with the same name
2020-03-17 16:33:48 +03:00
Denis Zharkov
7203499b7a
FIR: Fix visibility check for protected within a companion
2020-03-17 16:33:48 +03:00
Denis Zharkov
170978a4f1
FIR: Move fixed tests from problems directory to common
2020-03-17 16:33:48 +03:00
Denis Zharkov
a1b0b15521
FIR: Add test for KT-37478
...
^KT-37478 Fixed
2020-03-17 16:33:48 +03:00
Jinseong Jeon
b71b0fa32c
Update stepping tests to inspect source name, instead of method info.
2020-03-17 13:39:35 +01:00
Jinseong Jeon
5dc1651a44
JVM: missed line number for return expression.
2020-03-17 13:39:35 +01:00
Dmitry Petrov
6809f4439c
Fix range-based 'for' loop with 'continue' in range bounds
...
1. Search for increment function in range element type, not in inferred
induction variable type
(which can be inappropriate, e.g., 'Nothing' in case of 'continue').
2. Handle nested loops with shared exit labels
(generated by JVM_IR for KT-37370 case).
KT-37370 KT-37373
2020-03-17 12:18:48 +03:00
Dmitry Petrov
d5b65abc5d
KT-37505 Add box test
2020-03-17 12:18:48 +03:00
simon.ogorodnik
f226d855e1
Fix NI flag in modularized test for old frontend
2020-03-16 21:42:05 +03:00
simon.ogorodnik
4844a90788
[FIR] KT-37453: Type argument mapping
...
#KT-37453 Fixed
2020-03-16 21:41:59 +03:00
Steven Schäfer
6a1e35389c
JVM IR: Mangle interface implementation methods in inline classes
2020-03-16 18:48:16 +01:00
Igor Yakovlev
af1e3fb10d
UL properties supports JvmSynthetic annotation for get: and set: modifiers
...
(+small refactoring)
Fixed #KT-34973
2020-03-16 18:42:17 +03:00
anastasiia.spaseeva
0e26194a27
[FIR] Test for KT-37431
2020-03-16 17:24:01 +03:00
Dmitriy Novozhilov
1b479c49a8
[FIR] Fix exhaustiveness checking for conditions with equals to object
...
#KT-37488 Fixed
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
3765a1efaf
[FIR] Add values and valueOf to deserialized enums
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
caec5fe352
[FIR-TEST] Add test for KT-37478
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
37aa234bb7
[FIR] Fix transform of subject of when expressions with subject variable
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
820da6edaa
[FIR] Don't set up expected type for function body
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
813003e12e
[FIR] Approximate statements with ILT without expected type
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
698f78570d
[FIR] Add ability to pass data=null to transformInplace with data producer
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
fe95e37c88
[FIR] Add equality to Unit constraint for lambda without return expressions
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
fc2e7da2a9
[FIR] Don't pass flow from inplace lambdas while resolve delegates
...
#KT-36248
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
e90d86e1b4
[FIR] Add cfg for delegating constructor calls
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
83257d00b9
[FIR] Pass flow from postponed lambdas to closest completed call
...
#KT-36248
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
3a5c30a581
[FIR] Remove ortho splines mode from CFG dump
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
f83cedd244
[FIR] Don't render call arguments in cfg dump
2020-03-16 17:04:27 +03:00
Roman Artemev
8e295de593
[KLIB] Make sure float/double bits have fixed representation for NaN.
...
- Store float and double constants as fixed32/64 proto value
and encode/decode them in our side.
2020-03-16 16:49:39 +03:00
Dmitry Gridin
ae96a68bd1
i18n: createByPattern: add @NonNls to parameters
2020-03-16 18:40:48 +07:00
Dmitry Gridin
2b8373447a
i18n: KtPsiFactory: add @NonNls to parameters
2020-03-16 18:40:48 +07:00