Ivan Kylchik
e3f8aa255a
Fix StackOverflow in interpreter for case with recursive enum init
...
#KT-54884 Fixed
2022-11-21 20:03:18 +00:00
Igor Chevdar
e16cfd5485
[K/N][IR] Suspend tail call optimization for coroutines
...
Even if a coroutine class has to be built for a suspend function, we
still can perform tail call optimization for it.
2022-11-21 19:32:41 +00:00
Igor Chevdar
b100dfe8be
[K/N][IR] Implemented suspend tail call optimization
...
If for a suspend function all calls to other suspend functions a tail calls,
it is not needed to build the coroutine implementation.
2022-11-21 19:32:40 +00:00
vladislav.grechko
5ec2f1ad92
Get rid of redundant boxing when comparing inline class instances
...
^KT-33722: Fixed
2022-11-18 23:14:03 +00:00
Artem Kobzar
725a224f74
[K/JS] Make available transitive reexport for ES modules
2022-11-18 16:54:10 +00:00
Zalim Bashorov
d2b63c8c31
[Wasm] Use common logic for eqeq and eqeqeq
...
So, now it generates better code when null literals are passed to `eqeqeq`,
same as for `eqeq`.
2022-11-18 17:30:11 +01:00
Zalim Bashorov
96b02c9b66
[Wasm] Minor: move part of code of eqeqSymbol processing in BuiltInsLowering
2022-11-18 17:30:11 +01:00
Zalim Bashorov
0529ba9a87
[Wasm] Extract common some logic of eqeqSymbol processing in BuiltInsLowering
2022-11-18 17:30:10 +01:00
Zalim Bashorov
919029f34f
[Wasm] Add fast path for null in externRefToAny
...
- Introduce new intrinsics `wasm_ref_cast_null` & `wasm_ref_test_null`.
- Support getting type for immediate from generic argument.
- Remove redundant null check in `tryGetOrSetExternrefBox`.
2022-11-18 17:30:10 +01:00
vladislav.grechko
36b8ba8df3
Improve support of custom equals in inline classes
...
- Ensure that typed equals parameter's type is a star projection of
corresponding inline class
- Make possible to declare typed equals that returns 'Nothing'
- Forbid type parameters in typed equals operator declaration
^KT-54909 fixed
^KT-54910 fixed
2022-11-17 15:35:14 +01:00
Dmitrii Gridin
f67030f035
[FIR IR] DumpIrTree: drop irrelevant change
...
^KT-54417
2022-11-17 09:50:14 +00:00
Dmitrii Gridin
33281770c7
[FIR IR] support FirReceiverParameter
...
^KT-54417
2022-11-17 09:50:11 +00:00
Alexander Korepanov
f4b5f5ff5d
[JS IR] Take default params into account for calculating an IC hash
...
^KT-54895 Fixed
2022-11-16 12:25:11 +00:00
Alexander Korepanov
f7063555ca
[JS IR] Fix the instability of LoweredDeclarationSignature
...
A suspend stub for the abstract function
may be created in the context of the child function.
If on an incremental rebuild the stub is created from
the parent context (e.g. a file with the child is not modified),
the resulting LoweredDeclarationSignature will be different.
It will lead to a broken cross-module reference and broken JS code.
Therefore it is required to wrap the creation routine
into StageController::restrictTo() explicitly.
^KT-54934 Fixed
2022-11-16 12:24:48 +00:00
Pavel Mikhailovskii
4436ce22b0
Generate meaningful bytecode names for extension receivers in INDY lambdas
2022-11-15 15:38:34 +00:00
Zalim Bashorov
2fc6cea681
[Wasm] Migrate to the new GC M6 instructions
2022-11-15 12:55:10 +01:00
Ilya Chernikov
4e4511bba2
FIR2IR: convert enums with non-primary default ctor correctly
...
see added test for example
2022-11-12 16:28:24 +01:00
Ilya Chernikov
fa0cda6236
FIR JS: enable full JS box tests with FIR
2022-11-12 14:34:07 +01:00
Ilya Chernikov
0fbc099d32
FIR JS: Refactor Klib serialization for FIR support
2022-11-12 14:34:07 +01:00
Ilya Chernikov
8bf108dc17
FIR JS: Prepare JS/KLib infrastructure for FIR integration
...
rearrange declarations, abstract things that should be done differently
with FIR, etc.
2022-11-12 14:34:07 +01:00
Svyatoslav Kuzmich
ee2e966c5c
[Wasm] Reuse JS interop closure converters across modules
...
Otherwise, these function export names clash without proper linking
2022-11-11 16:29:52 +00:00
Mads Ager
636024f676
[JVM] Retain deprecated status for interface companion const property.
...
Create the field directly and maintain the fact that its corresponding
property is the companion object property. That property has the
deprecated annotation which puts the deprecated marker on the field
when code generating the field.
^KT-54840 Fixed
2022-11-09 23:15:31 +01:00
Xin Wang
7b3ce35613
JVM_IR: Prevent writing output after an error is reported
...
#KT-53825 Fixed
2022-11-09 23:14:11 +01:00
Pavel Mikhailovskii
252e97663b
KT-54784 Fix function inlining in init sections
2022-11-09 17:15:37 +00:00
Zalim Bashorov
d29010807a
[Wasm] Apply recent changes in TFR proposal and update v8
...
Type index immediate was added to call_ref and return_call_ref instructions.
More details here https://github.com/WebAssembly/function-references/pull/76
2022-11-09 13:44:38 +01:00
Sergej Jaskiewicz
7b7c517dbb
[JS IR] Emit original names for local vars to sourcemaps
...
#KT-35655 Fixed
2022-11-09 12:35:44 +00:00
Alexander Korepanov
d5a73a5df1
[JS IR] Return JsIrProgramFragment generators instead of ready objects
...
It allows to free IrFile objects on flight
right after the JsIrProgramFragment producing.
2022-11-08 15:18:45 +00:00
Alexander Korepanov
4aaae5347a
[JS IR] Allow IC metadata to be freed before the lowering
2022-11-08 15:18:45 +00:00
Alexander Korepanov
5b70d39bd0
[JS IR] Move id signature functions into a separate file
2022-11-08 15:18:44 +00:00
Alexander Korepanov
c0a1fa6f98
[JS IR] Move the JS AST serialization right before the IC data committing
...
It allows not to keep the binary representation in memory
2022-11-08 15:18:44 +00:00
Alexander Korepanov
eb781168b8
[JS IR] Move an IC IR loading process into a separate function
2022-11-08 15:18:44 +00:00
Alexander Korepanov
95e305be3a
[JS IR] Simple memory optimizations
...
- Use hash maps and hash sets instead of linked implementations
- Use weak hash maps for caches with IR elements as keys
- Intern JS function signatures
2022-11-08 15:18:43 +00:00
Alexander Korepanov
731dd9c3e8
[JS IR] More detailed time measurement for the IC infrastructure
2022-11-08 15:18:43 +00:00
Alexander Korepanov
cb7df4d428
[JS IR] IrModuleToJsTransformerTmp.kt -> IrModuleToJsTransformer.kt
2022-11-07 17:57:41 +00:00
Alexander Korepanov
041e755c70
[JS IR] Cleanup BackendContext flags
2022-11-07 17:57:41 +00:00
Alexander Korepanov
4d37c1d49c
[JS IR] Drop generateScriptModule flag from Merger class
2022-11-07 17:57:41 +00:00
Alexander Korepanov
f1bce9fad4
[JS IR] Drop StableNamesCollector.kt
2022-11-07 17:57:40 +00:00
Alexander Korepanov
99e93258cd
[JS IR] Drop NameTables class
2022-11-07 17:57:40 +00:00
Alexander Korepanov
43fbb0ba3e
[JS IR] Drop IrNamerImpl.kt
2022-11-07 17:57:39 +00:00
Alexander Korepanov
7b8bd47b1a
[JS IR] Drop MultiModuleSupport.kt
2022-11-07 17:57:39 +00:00
Alexander Korepanov
05395f716c
[JS IR] Drop old IrModuleToJsTransformer
2022-11-07 17:57:39 +00:00
Alexander Korepanov
d17794481d
[JS IR] Replace IrModuleToJsTransformer with IrModuleToJsTransformerTmp
2022-11-07 17:57:38 +00:00
Bogdan Mukvich
fce8b877c8
Remove unused WriteCopyrightToFile gradle task
...
#KTI-758
2022-11-07 08:24:19 +00:00
Sergej Jaskiewicz
ba7f5afebe
[JS IR] Generate debug info for catch parameters
...
We will need it to generate original names for catch parameters in
sourcemaps.
Also, don't generate redundant debug info for compiler-generated
exception handling control flow operators.
See the doc comment to the MultipleCatchesLowering class
#KT-46276
2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz
871d445b4e
[JS IR] Generate debug info for global property initializers
2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz
4ae03ea74a
[JS IR] Improve debug info for if and when statements
...
#KT-46276
2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz
ccbb2a08a0
[JS IR] Improve debug info for functions with default parameters
...
Don't generate unnecessary mappings so that the user doesn't need to
step in many times to get where they want
#KT-46276
2022-11-02 13:14:00 +00:00
Sergej Jaskiewicz
43c5c8b44f
[JS IR] Fix debug info for Char, Long, and unsigned integer literals
...
Map class constructor calls to the literals they were generated
from.
#KT-46276
2022-11-02 13:13:59 +00:00
Sergej Jaskiewicz
512a2bfd7a
[JS IR] Improve debug info for callable references and lambdas
...
#KT-46276
2022-11-02 13:13:59 +00:00
Sergej Jaskiewicz
fe0e9db3aa
[JS IR] Generate debug info for JS switch statements
...
#KT-46276
2022-11-02 13:13:59 +00:00