Dmitriy Novozhilov
cadc2dfe4d
[FIR] Fix generating fir for invoke calls
2019-11-08 12:12:38 +03:00
Mikhail Glukhikh
48938a20a7
Raw FIR: add synthesized Enum.valueOf() function
2019-11-08 09:58:02 +03:00
Mikhail Glukhikh
581504aac5
Raw FIR: add synthesized Enum.values() function #KT-24076 Fixed
2019-11-07 09:29:00 +03:00
Mikhail Glukhikh
bd1127cfa3
FIR: resolve lambda arguments even if an outer call is unresolved
2019-11-06 13:19:20 +03:00
Mikhail Glukhikh
60e6d2e521
Resolve local declaration statuses & types inside bodies in FirBodyResolveTransformer
2019-11-06 13:19:10 +03:00
Dmitriy Novozhilov
010dae454e
[FIR] Fix extracting parameters from extension function types
2019-11-05 15:22:23 +03:00
Steven Schäfer
704e6e96fa
Fir2Ir: Produce IR_TEMPORARY_VARIABLE origins
2019-11-05 14:58:47 +03:00
Steven Schäfer
733c7579aa
Normalize names of temporary variables in IrTextTests
2019-11-05 14:58:47 +03:00
Dmitry Petrov
1e63101a27
FIR2IR: fix testData after rebase
2019-11-01 14:55:12 +03:00
Dmitry Petrov
6cde86139c
IR: isFakeOverride: fix testData after rebase
2019-11-01 14:55:11 +03:00
Dmitry Petrov
edaa42ea46
IR: IrField.isFakeOverride
2019-11-01 14:55:10 +03:00
Dmitry Petrov
82c527c2cc
IR: IrProperty.isFakeOverride
2019-11-01 14:55:10 +03:00
Dmitry Petrov
2682057767
IR tests: update testData for IrSimpleFunction.isFakeOverride
2019-11-01 14:55:09 +03:00
Dmitry Petrov
843fb88459
IR: IrSimpleFunction.isFakeOverride
2019-11-01 14:55:09 +03:00
Dmitriy Novozhilov
073578bf1c
[FIR] Fix Fir2Ir testdata broken in a501e514
2019-11-01 11:07:16 +03:00
Dmitry Petrov
8b2fdca706
FIR2IR: fix testData
2019-10-31 11:13:45 +03:00
Steven Schäfer
af74fd047a
psi2ir: Consistently use type unit for statements
...
These changes allow us to accurately distinguish between statements and
expressions in the IR.
This also fixes the types of non-exhaustive conditional statements.
2019-10-31 11:13:44 +03:00
Steven Schäfer
0da4b06074
psi2ir: Fix return insertion
...
We should only insert a return statement at the end of a lambda or
function if the final statement is used as an expression (slice
USED_AS_RESULT_OF_LAMBDA and USED_AS_EXPRESSION).
2019-10-31 11:13:44 +03:00
Dmitriy Novozhilov
36ad065792
[FIR] Fix testdata broken after d2b895d8
2019-10-30 18:49:07 +03:00
Mikhail Glukhikh
d4af35d794
FIR: add substitution for Java fields
2019-10-30 12:55:37 +03:00
Mikhail Glukhikh
384134a069
FIR2IR: fix handling constructors & their symbols (related also to local classes)
2019-10-29 16:27:41 +03:00
Mikhail Glukhikh
7dee1cd9d2
Build member scope for FirAnonymousObject correctly
2019-10-29 16:27:41 +03:00
Mikhail Glukhikh
a13ae08b52
FIR: add classifiers to local scopes, process local class symbols correctly
2019-10-29 16:27:40 +03:00
Dmitriy Novozhilov
3658bee253
[FIR] Fix testdata related to callable references
2019-10-29 13:03:13 +03:00
Dmitriy Novozhilov
b93357be48
[FIR] Support assignment operators
2019-10-29 13:03:13 +03:00
Denis Zharkov
ea43d2880c
FIR: Update FIR2IR test data changed because of callable references
...
^KT-32725 Fixed
2019-10-28 17:07:26 +03:00
Steven Schäfer
210c354ae5
Fir2Ir: Set initializers for temporary variables
2019-10-25 14:27:19 +03:00
Dmitry Petrov
eebb071ae9
KT-34509 Properly unwrap callable reference descriptor
...
NB there's a problem with callable references to SAM constructors,
see also KT-16789
2019-10-22 12:30:15 +03:00
Dmitry Petrov
1d229b6dca
FIR2IR: isExpect
2019-10-21 13:04:59 +03:00
Dmitry Petrov
6532f29cc6
IR: isExpect
2019-10-21 13:04:59 +03:00
Dmitriy Novozhilov
4df4c58a05
[FIR] Resolve type of when expression to Unit if it is not exhaustive
2019-10-21 11:59:44 +03:00
Dmitriy Novozhilov
f19a878948
[FIR] Add exhaustive checker for when expressions
...
Also remove generating default else branch introduced in 38fa0122 and 54eb4cf9
2019-10-17 16:20:59 +03:00
Mads Ager
92cf521e11
[IR] Deal with forward references in default argument lambdas.
...
Rely on the frontend weeding out cases that are not supported.
In psi2ir, introduce all the parameters before processing default
values.
Change the DefaultArgumentStubGenerator to generate code that
matches the behavior of the current backend.
2019-10-10 09:00:51 +02:00
Mikhail Glukhikh
813e35643c
FIR resolve: fix constructor handling in qualifier scope
...
Constructors aren't more visited twice in regular scopes
2019-10-04 18:59:10 +03:00
Mikhail Glukhikh
4718ae4186
FIR: don't perform argument check for callable references
...
This fixes failing FIR2IR test
2019-09-27 09:23:34 +03:00
Mikhail Glukhikh
da7d5d5702
FIR: provide receiver for accessor of extension property
2019-09-27 09:22:52 +03:00
Steven Schäfer
76ab631214
psi2ir: Optimize generated data class members
...
- Access underlying fields directly, instead of using accessors. This is
safe since data classes are always final.
- Don't generate a temporary variable in hashCode to use as the
accumulator.
Both optimizations are effectively present in the current JVM backend
and with these changes the generated code is much closer to what the
current backend generates.
2019-09-18 18:56:42 +02:00
Denis Zharkov
2bdbed978b
FIR: Support SAM constructors
2019-09-18 10:03:55 +07:00
Denis Zharkov
5567620563
FIR: Support SAM conversion
2019-09-18 10:00:04 +07:00
Dmitriy Novozhilov
8614323f80
[FIR] Tests. Update some outdated testdata
2019-09-13 12:21:59 +03:00
Dmitry Petrov
cb13dd3cdd
Add psi2ir tests for 'break' and 'continue' inside 'when'
2019-09-12 15:11:01 +03:00
Mads Ager
90a37617a4
[JVM_IR, IR] Remove more needless temporary variables.
...
Avoid using a separate origin for temporary variables introduced
for for loops. That doesn't add anything and gives one more case
for optimizations to deal with.
Extend the JVM specific optimizations to remove temporary
variables to deal with more cases encountered in for loops
lowering.
2019-09-11 10:07:45 +02:00
Mikhail Glukhikh
98f72e58bd
FIR deserializer: use class type parameters in constructor directly
...
This allows calls like Pair(...) to be resolved correctly
2019-09-05 16:26:15 +03:00
Mikhail Glukhikh
6a7ebe8928
FIR substitution: do not create fake overrides if types aren't changed
2019-09-05 16:26:14 +03:00
Mikhail Glukhikh
5386cfe254
FIR2IR: support fake overridden properties
2019-09-05 16:26:14 +03:00
Mikhail Glukhikh
687db20029
FIR: support fake overrides for properties
2019-09-05 16:26:14 +03:00
Mikhail Glukhikh
5741ff5d86
FIR: split default importing scopes into low/high priority ones
...
This fixes resolve of StringBuilder(), AssertionError(), etc.
2019-09-05 16:26:14 +03:00
Dmitriy Novozhilov
5c29af4b53
[FIR] Tests. Update some outdated FIR testdata
2019-09-02 10:43:10 +03:00
Dmitriy Novozhilov
38fa0122e8
[FIR] Add synthetic else branch to when if it's missing
...
This change is needed for correct work of data flow, because for
non-exhaustive when there is a else branch in terms of control flow
graph.
This change leads to some errors when when is actually exhaustive, but
we still add else branch. Those errors will be gone when exhaustive
checker will be introduced
2019-09-02 10:43:05 +03:00
Mikhail Glukhikh
0962755fde
FIR2IR: drop field receiver consistency check (due to delegate field case)
2019-08-30 11:47:33 +03:00