Sergej Jaskiewicz
9e5520bba8
[JS IR & WASM] Fix executing init blocks for enums with nested objects
2021-10-18 13:37:16 +00:00
Mikhail Zarechenskiy
8e0e2fe52c
Increase stub versions for the major version 1.6.0
...
^KT-49190 Fixed
2021-10-18 14:48:35 +03:00
Dmitriy Novozhilov
bee44c6e0f
[FIR] Split :compiler:fir:resolve module into three different modules
...
Those modules are:
- :compiler:fir:providers, which contains Fir and Symbol providers,
scopes, and different utilities used by them
- :compiler:fir:semantics, which contains different abstractions and
entities which are used in resolution and in checkers
- :compiler:fir:resolve, which contains all stuff related to resolution
and inference
There are two pros of this change:
1. It may increase gradle build, because it allows to compile :fir:resolve
and :fir:checkers modules in parallel
2. Logic of working FIR (scopes, providers, DFA logic system, etc) is
now separated from logic of resolution phases, so for example checkers,
which are depend on scopes physically will not be able to run resolve
in any way
2021-10-18 11:10:47 +03:00
Dmitriy Novozhilov
6995ee9334
[FIR] Move type context and type approximator to separate session compontent
...
This is needed to decouple components which are related to type system
from type inference components
2021-10-18 11:10:47 +03:00
Dmitriy Novozhilov
eadb91f9b2
[FIR] Move accessors to main session components close to declarations of those components
2021-10-18 10:55:39 +03:00
Abduqodiri Qurbonzoda
a3755a8e94
@UseExperimental -> @OptIn in compiler testData
2021-10-17 21:14:37 +00:00
Abduqodiri Qurbonzoda
f0a75e7843
Advance deprecation level of Experimental and UseExperimental annotations to ERROR
2021-10-17 21:14:36 +00:00
Tianyu Geng
8b44a4685f
FIR IDE: add API to get super types of a KtType
2021-10-16 14:16:25 +02:00
Tianyu Geng
09d16ce849
FIR: minor refactoring TypeUtils
2021-10-16 14:16:25 +02:00
Anton Bannykh
283e37c741
[JS IR] fix warnings
2021-10-15 20:14:54 +03:00
Anton Bannykh
c2f7ed2fff
[JS IR] added a directive to skip IC checks in IR
2021-10-15 20:14:53 +03:00
Anton Bannykh
94ed6a1dbd
[JS IR] bring back old ir2js to work alongside with the new one
...
Should be removed when we're sure the new one is OK
2021-10-15 20:14:53 +03:00
Anton Bannykh
1d42b6cb3f
[JS IR] make InnerClassesLowering.kt work with abscent bodies
2021-10-15 20:14:52 +03:00
Anton Bannykh
546ce501cb
[JS IR] run IC box tests
2021-10-15 20:14:51 +03:00
Anton Bannykh
b1b88a0d11
[JS IR] JS AST serialization
2021-10-15 20:14:50 +03:00
Anton Bannykh
95ab5e1b7e
[JS IR] generate JS separately for each file and link at the end
...
Name clashes are handled as a post-processing step
2021-10-15 20:14:50 +03:00
Anton Bannykh
936383254a
[JS IR] explicitly mark JsName's temporary or not
2021-10-15 20:14:49 +03:00
Anton Bannykh
7e7c84fcfb
[JS IR] move fragment generation closer to the beginning
2021-10-15 20:14:48 +03:00
Anton Bannykh
b1b263615c
[JS IR] handle exports per-file
2021-10-15 20:14:47 +03:00
Anton Bannykh
aec743d7a6
[JS IR] handle tests per-file
2021-10-15 20:14:47 +03:00
Anton Bannykh
9f2762cfa6
[JS IR] handle main function per-file
2021-10-15 20:14:46 +03:00
Anton Bannykh
1af1d13cf3
[JS IR] split resulting code into fragments
2021-10-15 20:14:45 +03:00
Anton Bannykh
d595264cc8
[JS IR] move JsGenerationContext towards it's use
2021-10-15 20:14:43 +03:00
Mads Ager
e9c9d5731e
[JVM] Port Stepping and LocalVariable tests to new test infra.
...
This is in preparation for enabling the tests for FIR which will
be easier to do when the tests are on the new infrastructure.
2021-10-15 20:03:54 +03:00
Mark Punzalan
167dc81d3b
FIR/Analysis API: Get parameter name from function type notation or
...
`@ParameterName` annotation, which is also now added during type
resolution.
2021-10-15 16:19:00 +03:00
Svyatoslav Kuzmich
0f66f85cf9
[Wasm] Support main function
2021-10-15 13:58:55 +03:00
Dmitry Petrov
af18b10da9
JVM_IR KT-49203 generate stubs for not found classes
2021-10-15 12:15:49 +03:00
Mikhail Glukhikh
f4067f05a2
FIR: forbid java.lang.String(String) constructor in JvmMappedScope
...
#KT-49135 Fixed
2021-10-15 01:24:51 +03:00
Mikhail Glukhikh
09bc729b0e
FirDefaultParametersResolver: process imported from objects properly
...
#KT-49083 Fixed
2021-10-15 01:24:51 +03:00
Mikhail Glukhikh
c5a4a5de42
Make FirArrayOfCallTransformer recursive #KT-49076 Fixed
2021-10-15 01:24:49 +03:00
Mikhail Glukhikh
ad3502a952
Don't refer self function in Fir2IrLazySimpleFunction.initialSignature
...
This commit prevents stack overflow in MethodSignatureMapper
#KT-49222 Fixed
2021-10-15 01:24:49 +03:00
Mikhail Glukhikh
31db76da56
FIR: fix false positives of INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS
...
#KT-49129 Fixed
2021-10-15 01:24:47 +03:00
Irene Dea
78ee6b2a09
Extend CandidateInterceptor to intercept ResolvedCallAtom candidate
2021-10-14 18:32:03 +03:00
Artem Kobzar
99688e5c80
test(KT-47096): add tests for the uncovered behavior.
2021-10-14 14:57:35 +00:00
Igor Laevsky
50ca86838f
[WASM] Fix build
2021-10-14 17:24:07 +03:00
Igor Laevsky
cb5bef1535
[Wasm] Remove unnecessary testHelpers and add assertions from stdlib
2021-10-14 17:24:06 +03:00
Igor Laevsky
e331a52e75
[Wasm] Mute/unmute box tests after kotlin.test support
2021-10-14 17:24:05 +03:00
Igor Laevsky
bede039c08
[Wasm] Add compiler support for the kotlin.test library
2021-10-14 17:24:05 +03:00
Igor Laevsky
049e48e780
[Wasm] Keep error message for the IAE exception
2021-10-14 17:24:03 +03:00
Dmitry Petrov
6ba65065ee
JVM add tests for KT-48544 & KT-49226
2021-10-14 17:23:12 +03:00
Artem Kobzar
d2e5523180
test: adapt genericParameterResult.kt test for JS IR backend.
2021-10-14 14:05:39 +00:00
Ilmir Usmanov
559d7015f7
Extend NON_MODIFIER_FORM_FOR_BUILT_IN_SUSPEND diagnostic
...
to include "suspend fun" token sequence as well
2021-10-14 12:44:18 +00:00
Sergej Jaskiewicz
55ae6d1f3e
[JS IR] Optimize pattern-matching of enums into comparing their ordinals
...
For this code:
```
enum class Season {
WINTER,
SPRING,
SUMMER,
AUTUMN
}
fun bar1(x : Season) : String {
return when (x) {
Season.WINTER, Season.SPRING -> "winter_spring"
Season.SUMMER -> "summer"
else -> "autumn"
}
}
```
previously we generated this:
```
function foo(x) {
var tmp0_subject = x;
return (tmp0_subject.equals(Season_WINTER_getInstance())
? true
: tmp0_subject.equals(Season_SPRING_getInstance()))
? 'winter_spring'
: tmp0_subject.equals(Season_SUMMER_getInstance())
? 'summer'
: 'autumn';
}
```
And now we generated this:
```
function bar2(x) {
var tmp0_subject = x;
var tmp0 = tmp0_subject._get_ordinal__0_k$();
var tmp;
switch (tmp0) {
case 0:
case 1:
tmp = 'winter_spring';
break;
case 2:
tmp = 'summer';
break;
case 3:
tmp = 'autumn';
break;
default:
noWhenBranchMatchedException();
break;
}
return tmp;
}
```
2021-10-14 11:44:01 +00:00
Pavel Kunyavskiy
e4a4cd3e16
[K/N] Transform constant varargs to ConstantValue
2021-10-14 11:22:25 +00:00
Pavel Kunyavskiy
bf3c343ced
Introduce new ir nodes for constant values
2021-10-14 11:22:21 +00:00
Pavel Kunyavskiy
2fe9420ca1
Compatibility hack for instantiating annotations from old klibs
...
^KT-49181
2021-10-14 11:03:17 +00:00
Denis.Zharkov
cac69edff2
FIR: Fix forEach resolution within local class
2021-10-14 14:01:51 +03:00
Denis.Zharkov
056657525e
FIR: Temporary support FE 1.0 behavior for SAM vs. generic ambiguity
...
^KT-48300 Relates
^KT-48938 Fixed
2021-10-14 14:01:50 +03:00
Denis.Zharkov
10c5d987d7
FIR: Fix exception on remaining flexible ILT in lambda
...
^KT-49191 Related
2021-10-14 14:01:49 +03:00
Dmitry Petrov
6f33259bc3
PSI2IR KT-49203 INVISIBLE_FAKE setter is non-referenceable
2021-10-13 18:38:23 +03:00