Denis Zharkov
e1e149a062
FIR: Support coercion-to-unit semantics for callable references
2020-05-18 11:17:45 +03:00
Jinseong Jeon
615636ed55
FIR2IR: apply SAM conversion to arguments of functional type.
2020-05-15 15:08:43 +03:00
Mikhail Glukhikh
cdac6157a9
[FIR2IR] Force loading Java SAM from external classes
2020-05-14 14:07:40 +03:00
Mikhail Glukhikh
e7e80be34a
[FIR2IR] Populate overridden symbols even for !isOverride
...
Before this commit we considered !isOverride as a sign that
function / field / accessor has no overridden symbols.
However, it's false for deserialized, because isOverride
is always false there.
This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
2020-05-14 13:40:36 +03:00
Jinseong Jeon
e844c59e7e
FIR2IR: filter correct use-site target for value parameter annotations.
2020-05-14 09:41:11 +03:00
Jinseong Jeon
931ba4892a
FIR2IR: split property annotations according to use-site targets.
2020-05-14 09:41:11 +03:00
Jinseong Jeon
6034fcdc46
FIR2IR: apply SAM conversion to arguments if needed
2020-05-13 11:28:48 +03:00
Mikhail Glukhikh
457fb09e3a
[FIR] Use tower to resolve delegated constructors, set dispatch receiver
2020-05-12 16:57:07 +03:00
Jinseong Jeon
eac9af521e
[FIR2IR] differentiate external Java stub origin from external stub
2020-05-08 17:45:39 +03:00
Mikhail Glukhikh
b271b6d7a8
[FIR2IR] Add conversion of value parameter annotations
2020-05-08 17:30:28 +03:00
Mikhail Glukhikh
76f6e27e37
[FIR2IR] Add initial support of collection literals
2020-05-08 17:30:24 +03:00
Mikhail Glukhikh
f3e2dbf360
[FIR2IR] Add conversion of function annotations
2020-05-08 17:30:19 +03:00
Mikhail Glukhikh
d8f9643650
[FIR2IR] Use intersection type approximation for receivers
2020-05-07 15:27:17 +03:00
Dmitry Petrov
b574917314
Minor: update FIR2IR testData
2020-05-01 17:55:49 +03:00
Mads Ager
6257b32954
[JVM_IR] Avoid boxing when comparing primitive to object.
2020-05-01 17:53:34 +03:00
Dmitry Petrov
1d10776db4
Minor: update FIR2IR testData
2020-05-01 13:14:21 +03:00
Mads Ager
db17184cfd
[JVM_IR] Avoid some boxing when comparing boxed primitives to primitives.
2020-05-01 13:14:20 +03:00
Jinseong Jeon
9a561f4a7c
FIR2IR: generate synthetic members for inline class
2020-04-30 13:09:53 +03:00
Jinseong Jeon
0890b8bad3
FIR2IR: set superQualifierSymbol for property access
2020-04-30 12:26:47 +03:00
Jinseong Jeon
a084c5bf7d
FIR2IR: populate overriddenSymbols for overriding properties
2020-04-30 12:25:48 +03:00
Dmitry Petrov
802372ceff
PSI2IR: suspend conversion on arbitrary arguments
2020-04-28 12:41:56 +03:00
Dmitry Petrov
6b9a7464f5
PSI2IR: Support suspend conversion for function references
2020-04-27 21:02:37 +03:00
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