simon.ogorodnik
132c8ee210
[FIR] Apply GOOD testData changes after type parameters support
2020-04-13 20:26:18 +03:00
Mikhail Glukhikh
a93c7a39e0
[FIR] Provide object [dispatch] && callable reference receivers properly
2020-04-09 15:22:56 +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
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
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
Jinseong Jeon
cdf5a2a5a1
FIR: set dispatch receiver parameter for inner class's constructor.
2020-03-25 12:40:09 +03:00
Mikhail Glukhikh
10c2aa1657
[FIR2IR] Set origin properly for set field / variable
2020-03-18 17:09:35 +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
Dmitry Petrov
90d012cecb
Handle unbound extension receiver in callable reference adaptation
2020-03-10 16:56:48 +03:00
Mikhail Glukhikh
e9699e7173
FIR2IR: provide correct origins for arithmetic operators
2020-03-10 15:19:35 +03:00
Dmitry Petrov
4038c758ca
KT-37131 Record default arguments in argument adaptation
...
Also, don't adapt argument when expected type is base reflection type
(KCallable<T>, etc), since such types don't contain parameter types.
2020-03-05 19:32:39 +03:00
Mikhail Glukhikh
2308e5bb7c
FIR2IR: in case of use-site generic type use call from original class
2020-02-28 15:29:02 +03:00
Mikhail Glukhikh
db7401d8eb
FIR2IR: set GET_PROPERTY origin for property reads
2020-02-28 15:29:01 +03:00
simon.ogorodnik
f9483b1f4f
[FIR] KT-37027: Add 'out' projection to vararg elements
2020-02-27 19:07:17 +03:00
Mikhail Glukhikh
a3f676317f
FIR2IR: pre-cache type parameters before function creation
...
Type parameters can be referred from e.g. function return type,
so we should determine them earlier to be able to set their indexes
2020-02-20 18:34:51 +03:00
Mikhail Glukhikh
9017654b9d
[FIR] Handle default parameters when checking callable reference type
...
#KT-36759 Fixed
2020-02-19 18:09:06 +03:00
Mikhail Glukhikh
56c819f06e
FIR2IR: add two-statements block with iterator + while for 'for' loops
...
Before this commit we had two statements blocks for 'for' loops:
range variable declaration + iterator variable declaration + while loop.
However, BE requires a bit different loop structure to make lowerings
properly so in this commit iterator declaration & while loop were
extracted to separate block.
2020-02-17 20:35:17 +03:00
Mikhail Glukhikh
2bfce4f127
FIR2IR: provide correct origins for 'for' loops
2020-02-17 20:35:17 +03:00
Mikhail Glukhikh
4a4fb5a590
Raw FIR: eliminate range variable declaration in 'for' loops
2020-02-17 20:35:17 +03:00
Steven Schäfer
50c477bee1
Update IR text test expectations for FIR
2020-02-15 22:38:10 +03:00
Mikhail Zarechenskiy
1ba0870ae3
[NI-MIGRATE] Update IR text tests
2020-02-13 11:16:00 +03:00
Juan Chen
8e35545e10
FIR2IR: provide type arguments for class 'this' receiver
2020-02-11 22:50:06 +03:00
Juan Chen
7249d2f889
[FIR] Fix translation of invokes & add return expressions for lambdas
...
* fixed NoSuchMethod caused by mismatched signatures of the "invoke" method generated for lambda arguments
* added test cases in invoke.kt for KFunction and anonymous functions
* added a transformer to wrap the last expression in the bodies of lambdas with return
2020-02-06 12:44:14 +03:00
Juan Chen
188abc243a
[FIR] add vararg arguments support, improve vararg parameters support
2020-01-31 16:41:25 +03:00
Mads Ager
e8a640851a
FIR: Change the Fir2Ir handling of smart casts.
...
Generate the expression with the original type and then insert
an implicit conversion. That matches the behavior of psi2ir
better and therefore avoids breaking backend assumptions.
In particular, IrGetValue expects the type of the underlying
symbol and the type of the IrGetValue to be the same.
2020-01-31 09:31:52 +01:00
Dmitry Petrov
53f66e9509
PSI2IR: SAM conversion in varargs
2020-01-30 10:27:01 +03:00
Dmitry Petrov
bf9673a0a2
PSI2IR: SAM conversion should be performed once for index variables
...
Given esoteric code as in 'caoWithAdaptationForSam.kt', we should make
sure that we pass same objects to 'get' and 'set'.
2020-01-29 15:30:07 +03:00
Dmitry Petrov
c939fb7b05
PSI2IR: Fix argument adaptation for unbound references
...
NB front-end "lies".
2020-01-27 17:03:48 +03:00
Dmitry Petrov
0152f19d5f
PSI2IR: Use substituted value parameter in function reference adaptation
2020-01-27 17:03:48 +03:00
Mikhail Glukhikh
7721eaab23
[FIR] Transform qualified access / callable refs type arguments properly
2020-01-27 00:34:17 +03:00
Dmitry Petrov
90b250d241
PSI2IR: Fix bound inner class constructor callable reference generation
2020-01-24 16:32:07 +03:00
Dmitry Petrov
c540116b71
IR: additional callable reference adapter stuff in IR
...
- IrFunctionReference.reflectionTarget: IrFunctionSymbol?
- add separate declaration origin for callable reference adapters
- bump IR ABI version
2020-01-24 11:21:26 +03:00
Dmitry Petrov
57bbfbbfcc
PSI2IR: capture adapted reference receiver to a local val if required
2020-01-24 11:21:25 +03:00
Dmitry Petrov
38b90b7fbd
Minor: move callable reference IR tests to a separate directory
2020-01-24 11:21:25 +03:00