Ivan Kylchik
86b4d36b54
[Native] Make StringTable and its builder internal
2023-09-05 08:35:47 +00:00
Ivan Kylchik
70697af6b9
[Native] Move proto utils from KonanIrLinker into separate utils file
2023-09-05 08:35:47 +00:00
Ivan Kylchik
66b9c2f260
[Native] Move FORWARD_DECLARATION_ORIGIN into KonanForwardDeclarationModuleDeserializer
2023-09-05 08:35:47 +00:00
Ivan Kylchik
cc906ad6d5
[Native] Move INVALID_INDEX into KonanPartialModuleDeserializer
2023-09-05 08:35:47 +00:00
Ivan Kylchik
79fa0d2648
[Native] Move KonanForwardDeclarationModuleDeserializer to a separate file
2023-09-05 08:35:47 +00:00
Ivan Kylchik
7d1c929fb5
[Native] Make KonanForwardDeclarationModuleDeserializer nested instead of inner
2023-09-05 08:35:47 +00:00
Ivan Kylchik
701dc72f70
[Native] Move KonanInteropModuleDeserializer to a separate file
2023-09-05 08:35:47 +00:00
Ivan Kylchik
6d0b936639
[Native] Make KonanInteropModuleDeserializer nested instead of inner
2023-09-05 08:35:47 +00:00
Ivan Kylchik
5661316d7a
[Native] Use FORWARD_DECLARATIONS_MODULE_NAME instead of hardcoded value
2023-09-05 08:35:47 +00:00
Ivan Kylchik
3fba699c49
[Native] Move KonanPartialModuleDeserializer to a separate file
2023-09-05 08:35:47 +00:00
Ivan Kylchik
13a39c82ae
[Native] Make KonanPartialModuleDeserializer nested instead of inner
2023-09-05 08:35:47 +00:00
Ivan Kylchik
bf7f2afe5d
[Native] Rename KonanIrlinker to KonanIrLinker
2023-09-05 08:35:47 +00:00
Ivan Kylchik
66650d2dcc
[Native] Drop IrSerializationUtil file
...
Most methods from there are unused
2023-09-05 08:35:47 +00:00
Ivan Kylchik
852d829d83
[Native] Drop KonanFileMetadataSource class
...
Replaced it with more common `DescriptorMetadataSource.File`
2023-09-05 08:35:47 +00:00
Ivan Kylchik
36373ddfa7
[Native] Drop unused CodegenStaticFieldMetadata class
2023-09-05 08:35:46 +00:00
Ivan Kylchik
d13d249640
[Native] Drop excess cast from isExternalObjCClass method
2023-09-05 08:35:46 +00:00
Ivan Kylchik
a35defc682
[Native] Replace KonanIrModuleFragmentImpl with IrModuleFragmentImpl
2023-09-05 08:35:46 +00:00
Ivan Kylchik
dfa60ee092
[IR] Drop TODO from IrModuleFragmentImpl
...
This TODO doesn't have any description, and it is already
hard to understand what the author meant.
2023-09-05 08:35:46 +00:00
Kirill Rakhman
f08d4b8bb1
[FIR] Improve condition for sorting equivalent calls by source first
...
This accommodates for declarations generated by plugins that don't have
a source.
2023-09-05 07:08:28 +00:00
Alexander Shabalin
9ab6a5ff56
[K/N] Migrate all stdlib_external tests to new testing infra ^KT-61259
...
- Move backend.native/tests/stdlib_external to runtime/test This mirrors
tests location (in relation to sources) on other backends.
- Remove all backend.native/tests tasks using stdlib_external.
Additionally remove now unused KonanGTest.
- Include complete native-wasm/test and runtime/test in
native/native.test
- In runtime/test/numbers/MathTest.kt leave only native-specific part.
2023-09-04 18:51:10 +00:00
Roman Golyshev
c9e4b71010
KT-61689 [LL API] Handle scripts in ContextCollector
...
Add `FirDesignationWithScript`, because regular designation
does not account for scripts at all - that makes it
cumbersome to add the script's top level and implicit
receiver scopes when collecting contexts for the
non-top-level declarations (class members, for example)
^KT-61689 Fixed
2023-09-04 16:57:37 +00:00
Roman Golyshev
83049dc25c
KT-61689 [LL API] Improve readability of withInterceptor function
2023-09-04 18:02:20 +02:00
Roman Golyshev
90ed90c9a7
KT-61689 [LL API] Support scripts in ContextCollector tests
2023-09-04 18:02:20 +02:00
Yan Zhulanow
5559a0754d
[LL API] Handle smart casts correctly on 'FirCodeFragment' analysis
2023-09-04 15:47:56 +00:00
Yan Zhulanow
0fbf648971
[LL API] Pull smart casts from the CFG in 'ContextCollector'
...
^KT-61599 Fixed
2023-09-04 15:47:56 +00:00
Yan Zhulanow
1247ef750f
[LL API] Refactoring, compute PsiElement inside 'dumpContext()'
2023-09-04 15:47:56 +00:00
Yahor Berdnikau
f866883871
[Gradle] Also configure JsIrLink tasks with target compiler options
...
This should synchronize options between JS compile and link tasks
configured with target compiler options DSL.
^KT-61253 Fixed
2023-09-04 14:29:00 +00:00
Yahor Berdnikau
38e7bf6afa
[Gradle] Add compilerOptions() methods to KotlinCompilation implementations
...
This should help to avoid user mistakes in configuring options when they
are trying to use KotlinCompilation.
^KT-61636 Fixed
2023-09-04 14:29:00 +00:00
Yahor Berdnikau
55a0c86508
[Gradle] Fix JS module name and freeCompilerArgs config is not propagated to the task
...
Task was not using configured module name correctly.
In case of using "browser()" DSL freeCompilerArgs could be overwritten.
^KT-61194 Fixed
2023-09-04 14:28:59 +00:00
Yahor Berdnikau
4c60dd3f38
[Gradle] Fix JVM and Android targets moduleName change is not propagated in the multiplatform project
...
Missed existing logic where 'moduleName' was specifically configured
from 'moduleName' task input for MPP projects.
^KT-61303 Fixed
2023-09-04 14:28:59 +00:00
Dmitrii Gridin
c095b60fe8
[LL FIR] drop outdated LazyBodyIsNotTouchedTest
...
We have our own transformers and tests against compiler test data,
so separate test with compiler transformers is redundant
2023-09-04 12:37:12 +00:00
Nikita Bobko
01fc708a0f
Mark expect/actual classifiers as experimental
...
^KT-61573 Fixed
Review: https://jetbrains.team/p/kt/reviews/11969/timeline
Tests:
- MultiPlatformIntegrationTestGenerated
- CliTestGenerated
- MultiPlatformIntegrationTestGenerated
- DiagnosticTestGenerated.Multiplatform
- FirLightTreeOldFrontendDiagnosticsTestGenerated
Also add -Xexpect-actual-classes flag to all necessary ./libraries/* modules
Otherwise compilation of those modules failes because of `-Werror`
2023-09-04 12:21:37 +00:00
Alexander Shabalin
6a19c4ce96
[K/N] Remove legacy executors.
2023-09-04 11:38:47 +00:00
Ilya Gorbunov
78ef58f59d
[Generator] Do not use explicit final modifier in Native primitive classes
...
'final' is the default modality, safe to omit
2023-09-04 11:32:39 +00:00
Ilya Gorbunov
8ae21c0e1b
[Generator] Do not omit public visibility of methods in wasm
2023-09-04 11:32:39 +00:00
Ilya Gorbunov
918b935e22
[Generator] Write the body of Boolean.hashCode in one place
2023-09-04 11:32:39 +00:00
Ilya Gorbunov
1c149925b7
[Generator] Always put expression body on a new line
2023-09-04 11:32:39 +00:00
Ilya Gorbunov
68a9b9c312
[Generator] Reference generator class in generated code files
2023-09-04 11:32:39 +00:00
Ilya Gorbunov
74ac48851a
[Generator] Canonical order of modifiers
2023-09-04 11:32:39 +00:00
Ilya Gorbunov
60bbd08569
[Generator] Rename additionalDoc, put its content before annotations
2023-09-04 11:32:39 +00:00
Nikolay Lunyak
cd392ebe69
[FIR] Don't miss RETURN_NOT_ALLOWED
...
^KT-59914 Fixed
2023-09-04 10:19:11 +00:00
Vyacheslav Gerasimov
009cda0c60
Build: Make robolectric tests run offline without downloading artifacts
...
#KTI-1367
2023-09-04 08:57:19 +00:00
Nikolay Lunyak
bb8d3a0f80
[FIR] Don't recalculate argumentVariables for the same node
...
`knownVariables` can't be moved to the outer
function, because it's specific to the current
path: we want to check that the contract
condition is approved along the current path.
For example, in the
`FirPsiDiagnosticTestGenerated.testPropertyGetter`
test when analyzing the function, we want
to check if we can derive the `d1 == Any`
type statement (where `d1` is the receiver).
If we can't, the flow won't contain `d1`
among `knownVariables`
2023-09-04 08:13:00 +00:00
Kirill Rakhman
1c446151e7
[FIR] Skip resolvable package names in front of UNRESOLVED_REFERENCE
...
#KT-55471
2023-09-04 08:05:08 +00:00
Kirill Rakhman
10f7989af6
[FIR] Report UNRESOLVED_REFERENCE on the first unresolved qualifier
...
#KT-55471 Fixed
2023-09-04 08:05:07 +00:00
Kirill Rakhman
40fadac060
[FIR] Remove incorrect code generation comment
2023-09-04 08:05:07 +00:00
Dmitrii Gridin
420b6d48c3
[LL FIR] FileStructure: avoid redundant bodies visiting
...
We shouldn't try to find structure elements inside non-local declarations
Only classes and scripts can have an inner structure
^KT-60611
2023-09-03 11:44:00 +00:00
Dmitrii Gridin
8832865e9a
[LL FIR] simplify FileStructureElement invalidation
...
We can avoid complex reanalyze-base logic and just directly
drop outdated data from FileStructureCache
^KT-60611
2023-09-03 11:44:00 +00:00
Dmitrii Gridin
89c186c496
[LL FIR] move part of in-block modification logic into service
...
^KT-60611
2023-09-03 11:44:00 +00:00
Marco Pennekamp
6b0333d74c
[FIR] Avoid AST loading in KtPrimaryConstructor.toFirConstructor
...
- `getConstructorKeyword` forces an AST load due to a child search. In
most cases, we don't need to check the constructor keyword in primary
constructors at all (e.g. `class ABC()` with an implicit primary
constructor). The keyword check is only needed when there are primary
constructor modifiers (e.g. `class ABC constructor()`).
Thanks to Dima Gridin for the suggested fix.
^KT-61635 fixed
2023-09-02 12:59:24 +02:00