Svyatoslav Kuzmich
54a45c49f8
[Wasm] Add Wasm platform and K1 FE infrastructure
2023-02-24 01:05:23 +01:00
Alexander Korepanov
e107de6f36
[JS IR] Use a guard file for preventing incremental caches corruption
...
If a developer interrupts (kill gradle process) a compilation process or
an internal error interrupts the compilation process,
the incremental cache files may be corrupted.
The patch creates a special guard file, which allows detecting
if the previous compilation was not successful,
and in case of any issues drops the incremental cache files.
^KT-56581 Fixed
2023-02-20 13:14:30 +00:00
Dmitriy Novozhilov
79e4df72bf
[CLI] Introduce utilities for creating FirSession hierarchy in CLI for all platforms
...
Also support session creation and compilation for HMPP projects
^KT-56209 Fixed
2023-02-17 11:08:51 +00:00
Dmitriy Novozhilov
d4bb740a62
[CLI] Store information about HMPP module for source files
2023-02-17 11:08:50 +00:00
Ivan Kochurkin
8cbb6ff47a
[FIR2IR] Use convertToIrAndActualize() for JS CLI
2023-02-07 14:16:31 +00:00
Ivan Kochurkin
199b0e8cbe
[FIR] Minor: Unify all create*Session functions across all factories
...
Rename: createJsLibrarySession -> createLibrarySession
Rename: createJsModuleBasedSession -> createModuleBasedSession
2023-02-07 14:16:30 +00:00
Ivan Kochurkin
f3e3cc0037
[FIR] Implement support of MPP in JS CLI
2023-02-07 14:16:29 +00:00
Ivan Kochurkin
6bdd0edd6c
[FIR2IR] Add Fir2IrCommonMemberStorage, get rid of merge in Fir2Ir storages
...
Extract DescriptorSignatureComposerStub and WrappedDescriptorSignatureComposer to separate classes
2023-02-01 11:42:46 +00:00
Ivan Kochurkin
e601b01be2
[FIR2IR] Use single IrBuiltInsOverFir for all MPP source modules
...
^KT-56229 Fixed
2023-02-01 11:42:45 +00:00
Ivan Kochurkin
001b11f285
[FIR2IR] Use single SymbolTable and SignatureComposer for all MPP modules
...
Merge createModuleFragmentWithSignaturesIfNeeded and createModuleFragmentWithoutSignatures
into the createModuleFragmentWithSignaturesIfNeeded
2023-02-01 11:42:44 +00:00
Dmitriy Novozhilov
e942e87feb
[JS CLI] Fix == on strings with equals call
2023-01-30 09:29:58 +00:00
Ilya Goncharov
1150ec6882
[JS] Implementation dependencies for JS klibs
...
^KT-56158 fixed
2023-01-27 13:31:59 +00:00
Alexander Korepanov
1ec88ff560
[JS IR] Enable IR dump for IC invalidation tests
...
Support 'fd.kotlin.js.debugMode' property in IC invalidation tests.
2023-01-24 09:35:15 +00:00
Ilya Goncharov
7ae85ed68e
[JS IR] Module descriptors depends on each other
2023-01-23 16:16:48 +00:00
Roman Efremov
14b4cdc7c4
Write "hasEnumEntries" flag into metadata when feature enabled
...
^KT-53929 Fixed
2023-01-23 12:53:04 +01:00
Vladimir Sukharev
195ecbac2e
Serialize native klib extensions to pass most ObjCExport and CInterop tests.
...
Merge-request: KT-MR-8398
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-01-23 11:34:47 +00:00
Artem Kobzar
71486a321c
[K/JS] Add support of compilation with ES-classes
2023-01-17 18:14:17 +00:00
Alexander Korepanov
75931fb9c8
[JS IR IC] Do not read non modified JS into memory
...
Optimizaion: instead of reading all non modified JS files
from the cache into the memory at once, the patch allows
copying non-modified JS files from disk one by one
during the compilation output writing routine.
2023-01-17 15:48:36 +00:00
Mikhail Glukhikh
7a61578e08
Language version 2.0: fix compiler messages and minor details
2023-01-16 18:16:48 +01:00
Mikhail Glukhikh
52ab565cc6
Move LANGUAGE_TO_METADATA_VERSION to compiler:frontend.common.jvm
2023-01-16 18:14:52 +01:00
Mikhail Glukhikh
f6b8b3438a
Extract & use GenerationState.metadataVersion helper
2023-01-16 18:12:55 +01:00
Mikhail Glukhikh
3dc05f4ec5
Introduce language version 2.0 and associate K2 compiler with it
2023-01-16 18:12:55 +01:00
Svyatoslav Kuzmich
80e07d628b
[Wasm] Use ModuleKind.ES
...
As the only JS-interop module kind Wasm supports
2023-01-13 21:58:32 +00:00
Mikhail Glukhikh
ecc81098a6
Unbind FIR mangler from use-site session (by Simon Ogorodnik)
2023-01-13 12:56:01 +00:00
Mikhail Glukhikh
890e3d1c10
FIR2IR/MPP: use single SymbolTable during MPP compilation
2023-01-13 12:56:00 +00:00
Ivan Kochurkin
5d273ce839
[FIR & FIR2IR] Prepare test and CLI infrastructure to support MPP
...
- Move out getAnalyzerServices from FirFrontendFacade to TestSetupUtils
- Simplify DependencyListForCliModule. Now it takes BinaryModuleData as input
- FirOutArtifact contains several FirOutputArtifactPart
- Simplify FirFrontendFacade
2023-01-13 12:55:57 +00:00
Vladimir Sukharev
924898afb7
[K/N] KFC-446: K2 platform: Native alpha
...
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-01-04 16:10:40 +00:00
Artem Kobzar
fbf06b5495
[K/JS] Add a secret system property to enable the old Kotlin/JS compiler only for tests until it will be removed from the sources
2022-12-29 13:32:01 +00:00
Igor Yakovlev
71afbb36f5
[Wasm] Introduce Xwasm-generate-wat compiler flag (disabled by default)
2022-12-29 11:57:48 +00:00
Svyatoslav Kuzmich
dd53998c2d
[Wasm] Add uninstantiated MJS wrapper
...
It allows
* Custom imports
* Ability to skip initializer
2022-12-28 12:13:52 +01:00
Ilya Kirillov
7bac119f20
[FIR] add lazy resolution contract checks in resolve
2022-12-12 16:21:06 +00:00
Dmitriy Novozhilov
5d6cb2b691
[Test] Use IrPluginContext for searching declarations for DUMP_EXTERNAL_CLASS check
2022-12-09 12:02:07 +00:00
Zalim Bashorov
49c3ba33f1
[Wasm] Add a basic end-to-end sourcemap generation in wasm backend
...
More constructions/instructions will be supported separately.
2022-12-08 12:44:26 +00:00
Alexander Korepanov
0a35d84193
[JS IR] DTS generation refactoring
...
Keep a DTS fragment in JsIrProgramFragment
for each file and build the module DTS from them.
2022-12-07 18:05:52 +00:00
Zalim Bashorov
fb4dcc6a6a
[Sourcemap] Introduce getCurrentColumn and stop using TextOutput directly
...
The general goal is remove dependency on TextOutput and
make it simpler to use for wasm backend.
2022-12-07 12:03:54 +00:00
Alexander Korepanov
c31705240a
[JS IR] Support a module friendship in IC infrastructure
...
^KT-55097 Fixed
2022-12-02 13:50:36 +00:00
Artem Kobzar
76e629340f
[K/JS] Add miss LazyIr into klib Ir generation process
2022-12-02 13:28:18 +00:00
Sergej Jaskiewicz
1539d7ef1a
[klib] Bring package names in sync with the directory layout
...
Basically, some package names were Native-specific, whilst the packages
themselves were not Native-specific at all. This was already reflected
in the directory layout, but not in the package names.
This is fixed here.
NFC, just an automatic rename of packages with fixes of imports.
2022-12-01 21:46:43 +00:00
Artem Kobzar
3f4a937ad6
[K/JS] Don't generate TypeScript definitions from ExportModel if the -Xgenerate-dts flag was not provided ^Fixed KT-53940
2022-12-01 15:47:08 +00:00
Alexander Korepanov
9dab8637a8
[JS Gradle] Pass incremental cache root dir to K2JS compiler
2022-11-28 20:46:40 +00:00
Alexander Korepanov
693258ae91
[JS IR] Invalidate all klib dependencies after removing it
...
Without the invalidation, broken JS code
(with broken cross-module references) may appear.
^KT-54911 Fixed
2022-11-28 20:46:40 +00:00
Alexander Korepanov
ca19d71a00
[JS IR] Commit cache header after lowering
...
Commiting cache header before lowering may
break caches in case of lowering errors.
^KT-54912 Fixed
2022-11-28 20:46:40 +00:00
Alexander Korepanov
8cde0a81bc
[JS IR] Use topological order for loading klibs in JS IR IC
...
Generally, the library order doesn't matter.
However, after lowering we need to post process
lowered klibs in topological order:
- commit incremental cache artifacts,
- produce JS AST.
The patch uses an ability of the Kotlin library resolver to load klibs
in topological order and drops its reimplementation from IC infrastructure.
There is one side effect:
klibs which are not reachable from the main module, will produce their JS.
This should be more correct than just ignoring them.
2022-11-28 20:46:39 +00:00
Alexander Korepanov
ec6a7094e6
[JS IR] Manage cache root dir from IC cache updater
...
- pass cache root directory instead of dir list
- manage klib cache dirs from cache updater
2022-11-28 20:46:39 +00:00
Artem Kobzar
c1c5933c72
[K/JS] Deprecate old JS-compiler
2022-11-23 11:22:29 +00:00
Ilya Chernikov
7a57e8d903
FIR JS: Add K2 support to K2JsIrCompiler
2022-11-12 16:28:24 +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
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