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
Svyatoslav Scherbina
f3bc8d179c
Add one more IR text test case
2018-03-16 14:47:20 +03:00
Svyatoslav Scherbina
aac940415f
Fix psi2ir when type parameter bound goes after the type parameter
2018-03-16 14:47:18 +03:00
Svyatoslav Scherbina
7a2d761a7d
Add minor improvements to psi2ir and IR utilities:
...
* Generate missing IR parameter declarations in external stubs
* Use origin = FAKE_OVERRIDE in external IR stubs for fake overrides
* Set .parent in external IR stubs
* Set .parent in IR generated by some utility methods
2018-03-02 15:41:48 +03:00
Dmitry Petrov
13a7270129
Generate type parameter declarations for property accessors
...
This requires "scoped" type parameter symbols, because in the ugly world
of descriptors property accessors have no type parameters of their own.
2018-03-02 14:35:35 +03:00
Dmitry Petrov
b206bf199f
Add type operand symbol for type operator expression
2018-02-28 10:35:13 +03:00
Dmitry Petrov
e89047d2cc
Generate super classes and overridden functions in proper scope
...
Such references require proper scope so that local symbols are bound.
Example:
```
fun <T> outer() {
abstract class ALocal<S : T> {
abstract fun bar()
}
class Local<S : T> : ALocal<S>() {
override fun bar() {}
}
}
```
Here local classes have type parameters with upper bounds depending on
function type parameters, and members overriding members in other local
classes.
2018-02-28 10:35:13 +03:00
Dmitry Petrov
02f01efaac
Update testData
2018-02-28 10:35:13 +03:00
Dmitry Petrov
e5295d0f78
Generate references to overridden declarations as a separate pass
...
NB currently it relies on overriddenDescriptors in a FunctionDescriptor,
thus maybe incorrect for transformed declarations.
2018-02-28 10:35:13 +03:00
Dmitry Petrov
6cb68531ae
Minor: add missing "'"
2018-01-17 12:31:07 +03:00
Dmitry Petrov
fdd000c94f
Update testData to new format
2018-01-17 12:31:07 +03:00
Dmitry Petrov
f5fde2c24f
Dump absent type arguments
2017-05-05 09:59:30 +03:00
Dmitry Petrov
78a601af87
Generate parameter declarations for fake overrides
2017-05-04 09:33:03 +03:00
Dmitry Petrov
fa4dc26814
Put 'thisReceiver' declaration in class
...
Interfaces also have 'thisReceiver'
2017-05-04 09:33:03 +03:00
Dmitry Petrov
a511540aad
Render receivers as 'this@owner: type'
...
Add test for generic inner class with generic outer class.
2017-05-04 09:33:03 +03:00
Dmitry Petrov
1bf6f8fc57
Do not generate separate type parameter declarations for constructors
2017-05-04 09:33:03 +03:00
Dmitry Petrov
d7a362b4f6
Binding: all current tests are green.
2017-05-04 09:33:03 +03:00