Roman Artemev
78cd45f937
[KLIB] Resolve deserialization on for each file separately
...
Needs for IC
2021-09-07 20:41:28 +03:00
Roman Artemev
1f11aa00c0
[JS IC] Implement IC cache provider and consumer to access IC data
2021-08-24 01:09:16 +03:00
Roman Artemev
76690c081a
[KLIB] Provide required API for IC invalidation
2021-08-24 01:09:16 +03:00
Roman Artemev
35e16d2db6
[JS IC] Extract PIR cache IO into separate functions
2021-08-24 01:09:13 +03:00
Ting-Yuan Huang
e75ca75e3e
K2JsIrCompiler: hoist common front-end preparation logic
...
Instead of creating ModuleStructure and run analysis in each backend,
the common preparation logic is moved into K2JsIrCompiler.doExecute().
2021-08-12 18:01:56 +03:00
Dmitriy Dolovov
c1fb40a436
[IR] Enhance error reporting for IR linking issues
...
^KT-44626
Typical use case:
- There are two KLIB libraries: A and B.
- Library A has two versions: A.v1 (older) and A.v2 (newer).
- A.v2 is ABI-incompatible with A.v1.
- B depends on A and was compiled against A.v1.
- An attempt to build the application with A.v2 and B fails with weird error message. It's unclear for end user what's wrong and what needs to be done to fix the issue.
The fix improves error reporting for the following particular cases:
- A symbol that is gone (KT-41378)
- A class that became a typealias (KT-47285, KT-46697)
- A typealias that became a class (KT-46340)
2021-08-10 14:02:40 +03:00
Ilya Goncharov
2f0f88062a
[JS IR] Change global map in context to mapping
...
^KT-46204 fixed
2021-08-10 07:24:50 +00:00
Roman Artemev
7add820f0d
[JS IC] Simplify code a bit
2021-08-06 20:49:17 +03:00
Roman Artemev
9bfe502afd
[JS IC] Fix signature finding in some cases
...
Found in KFSAD
2021-08-06 20:49:13 +03:00
Roman Artemev
297e0a9f43
[JS IC] Improve IC deserializer code a bit
2021-08-06 20:49:11 +03:00
Roman Artemev
6ca87dc43f
[KLIB] Drop useless set
2021-08-06 20:49:10 +03:00
Roman Artemev
aeea7147fe
[JS IC] Simplify code a bit more
2021-08-06 20:49:09 +03:00
Roman Artemev
b1eeb1fb27
[JS IC] Don't persist temporary copies of inline functions
...
- drop special `IrValueParameterPublicSymbol`
- drop special `IrAnonymousInitializerPublicSymbolImpl`
- drop hacky `useGlobalSignatures`
2021-08-06 20:49:06 +03:00
Roman Artemev
b1251c1716
[JS IC] Drop special IdSignatureSerializer for IC
2021-08-06 20:49:04 +03:00
Roman Artemev
74d8e16d09
[JS IC] Eradicate GlobalFileLocalSignature from code
...
- Reduce usage of global maps
2021-08-06 20:49:02 +03:00
Roman Artemev
a0449892b2
[JS IC] Simplify signatures, don't use GlobalScopeLocalDeclaration
2021-08-06 20:49:01 +03:00
Roman Artemev
3d3c70141c
[JS IC] Properly handle type parameters of Functional interfaces
...
- drop redundant `IrSymbolTable` and `IrIcModuleDeserializerWithBuiltIns`
2021-08-06 20:48:59 +03:00
Anton Bannykh
508d3bd9c0
JS IR IC: IC data may reference additional original declarations
...
Function types, which are created on the fly from lowerings are one such example.
2021-07-23 17:10:06 +03:00
Anton Bannykh
fa21132704
JS IR IC: fix order storage
...
Some classes don't survive till the end. Their declaration lists
need to be stored nevertheless.
2021-07-23 17:10:06 +03:00
Anton Bannykh
c6ab195a87
JS IR IC: invalid loops references exist after lowerings
2021-07-23 17:10:04 +03:00
Anton Bannykh
0130d18ea9
JS IR IC: deserialization fix
2021-07-23 17:10:03 +03:00
Roman Artemev
0310f7cb0b
[JS IC] Lot of fixes after rebase
2021-07-22 21:56:57 +03:00
Roman Artemev
8782399ffb
[JS IC] Make sure already bound symbol is not being enqueued
2021-07-22 21:56:56 +03:00
Anton Bannykh
20088994c1
JS IC: IC lowerings prototype
2021-07-22 21:56:55 +03:00
Ilya Chernikov
db61665ab8
[minor] IR: clean unnecessary ObsoleteDescriptorBasedAPI opt-ins
2021-07-21 18:05:42 +03:00
Ilya Chernikov
dee0487185
IR: Refactor IrBuiltIns to abstract it from descriptors
2021-07-16 02:24:18 +03:00
Roman Artemev
0326518fc9
[KLIB] Cutting down usages of moduleDescriptor in linker
...
Replace map key `ModuleDescriptor` with `String` which is module name
2021-07-13 14:43:42 +03:00
Roman Artemev
0a49b24320
[JS IR] Move klib resolution from cli into compiler
...
Simplify CLI -> Compiler API
Clean up code
2021-07-13 14:43:40 +03:00
Alexander Udalov
2834c22a85
IR: add BackendContext.typeSystem and JvmIrTypeSystemContext
...
To be able to override JVM-specific behavior of IrTypeSystemContext in
JVM IR, for things like JVM flexible types.
2021-07-01 19:35:44 +02:00
Roman Artemev
a8d0e60328
[JS TESTS] Extend test frame with some features
...
- Setting up specific ABI version for module
- Disabling mangle verification
2021-07-01 17:40:40 +03:00
Roman Artemev
b8e5185b61
[KLIB] Add extra debug information for Local signatures
2021-07-01 17:40:37 +03:00
Roman Artemev
b5c28c1912
[KLIB] Introduce compatible mode for klibs.
...
Based on library ABI version linker could decide which signature mode
to be used to guarantee backward compatibility.
2021-07-01 17:40:36 +03:00
Roman Artemev
6cdac22a23
[IR] Introduce new IdSignatures
...
FileSignature, CompositeSignature, LocalSignature
They are needed to make possible reference any non-local declaration via
signature, including private signature, type parameters and so on.
- Support those new signatures in proto and klibs
- Rename `isPublic` -> `isPubliclyVisible` due to changed semantic
- Fix FIR
- clean up code
2021-07-01 17:40:31 +03:00
Anton Bannykh
600099585d
IR: refactor IdSignatureSerializer
...
Use a separate instance for each file.
2021-06-27 22:56:33 +03:00
Anton Bannykh
a4cb70af31
JS IR: gather statement origins in one place
...
Preparing to serialize lowered IR
2021-06-25 00:59:22 +03:00
Roman Artemev
16ea3d9ae9
[TEST] Add IrText klib tests
2021-06-16 21:16:44 +03:00
Alexander Udalov
a3ad03d1ad
Slightly refactor module dependencies of backend.js/serialization.js
...
The comment in serialization.js/build.gradle.kts is not needed because
such dependency cannot be introduced accidentally, since Gradle does not
support cycles in module dependencies.
2021-06-01 20:28:22 +02:00
Ilya Goncharov
f40110eb83
[JS IR] Fixes after rebase
2021-05-20 16:37:52 +03:00
Ilya Goncharov
228c6879f5
[JS IR] Add per-module output module name
2021-05-20 16:37:44 +03:00
Ilya Goncharov
0e00186ca1
[JS IR] Fix compilation after rebase
2021-05-20 16:37:39 +03:00
Anton Bannykh
7bd9462ffb
[JS IR] save the desired JS output file name in the klib.
...
This is only usedful for code splitting. The output .js file name
is provided by the build system during the module compilation.
It is desirable to keep the .js output file names same as in old BE,
but calculating those name during the klib -> js phase is tricky.
Thus the desired names are saved in the klib, and used later on.
2021-05-20 16:37:35 +03:00
Anton Bannykh
8fe8419ad4
JS IR: serialize declarations without mutable state
2021-04-09 19:54:21 +03:00
Vladimir Ivanov
fd02802028
[Native] Export KDoc into generated native header
2021-03-09 16:50:23 +03:00
Alexander Udalov
addabae8d2
IR: move frontend-dependent code into implementations in psi2ir
2021-02-24 19:07:38 +01:00
Alexander Udalov
d991a3e40f
IR: simplify initialization cycle of TypeTranslator/ConstantValueGenerator
2021-02-24 19:07:38 +01:00
Alexander Udalov
5ea3d32b98
IR: remove TranslationPluginContext.bindingContext
...
This removes another dependency of 'ir.tree' on 'frontend', and among
other things, makes it possible to implement TranslationPluginContext
for FIR in the future.
2021-02-24 19:07:38 +01:00
Alexander Udalov
837eb739ea
IR: move CompilationErrorException to frontend.common
2021-02-24 19:07:37 +01:00
Alexander Udalov
1ae46b529f
IR: move ExpectDeclarationRemover to ir.backend.common
2021-02-24 19:07:37 +01:00
Alexander Udalov
ca5a35b4b3
Move CompilerEnvironment from 'frontend' to 'cli'
...
This is needed in order to have a single convenient place where to
register frontend services implemented _outside_ of the 'frontend'
module, such as the control flow analysis, extracted to a separate
module in a subsequent commit.
2021-02-24 17:17:03 +01:00
Anton Bannykh
bc9a791809
Refactor klib serializer/deserializer
2021-02-18 18:03:41 +03:00