Dmitry Petrov
34f5b85ae5
IR KT-47840 fix-point solution for closure conversion
2021-07-23 14:58:23 +03:00
Dmitry Petrov
37b05cd9c2
JVM_IR KT-47120 treat outer name as case-insensitive for local classes
2021-06-30 14:04:22 +03:00
Dmitry Petrov
851980e36f
JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs
2021-05-18 22:20:12 +03:00
Andrey Zinovyev
287ff3ed55
[FIR] Fix for AugmentedArraySetCall expression type
...
Hacky fix so it's type is Unit and not error
2021-04-30 15:25:44 +03:00
Dmitry Petrov
7fabc19326
JVM_IR KT-45446 don't erase captured var if it's dead code
2021-03-17 15:37:35 +03:00
Alexander Udalov
5480faf5c5
Add tests for issues fixed in JVM IR and other obsolete issues
...
#KT-6007
#KT-16445
#KT-17753
#KT-22488
#KT-23881
#KT-24135
#KT-26360
#KT-27427
#KT-27449
#KT-27830
#KT-28042
#KT-29595
#KT-30708
#KT-32793
2021-02-01 18:29:59 +01:00
Dmitry Petrov
2f30b0994a
Minor: mute test in WASM
2021-01-15 15:31:41 +03:00
Mads Ager
250cc1dc92
[JVM] Never treat arguments to methods as locals that can be removed.
...
Fixes KT-44347
2021-01-15 10:33:11 +03:00
Dmitriy Novozhilov
b416c669b0
[TEST] Update testdata due to dropped COMMON_COROUTINE_TEST directive
2020-12-10 01:31:04 +03:00
Roman Artemev
c2fec38384
[JS IR BE] Unmute fixed tests
2020-11-10 11:06:11 +03:00
Svyatoslav Kuzmich
fdd7fa5aea
[Wasm] Mute codegen box tests
2020-11-09 16:04:43 +03:00
Pavel Kirpichenkov
39a87435ee
[FIR/NI] Refactor type variable gathering from lambda types
...
Motivation:
- drop getArguments from type context as a duplicate of getArgumentList
- reduce the number of collection allocations in getAllDeeplyRelatedTypeVariables
Additional minor improvements, test data fixes
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
712a2ce1ab
[FIR] Improved lambda completion: initial implementation
...
Repeat the logic of KotlinConstraintSystemCompleter in ConstraintSystemCompleter.
Implement additional context operations required for updated lambda completion algorithm.
2020-10-13 11:00:21 +03:00
Jinseong Jeon
bf918e6184
FIR: hide local types if needed
2020-09-03 14:24:31 +03:00
Jinseong Jeon
52631b7abd
FIR2IR: make local storage track scopes, including anonymous init
2020-08-02 18:05:09 +03:00
Jinseong Jeon
bff36e0199
FIR2IR: convert annotations on FirTypeRef
2020-07-30 11:25:36 +03:00
Jinseong Jeon
da6e96f4f1
FIR2IR: don't declare dispatch receiver for local functions
2020-07-28 13:43:10 +03:00
Dmitry Petrov
1272162a7f
JVM_IR: generate "safe" names for functions in init blocks
2020-07-22 19:49:48 +03:00
Dmitriy Novozhilov
236dfe60f1
[FIR] Correctly build scopes for resolve of different parts of constructors
...
#KT-40409 Fixed
2020-07-20 14:38:17 +03:00
Juan Chen
d163853c97
[FIR] add support for implementation by delgation
...
This commit handles "subclass: super-interface by delegate-expression".
During Psi2Fir, for each delegate, we add to the subclass a synthetic
field (which has type super-interface), and an assignment of the
delegate-expression to the synthetic field in the primary constructor,
so that the delegate-expression can be resolved and transformed along
the way.
During Fir2Ir, we look up delegatable members from the super-interface
and generate corresponding functions/properties for the subclass.
TODO: support for generic delegatable members and generic
super-interface.
2020-07-08 09:42:24 +03:00
Dmitriy Novozhilov
9f55d4f3cd
[FIR-TEST] Mute test failing due to KT-39614
2020-06-19 15:53:01 +03:00
Mikhail Glukhikh
3567880303
[FIR] Consider enum entry nested classes as local
2020-06-08 12:11:33 +03:00
Vitaly
fe047f9b47
[JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR
2020-05-27 00:32:56 +03:00
Mikhail Glukhikh
7818baff1e
[FIR2IR] Fix problem with double-generation of local class members
2020-05-26 11:50:33 +03:00
Mikhail Glukhikh
e7e80be34a
[FIR2IR] Populate overridden symbols even for !isOverride
...
Before this commit we considered !isOverride as a sign that
function / field / accessor has no overridden symbols.
However, it's false for deserialized, because isOverride
is always false there.
This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
2020-05-14 13:40:36 +03:00
Mikhail Glukhikh
457fb09e3a
[FIR] Use tower to resolve delegated constructors, set dispatch receiver
2020-05-12 16:57:07 +03:00
Dmitriy Novozhilov
7f02d57d88
[FIR] Correctly detect super type in delegated constructor call
2020-04-17 12:37:29 +03:00
Mikhail Glukhikh
e1c78b31a6
[FIR2IR] Convert explicit receiver in advance
2020-04-10 14:49:27 +03:00
Mikhail Glukhikh
a93c7a39e0
[FIR] Provide object [dispatch] && callable reference receivers properly
2020-04-09 15:22:56 +03:00
Mikhail Glukhikh
14731527ed
[FIR] Don't store class functions in local scope
2020-04-09 15:22:55 +03:00
Mikhail Glukhikh
5c758af0a6
[FIR] Use ScopeSession from resolve transformer in FIR2IR
2020-04-09 15:22:55 +03:00
Denis Zharkov
9abe669443
FIR: Fix resolution for invokes on class qualifiers
2020-04-02 12:10:50 +03:00
Mikhail Glukhikh
630adb34db
[FIR] Don't provide receiver as value in delegated constructor call
2020-03-31 20:28:24 +03:00
Dmitry Petrov
4ade669b9b
Minor: unmute 2 tests fixed in FIR
2020-03-30 21:10:59 +03:00
Dmitry Petrov
cec64a2ec7
KT-37861 'this' is uninitialized in constructor default parameters
2020-03-30 17:23:15 +03:00
Jinseong Jeon
078cf02c8a
FIR: Provide dispatch receiver for 'field' according to property type
2020-03-30 16:57:53 +03:00
Jinseong Jeon
4388b30f87
[FIR] Fix anonymous object handling as 'this' receiver
2020-03-30 16:57:52 +03:00
Mikhail Glukhikh
697006d782
[FIR2IR] Re-use receiver application logic in callable ref conversion
2020-03-30 16:23:10 +03:00
Jinseong Jeon
de0c9a5c73
FIR: use dispatch receiver of the enclosing function if any.
2020-03-25 08:27:21 +03:00
Mikhail Glukhikh
03143bc788
[FIR2IR] Implement mapping of FIR & IR built-in class members
2020-03-24 12:15:18 +03:00
Mikhail Glukhikh
0f0e5e603d
[FIR2IR] Use IR built-in types, their symbols & constructors directly
2020-03-18 17:09:36 +03:00
Mikhail Glukhikh
c0f8be5d4e
[FIR2IR] Generate setter call for assignments, if any
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
Mikhail Glukhikh
20c4a7b244
[FIR2IR] Introduce staged transformation (first step)
...
Now FE IR -> BE IR transformation is performed in multiple stages
controller by Fir2IrConverter. Stages are
* files & classes registration
* supertypes & type parameters handling
* functions & properties signature generation
* body generation
After each step we have guarantee (with exception of local classes &
type inference combination, and external symbols) that required symbols
(class/function/property/variable/type parameter)
are already bound to real declarations and have correct parents.
This commit also fixes incorrect parents for local classes
2020-03-13 12:18:02 +03:00
Mikhail Glukhikh
1812b490a1
FIR: set anonymous object constructor return type properly
2020-03-11 16:01:57 +03:00
Steven Schäfer
bb5a639153
JVM IR: Turn static callable references into singletons
2020-03-05 22:19:53 +03:00
Dmitriy Novozhilov
3742586209
[FIR-TEST] Unmute some blackbox tests
2020-03-05 16:48:48 +03:00
Dmitriy Novozhilov
e3e7b40f85
[FIR] Fix determining coercion to Unit
2020-03-05 16:48:48 +03:00
Dmitriy Novozhilov
770dfb69ba
[FIR] Analyze all statements in block except last one in independent mode
...
Some broken tests will be fixed in next commit
#KT-37176 Fixed
2020-03-05 16:48:47 +03:00
Mikhail Glukhikh
0fee8a6946
FIR2IR: cache functions and their parents properly
2020-03-04 16:55:33 +03:00