Jinseong Jeon
ef09850df8
FIR2IR: set superQualifierSymbol for super call
2020-04-27 11:50:26 +03:00
Jinseong Jeon
57fe01c375
FIR2IR: populate overriddenSymbols for overriding functions
...
#KT-38416 Fixed
2020-04-27 11:50:24 +03:00
Alexander Udalov
025d1ca64d
psi2ir: rework representation of bound adapted function references
...
This fixes the problem in JVM IR backend which didn't pass bound
receiver value of an adapted function reference to the superclass
(kotlin/jvm/internal/AdaptedFunctionReference), which caused equals to
work incorrectly on such references (see changes in box tests).
Previously, bound adapted function reference was represented as
IrFunctionExpression to an adapter function which calls the callee. The
value of the bound receiver in that case could only be found in the body
of that adapter function. This is not very convenient, so this change
makes psi2ir produce a block of the adapter function + reference to it.
The bound receiver value is then found in the reference. This is
basically similar to what ProvisionalFunctionExpressionLowering is doing
for all function expressions. And since this IR structure is already
supported in FunctionReferenceLowering, the problem in the JVM IR is
fixed without any additional modifications.
However, inliners do not support this IR structure yet, see KT-38535 and
KT-38536.
2020-04-23 16:47:23 +02:00
Mark Punzalan
b74652aa5b
[FIR] Use ieee754equals for floating-point equality operations
2020-04-23 11:50:54 +03:00
Mikhail Glukhikh
96d8b0bea3
FIR: make KFunctionX derived from KFunction
2020-04-20 17:05:37 +03:00
Mikhail Glukhikh
fe02c2bab3
FIR: return Unit from empty lambda
2020-04-20 17:05:34 +03:00
Jinseong Jeon
c26adf53dd
FIR: resolve suspend lambda properly
2020-04-20 17:05:30 +03:00
Georgy Bronnikov
2c4fcebfec
IR: handle adapted bound references
2020-04-18 20:31:57 +03:00
Jinseong Jeon
9f1ecadd65
IR: more consolidation of synthetic member generation for data class.
2020-04-17 12:38:38 +03:00
Dmitriy Novozhilov
7f02d57d88
[FIR] Correctly detect super type in delegated constructor call
2020-04-17 12:37:29 +03:00
Jinseong Jeon
08b91da6db
FIR: fix body generation for data class's copy method
2020-04-14 11:51:30 +03:00
Mark Punzalan
d4cbfcb79e
[FIR] Promote numeric types during comparisons
...
Added support for comparing platform types. Extracted logic to convert
operator expressions to OperatorExpressionGenerator.
2020-04-14 11:51:30 +03:00
simon.ogorodnik
276c393141
[FIR] Support captured type parameters in java symbol provider
2020-04-13 20:26:19 +03:00
simon.ogorodnik
356e42196c
[FIR2IR] Fix inner class constructor receiver parameter type
2020-04-13 20:26:19 +03:00
simon.ogorodnik
132c8ee210
[FIR] Apply GOOD testData changes after type parameters support
2020-04-13 20:26:18 +03:00
Jinseong Jeon
c370b86141
IR: consolidate generation of synthetic members for data class
2020-04-13 17:30:05 +03:00
Juan Chen
e954aea4cc
[FIR2IR] Support argument reordering of constructor calls
2020-04-13 17:09:04 +03:00
Juan Chen
bae41ddf6d
[FIR2IR] Introduce IrBlock for reordering arguments if needed
2020-04-13 17:09:03 +03:00
Georgy Bronnikov
5700da2bae
IR: type parameter context for return values in InsertImplicitCasts
2020-04-13 14:34:57 +03:00
Mikhail Glukhikh
cd5a4900e6
[FIR] Support dispatch & extension receiver in component calls
2020-04-09 15:22:56 +03:00
Mikhail Glukhikh
a93c7a39e0
[FIR] Provide object [dispatch] && callable reference receivers properly
2020-04-09 15:22:56 +03:00
Mikhail Glukhikh
00fedbf6b3
[FIR2IR] Distinguish 'parent' & 'thisReceiver' for fake overrides
2020-04-09 15:22:56 +03:00
Mikhail Glukhikh
4543367c37
[FIR] Add type parameter mapping for substituted properties
2020-04-09 15:22:56 +03:00
Mikhail Glukhikh
fcdbffde3f
[FIR2IR] Support Java synthetic properties
2020-04-09 15:22:56 +03:00
Mikhail Glukhikh
932b03beb2
[FIR2IR] Don't generate fake overrides for another package privates
2020-04-09 15:22:55 +03:00
Mikhail Glukhikh
5c758af0a6
[FIR] Use ScopeSession from resolve transformer in FIR2IR
2020-04-09 15:22:55 +03:00
Dmitry Petrov
d1c5a42124
KT-36024 Generate adapted callable references as lambdas
...
Make sure both JVM and JVM_IR use the same information to determine
whether a callable reference requires argument adaptation.
2020-04-08 19:02:33 +02:00
Dmitry Petrov
dae8872aba
KT-37779 Treat named value arguments in vararg as arguments with '*'
2020-04-07 15:40:43 +03:00
Mikhail Glukhikh
75283c74ac
[FIR] Generate type arguments for variable assignments
2020-04-03 17:21:39 +03:00
Mikhail Glukhikh
d7460d47de
[FIR] Generate dispatch & extension receivers for variable assignments
2020-04-03 17:21:21 +03:00
Mikhail Glukhikh
b21da3910a
[FIR] Set type arguments also in provideDelegate property reference
2020-04-03 13:42:06 +03:00
Mikhail Glukhikh
8bf4ec66a9
[FIR] Fix receiver type order in delegate property reference
2020-04-03 13:34:46 +03:00
Mikhail Glukhikh
f374c36cd2
[FIR2IR] Generate property extension receiver references properly
2020-04-03 13:31:15 +03:00
Mikhail Glukhikh
f3f7bf70f6
[FIR] Set delegate field receiver properly
2020-04-03 13:29:55 +03:00
Mikhail Glukhikh
036b6c63f6
[FIR] During resolve, set correctly property reference type in delegate
2020-04-03 13:18:47 +03:00
Mikhail Glukhikh
58e00400f1
[FIR2IR] Support PROPERTY_REFERENCE_FROM_DELEGATE origin
2020-04-03 13:05:13 +03:00
Mikhail Glukhikh
5f8fadb220
[FIR2IR] Remove GET_PROPERTY origin from delegate field reads
2020-04-03 13:04:56 +03:00
Denis Zharkov
9abe669443
FIR: Fix resolution for invokes on class qualifiers
2020-04-02 12:10:50 +03:00
Mikhail Glukhikh
630adb34db
[FIR] Don't provide receiver as value in delegated constructor call
2020-03-31 20:28:24 +03:00
Mikhail Glukhikh
a377a6fccb
[FIR2IR] Handle references to constructors separately
2020-03-31 20:27:40 +03:00
Mikhail Glukhikh
282509b0da
[FIR2IR] Provide object receivers for callable references
2020-03-31 20:27:24 +03:00
Jinseong Jeon
ff104f4037
[FIR2IR] Set proper visibility of backing fields
2020-03-31 13:12:36 +03:00
Mikhail Glukhikh
a0978a50e8
[FIR2IR] Correct 'this' conversion when it points to non-closest class
2020-03-30 16:57:52 +03:00
Jinseong Jeon
4388b30f87
[FIR] Fix anonymous object handling as 'this' receiver
2020-03-30 16:57:52 +03:00
Mikhail Glukhikh
d1fc6ff6ee
[FIR2IR] Don't provide backing field symbols for non-Java property refs
2020-03-30 16:23:11 +03:00
Mikhail Glukhikh
d4ae992417
[FIR] Apply type arguments for callable references
2020-03-30 16:23:11 +03:00
Mikhail Glukhikh
810b607a65
[FIR2IR] Provide receivers also for property callable references
2020-03-30 16:23:10 +03:00
Mikhail Glukhikh
697006d782
[FIR2IR] Re-use receiver application logic in callable ref conversion
2020-03-30 16:23:10 +03:00
Juan Chen
d8539fdde9
[FIR2IR] Add dispatch & extension receivers to callable references
2020-03-30 16:23:10 +03:00
Roman Artemev
6e01ec8dd3
[IR] Fix translation of synthetic generic java properties
...
- Compute substituted accessor descriptor to avoid unbound type parameters
2020-03-27 10:52:33 +03:00