Dmitry Petrov
5d4b0b19d4
JVM_IR KT-13213 split string constants into parts of acceptable length
2020-12-28 16:50:29 +03:00
Svyatoslav Kuzmich
672859d447
[Wasm] Support init blocks in inline classes
2020-12-25 17:00:23 +03:00
Svyatoslav Kuzmich
0945c110bf
[JS IR] Support init blocks in inline classes
2020-12-25 17:00:23 +03:00
Zalim Bashorov
03594baa07
[IR] Improve dumpKotlinLike
...
* Generate a comment for modules.
* Fix printing supertypes for classes.
* Don't fail while printing constructor call if data's parent isn't IrClass
2020-12-24 20:03:24 +03:00
Zalim Bashorov
ee60a1a431
[IR] Add an ability to change dump strategy using a system property
2020-12-24 20:03:23 +03:00
Zalim Bashorov
274b09cf36
[JS IR] Support generating JS expression from IrComposite
...
Except the case when it's empty.
2020-12-24 20:03:23 +03:00
Zalim Bashorov
d7e3f826bb
[JS IR] Generate jsClass function inside the compiler instead of relying on declaration inside stdlib
...
We want to make its type parameter reified to do it we have to make it inline and non-external.
But we don't want to inline it in call sites and want prevent using it anywhere except places generated by the compiler.
In user code, including stdlib, we should use `K::class.js` instead.
Separately we have to intrinsify `K::class.js` to reduce overhead.
2020-12-24 20:03:23 +03:00
Zalim Bashorov
df6635085b
[JS IR] Replace calls with invalid type arguments for type parameters with call to errorCode function from runtime.
2020-12-24 20:03:22 +03:00
Zalim Bashorov
ff77155b5a
[JS IR] A type argument of the jsClass intrinsic must be a class (IrClass)
2020-12-24 20:03:22 +03:00
Zalim Bashorov
c1f6a72ae1
[JS IR] Remove inline properties with reified parameters
...
RemoveInlineFunctionsWithReifiedTypeParametersLowering -> RemoveInlineDeclarationsWithReifiedTypeParametersLowering
2020-12-24 20:03:22 +03:00
Zalim Bashorov
da8dacb495
[JS IR] run RemoveInlineFunctionsWithReifiedTypeParametersLowering earlier
...
It's required to avoid extracting local classes declarations and leaking some references to inline function internals.
2020-12-24 20:03:21 +03:00
Zalim Bashorov
bc9828f3f3
[JS IR] Generate a key using hashedMangle for all IR declarations in mapToKey
...
It is required to avoid "key" clashes and failing with ISE.
2020-12-24 20:03:21 +03:00
Zalim Bashorov
7c5ea414b7
[JS IR] Use mappedNames in NameTable only for REPL
...
And throw exception for unsupported types in mapToKey
2020-12-24 20:03:21 +03:00
Ilmir Usmanov
9c67d8f89e
IC Mangling: Correctly mangle functions with generic return type
...
if the type's parent is inline class.
#KT-43050 Fixed
#KT-26130 Fixed
#KT-32384 Fixed
2020-12-24 14:29:48 +01:00
Dmitriy Novozhilov
0e3ed3fee6
[Test] Remove duplicating code from ClassicFrontend2IrConverter
2020-12-24 14:57:53 +03:00
Dmitry Petrov
4e261cc358
JVM_IR KT-24258 fix NPE message for delegated properties
2020-12-23 21:50:10 +03:00
Ilmir Usmanov
8bfcef415e
Do not generate variables for non-generated fields
...
Use attributes instead of classes.
#KT-43048 Fixed
2020-12-23 19:45:15 +01:00
Iaroslav Postovalov
8a7bc2ef6f
Rename continuation fields according the convention and count them in IR
2020-12-23 19:45:13 +01:00
Iaroslav Postovalov
165ba85337
Remove useless OptIn annotation
2020-12-23 19:45:09 +01:00
Iaroslav Postovalov
6f34f00c61
Do not generate the field for unused parameters in suspend lambdas
2020-12-23 19:45:04 +01:00
Georgy Bronnikov
b35d4134a7
Psi2IR: workaround for IR-based descriptors
...
Since KotlinTypes involving IR-Based descriptors are distinct from KotlinTypes
involving original descriptors of the same declarations, subtyping check
breaks in InsertImplicitCasts.
2020-12-23 18:50:53 +03:00
Georgy Bronnikov
99c874ba8a
IR: use NullDescriptorRemapper in DeepCopySymbolRemapper
2020-12-23 18:50:52 +03:00
Georgy Bronnikov
c5961da780
IR: remove WrappedDescriptors altogether
2020-12-23 18:50:52 +03:00
Georgy Bronnikov
e9f45e23f2
IR: NullDescriptorsRemapper
2020-12-23 18:50:52 +03:00
Georgy Bronnikov
3683cd0f7b
IR: fix IrBasedTypeAliasDescriptor
2020-12-23 18:50:52 +03:00
Georgy Bronnikov
076272f7ca
FIR2IR: avoid descriptors computing hashCode
...
When synthesizing the hashCode function for data classes, descriptors
were used, in partcular, memberScope for primitive classes.
IrBasedDescriptors have no member scope, so we compute the hashCode
function based on IR structures.
2020-12-23 18:50:52 +03:00
Georgy Bronnikov
b07dccb8d7
Fir2IR: remove wrapped descriptors
2020-12-23 18:50:52 +03:00
Georgy Bronnikov
b05400154d
IR: remove IrSymbolDeclaration
2020-12-23 18:50:52 +03:00
Georgy Bronnikov
d714adacae
IR: removing WrappedDescriptors from symbols
2020-12-23 18:50:51 +03:00
Georgy Bronnikov
989d4350b1
IR: make descriptor optional in IrSymbol
2020-12-23 18:50:51 +03:00
Dmitry Petrov
f647233189
Minor: drop empty bunch file
2020-12-22 16:10:50 +03:00
Dmitry Petrov
c9d330207b
JVM_IR no nullability annotations on SAM wrapper constructor parameters
2020-12-22 16:09:46 +03:00
Dmitry Petrov
57dd9fc87a
JVM_IR KT-36984 SAM wrappers are anonymous inner classes
2020-12-22 16:09:45 +03:00
Denis.Zharkov
5e5b236ef8
Extract record related parts into smaller bunch files for 201
2020-12-22 14:58:05 +03:00
Alexander Udalov
eef06cded3
JVM IR: output stable ABI binaries by default
...
#KT-43592 Fixed
2020-12-20 23:14:54 +01:00
Alexander Udalov
3f517d7e8d
Add new metadata flag for class files compiled with FIR
...
Report a separate error when class files compiled with FIR are in
dependencies, in addition to the one for class files compiled with FE
1.0 + JVM IR.
#KT-43592
2020-12-20 23:14:30 +01:00
Alexander Udalov
cbd90c3af5
Refactor boolean IR ABI stability flag to enum
...
Introduce an enum DeserializedContainerAbiStability with two values.
This is needed in order to support another reason for ABI instability in
a subsequent commit, namely "unstable because compiled by FIR".
#KT-43592
2020-12-20 23:14:12 +01:00
Alexander Udalov
7d37030095
JVM IR, FIR: add JvmBackendExtension instead of MetadataSerializerFactory
...
This might be a better place for future behavior that should be
abstracted between FE 1.0 and FIR, in JVM IR.
2020-12-20 23:13:48 +01:00
Victor Petukhov
857cc92326
Support preference of TYPE_USE annotations to enhance over others like METHOD, FIELD and VALUE_PARAMETER to avoid double applying them in case of arrays: @NotNull Integer [] (both to the array element and to the entire array)
...
^KT-24392 Fixed
2020-12-18 19:32:04 +03:00
Shagen Ogandzhanian
4f96f9d6a1
[JS IR] Initialize enum fields before accessing them in companion object
...
see https://youtrack.jetbrains.com/issue/KT-43901
2020-12-18 01:54:59 +01:00
Igor Chevdar
be688356c9
[IR] Fixed bug with thread unsafety
...
There is no need in a singleton here
2020-12-17 14:03:52 +05:00
Dmitriy Novozhilov
cb5183ab4d
[TEST] Add implementation of new infrastructure services for compiler tests
...
All of new classes lays in lays in :compiler:tests-common-new module
which includes classes for FE 1.0 and FIR diagnostics tests and
JVM black boxtests
2020-12-16 19:52:23 +03:00
Dmitry Petrov
8999fd88b1
JVM_IR KT-43401 KT-43518 fix ACC_STRICT and ACC_SYNCHRONIZED flags
2020-12-16 14:10:36 +03:00
Dmitry Petrov
7ed3860c70
JVM_IR KT-43043 fix nullability annotations for inline class members
2020-12-16 13:43:29 +03:00
Dmitry Petrov
b0f6461fa9
JVM_IR KT-42020 special IdSignature for some fake override members
2020-12-15 12:56:45 +03:00
Shagen Ogandzhanian
32cc95a3b0
[JS IR] Skip export annotations while generating default stubs
2020-12-14 16:41:27 +01:00
Svyatoslav Kuzmich
d37271bf35
[Wasm] Support packed integer array elements
2020-12-14 14:40:38 +03:00
Svyatoslav Kuzmich
51e8d782b0
[Wasm] Support packed integer class fields
2020-12-14 14:40:38 +03:00
Kristoffer Andersen
8a5f260d04
[IR] Align debugging of suspend lambdas with old BE
...
The existing backend restores LVs and parameters from the suspend lambda
fields used for spilling between suspension points, hence they are
visible in the debugger as local variables, plain and simple.
This PR introduces the same pattern to the IR backend, to bring the
debugging experience in line with the existing backend.
Both backends are still at the mercy of the liveness analysis
performed in the coroutine transformer where a liveness analysis
minimizes live ranges of entries in the LVT. E.g. an unused parameter
will be dropped entirely.
Adjusted existing test expectations accounting for the differences in
LV behavior.
2020-12-12 11:48:47 +01:00
Dmitry Petrov
b7330a9e14
JVM_IR KT-43877 fix generic signatures for SAM-converted lambdas
2020-12-11 20:26:29 +03:00