Dmitriy Novozhilov
010dae454e
[FIR] Fix extracting parameters from extension function types
2019-11-05 15:22:23 +03:00
Steven Schäfer
733c7579aa
Normalize names of temporary variables in IrTextTests
2019-11-05 14:58:47 +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
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
Dmitriy Novozhilov
36ad065792
[FIR] Fix testdata broken after d2b895d8
2019-10-30 18:49:07 +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
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
Mikhail Glukhikh
5386cfe254
FIR2IR: support fake overridden properties
2019-09-05 16:26:14 +03:00
Mikhail Glukhikh
bd5e1aeef5
FIR2IR: change backing field visibility to private
2019-08-30 11:47:32 +03:00
Mikhail Glukhikh
13d14df8ae
FIR: set dispatch receiver for data class generated functions
2019-08-30 11:47:31 +03:00
Steven Schäfer
a90ac2438d
Set correct field visibility in psi2ir
2019-08-28 19:41:11 +02:00
Mikhail Glukhikh
27ccff12c1
FIR: add resolve for delegated super-type
...
This commit fixes FIR modularized resolve test on whole Kotlin project
(without it we had empty super-type set with delegated super-types)
2019-08-22 18:53:15 +03:00
Dmitriy Novozhilov
e3e1f3c2aa
[FIR] Fix transforming value parameters of anonymous functions
2019-08-22 14:14:55 +03:00
Dmitry Petrov
bdec8b04e8
Minor: trim in RenderIrElementVisitor
2019-07-31 10:37:35 +03:00
Mikhail Glukhikh
63b7fa70f9
FIR2IR: add extension receiver parameters to functions
2019-07-25 09:46:29 +03:00
Dmitry Petrov
ffd9b45ef3
IrFunctionExpression: add 'origin'
...
This is actually either a LAMBDA or an ANONYMOUS_FUNCTION.
Not quite sure if it's really required, but some tools such as IR-based
decompiler might require this information.
2019-07-19 11:36:19 +03:00
Dmitry Petrov
41b59f9b9a
IrFunctionExpression: update fir2ir tests
2019-07-19 11:36:19 +03:00
Dmitry Petrov
ed2b4a8bec
Introduce IrFunctionExpression IR element
...
Use it to represent proper function expressions (lambdas and anonymous
functions).
2019-07-19 11:36:18 +03:00
Mikhail Glukhikh
54078c4e9c
FIR resolve: support inferring property type from getter
2019-06-20 15:26:39 +03:00
Simon Ogorodnik
d3f00280e9
Disable data class copy function body in raw FIR
...
After this commit we require 'copy' body generation in FIR2IR converter
2019-05-28 10:18:00 +03:00
Mikhail Glukhikh
05e4539019
Set resolved type for lambdas properly during FIR resolve
...
Partially done by semoro
2019-05-28 10:17:31 +03:00
Mikhail Glukhikh
2bf80ff64e
FIR: support copy functions in data classes
2019-05-23 14:02:10 +03:00
Mikhail Glukhikh
26974788e9
FIR2IR converter: handle receivers and parents more correctly
2019-05-23 14:02:07 +03:00
Steven Schäfer
90c3269502
Fix type parameters in WrappedClassConstructorDescriptor
...
IrConstructorCall gets type parameters from the class in addition to the
constructor declaration. This behavior is already implemented for
ClassConstructorDescriptorImpl, but was not implemented for
WrappedClassConstructorDescriptor, leading to missing type arguments for calls
to constructors generated in a lowering pass.
2019-05-16 20:26:18 +02:00
Mikhail Glukhikh
5262f0a53f
Fir2Ir: apply major text data update after a bunch of resolve changes
2019-04-30 18:45:57 +03:00
Dmitry Petrov
b78d1bb2b9
IrConstructorCall support in JVM_IR, JS_IR, and FIR2IR
2019-04-26 17:43:25 +03:00
Dmitry Petrov
11eea6e86a
psi2ir: generate IrConstructorCall elements in IR builder helpers
2019-04-26 17:43:24 +03:00
Dmitry Petrov
e3fd74a580
IR: annotations are represented as IrConstructorCall elements
...
Also, they are rendered somewhat nicer
2019-04-26 17:43:24 +03:00
Mikhail Glukhikh
881073b1c9
Add basic FIR -> IR converter with a set of text tests
...
Tests duplicate IrTextTestCaseGenerated
#KT-24065 Fixed
2019-04-05 16:18:58 +03:00
Anton Bannykh
9c3e452396
IR: (update test data) NOT(Boolean) -> Boolean.not
2019-03-25 17:49:15 +03:00
Dmitry Petrov
a5c95275f0
IR: get rid of descriptors in DumpIrTree
2019-03-21 11:23:51 +03:00
Dmitry Petrov
9a82f926a1
IR: descriptor-less rendering of IR elements (work in progress)
2019-03-21 11:23:51 +03:00
Dmitry Petrov
e49eae528c
IR: don't use descriptors in rendering (work in progress)
...
There's some descriptor-based code remaining. Need some more work on IR.
2019-03-21 11:23:51 +03:00
Dmitry Petrov
6f97db81c8
Update testData after IR type rendering changes
2018-12-07 10:51:55 +03:00
Igor Chevdar
2ff87ab1ce
Fixed tests on IR copier
2018-11-15 19:13:06 +03:00
Dmitry Petrov
bd1491ac8a
psi2ir: Merge constant entries in string template expressions
...
This is required to handle UCNs properly, see KT-28006.
#KT-28006
2018-11-08 12:29:15 +03:00
Dmitry Petrov
6dfcf15a39
IR: IrField.isStatic
2018-07-31 13:39:54 +03:00
Svyatoslav Scherbina
226f16b44e
ir.tree: fix .originalKotlinType for transformed IR types
2018-07-03 09:55:12 +03:00
Dmitry Petrov
b1d0a5e807
Fix delegated function body generation
2018-06-29 11:24:46 +03:00
Dmitry Petrov
799fcc2606
Fix IrType rendering, update testData
2018-06-29 11:24:46 +03:00
Roman Artemev
960fba3c4e
Fix test failures
2018-06-15 16:23:06 +03:00
Dmitry Petrov
cb301763f3
psi2ir: Fix implicit casts generation
...
Implicit cast from T to S is not required if
T <: S.makeNullable()
2018-05-30 12:02:34 +03:00
Dmitry Petrov
ab455d6572
IR: IrSimpleFunction.correspondingProperty: IrProperty?
...
Non-null for a property accessor, points to a corresponding property.
2018-05-25 09:40:51 +03:00
Dmitry Petrov
0feb50021c
IrClass.isInner
2018-05-14 10:37:27 +03:00
Dmitry Petrov
93f5fe2451
IrField is 'final' if corresponding property is 'val'
2018-05-11 11:24:46 +03:00
Dmitry Petrov
729efaf912
IR: IrConstructor.isPrimary
...
NB this is required for Kotlin/JS.
2018-05-11 11:24:46 +03:00
Dmitry Petrov
9717345e3b
IR: IrField.isFinal
2018-05-11 11:24:46 +03:00
Dmitry Petrov
135d3ab57a
Fix type arguments mapping
2018-03-23 11:43:44 +03:00