Denis Zharkov
cdd7e41891
FIR: Support proper implicit return type computation for local classes
2020-03-25 14:53:34 +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
9836520287
[FIR2IR] Generate synthetic bodies for Enum.values() and valueOf()
2020-03-20 11:55:34 +03:00
Mikhail Glukhikh
1036d8a35a
[FIR] Provide dispatch receiver for 'field' synthetic variable
2020-03-18 17:09:36 +03:00
Mikhail Glukhikh
51c83e5f62
[FIR2IR] Move delegating constructor call to body start
2020-03-18 17:09:36 +03:00
Mikhail Glukhikh
10c2aa1657
[FIR2IR] Set origin properly for set field / variable
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
c0f8be5d4e
[FIR2IR] Generate setter call for assignments, if any
2020-03-18 17:09:35 +03:00
Mikhail Glukhikh
47ebd38534
FIR2IR: fix origin of object literal constructor call
2020-03-11 16:01:58 +03:00
Mikhail Glukhikh
1812b490a1
FIR: set anonymous object constructor return type properly
2020-03-11 16:01:57 +03:00
Mikhail Glukhikh
2651fe9fb8
FIR2IR: use CLASS kind for anonymous objects
2020-03-10 15:19:35 +03:00
Mikhail Glukhikh
e9699e7173
FIR2IR: provide correct origins for arithmetic operators
2020-03-10 15:19:35 +03:00
Dmitry Petrov
71e4b0c9ad
KT-31649 Use 'Any#hashCode' in generated hashCode if class has none
2020-03-06 14:55:40 +03:00
Dmitriy Novozhilov
e3e7b40f85
[FIR] Fix determining coercion to Unit
2020-03-05 16:48:48 +03:00
Mikhail Glukhikh
fe658ce47f
FIR2IR: remove redundant receiver generation from visitor
...
Now static functions have no dispatch receiver: they really shouldn't.
2020-03-04 16:55:34 +03:00
Mikhail Glukhikh
940567b8bd
FIR2IR: set enum class modality properly for complex entries case
2020-03-04 16:55:33 +03:00
Mikhail Glukhikh
3ffe1a1876
FIR2IR: create IrEnumConstructorCall even in complex entries
2020-03-04 16:55:33 +03:00
Mikhail Glukhikh
5af3d92271
FIR2IR: cache enum entry classes properly
2020-03-04 16:55:33 +03:00
Mikhail Glukhikh
03eab2ec6c
FIR2IR: get rid of setParentAndContent + fixes around anonymous objects
2020-03-04 16:55:32 +03:00
Mikhail Glukhikh
50c4c3f4fb
FIR2IR: extract fake override generator
2020-03-04 16:55:32 +03:00
Mikhail Glukhikh
cfa626ad77
FIR2IR: introduce conversion scope, remove dispatch receiver for lambdas
2020-03-04 16:55:31 +03:00
Mikhail Glukhikh
db7401d8eb
FIR2IR: set GET_PROPERTY origin for property reads
2020-02-28 15:29:01 +03:00
Mikhail Glukhikh
3a3d6e740c
FIR2IR: correctly set type parameters of property accessors
...
In particular, we generate different type parameters for
getters & setters here.
2020-02-28 15:29:01 +03:00
Mikhail Glukhikh
d1fac6dce1
FIR2IR: declare receivers for all accessors of extension properties
...
Before this commit, extension receivers were declared only for
properties with container source, which is strange & inconsistent.
Now we declare accessor extension receiver iff corresponding property
has extension receiver.
2020-02-25 12:13:42 +03:00
Mikhail Glukhikh
39bd97147f
[FIR] Don't create initializers for simple enum entries
...
Usually FIR enum entry is initialized by anonymous object,
which is the container for all enum entry' declarations.
However, for simple enum entries there is no need of initializer at all.
2020-02-21 16:38:52 +03:00
Mikhail Glukhikh
b1e9dbf994
[FIR] Use super<Enum> as delegated calls in enum constructors
2020-02-21 16:37:56 +03:00
Mikhail Glukhikh
f173af9238
FIR2IR: use enum constructor call for enum entries
2020-02-21 16:37:50 +03:00
Mikhail Glukhikh
334cab7357
[FIR] Don't build redundant fake overrides for private members
...
The only case we may need fake override for private members is
a situation when class refers itself with different type arguments.
So in this commit we forbid such fake overrides when we can prove
that class does not refers itself here.
2020-02-20 18:34:51 +03:00
Mikhail Glukhikh
a4c4b2650c
FIR2IR: remove hacky & redundant resolve of delegating constructor calls
2020-02-19 18:09:06 +03:00
Mikhail Glukhikh
e051251b27
FIR: set isOperator only for Java methods with appropriate names
...
#KT-35133 Fixed
2020-02-19 18:09:04 +03:00
Mikhail Glukhikh
fdf4f477a6
FIR2IR: fix problems with enum entry / anonymous object visibility
2020-02-18 10:50:03 +03:00
Roman Artemev
e57d34dd9e
Make fix test:
...
- [JS IR] Unmute fixed tests
- [IrText] Update testdata
- [WASM] Temporary turn wasm test off
- [FirText] Temporary turn fit text tests off
- [JVM IR] Turn off klib jvm test
- [IR] Add new test
2020-02-14 18:22:17 +03:00
Roman Artemev
5004bb3636
[Psi2Ir] Fix generation of hashcode for generic inline class
2020-02-14 18:22:16 +03:00
Dmitry Petrov
866f188120
Report JVM signature clashes from JVM_IR
...
Also:
* Do not rename public ABI fields
This includes backing fields for const, lateinit, @JvmField properties,
and instance fields for objects.
* FAKE_OVERRIDE declarations for static members of parent Java classes
Required to report cases when a Kotlin function accidentally overrides
Java class member.
2020-02-13 11:35:48 +03:00
Mikhail Glukhikh
67668d798b
FIR2IR: update test data
2020-02-11 23:22:55 +03:00
Juan Chen
8e35545e10
FIR2IR: provide type arguments for class 'this' receiver
2020-02-11 22:50:06 +03:00
Anton Bannykh
0bcde9dffc
IR API: Make IrEnumEntry.initializerExpression IrExpressionBody
...
All non-declarations should be inside IrBody's now
2020-02-06 21:03:32 +03:00
Mikhail Glukhikh
0fa98ed635
[FIR] Discriminate abstract members when resolving on super
2020-02-05 11:19:23 +03:00
Mikhail Glukhikh
b09b2673bf
FIR2IR: handle non-ambiguous super references properly
2020-02-05 11:19:20 +03:00
Mikhail Glukhikh
71b0840ef9
[FIR] Implement super resolve as a particular tower resolver case
2020-02-05 11:19:19 +03:00
Juan Chen
188abc243a
[FIR] add vararg arguments support, improve vararg parameters support
2020-01-31 16:41:25 +03:00
Mads Ager
e327b174a2
IR: Use name \$\$delegate_n for the field for interface delegation.
...
Without this change, these fields could have names such as
`<no name provided>$SuperClass$delegate` for something like
`object SuperClass by I { }`.
2020-01-27 15:28:27 +03:00
Dmitriy Novozhilov
3dfad4f0c3
[FIR] Fix generating properties for varargs in primary constructors
2020-01-24 10:57:52 +03:00
Mikhail Glukhikh
d3de2d419b
FIR2IR: fix failing enum entry test
2020-01-15 14:30:15 +03:00
Steven Schäfer
cb98588202
Psi2Ir: Add an IrTextTest for enums with multiple constructors
2020-01-15 10:18:09 +01:00
Juan Chen
573188bdc4
[FIR2IR]: fix translation of this references in instance methods
...
Currently FirThisReceiverExpression of instance methods are translated
to references of the class' thisReceiver,
not the method's dispatch receiver,
which causes problems with IrFrameMap::typeOf,
as the class' thisReceiver is not in the typeMap.
This commit translates non-qualified "this" references of
instance methods to references of the methods' dispatch receiver.
2020-01-10 10:43:07 +03:00
simon.ogorodnik
961037506a
FIR2IR: support FirEnumEntry
2020-01-10 10:23:51 +03:00
Dmitry Petrov
d622542824
PSI2IR: Fix delegated members generation
...
When generating bodies for members implemented by delegation, invoke
corresponding delegate member, not an interface member. Otherwise we
might lose platform-specific nullability information in case of mixed
Kotlin-Java hierarchies, as in
implicitNotNullOnDelegatedImplementation.kt
2019-12-30 18:36:16 +03:00
Mikhail Glukhikh
1cf582e9ed
FIR2IR: set extension receiver for anonymous functions
2019-12-27 15:31:36 +03:00
simon.ogorodnik
5e426fdc71
[FIR] Optimization & checking fix: remove usage of dispatchReceiverValue
2019-12-27 13:45:59 +03:00
Dmitry Petrov
fefdce0406
KT-35550 Generate type parameters for delegating property accessors
2019-12-23 10:10:16 +03:00