Commit Graph

142 Commits

Author SHA1 Message Date
Artem Kobzar 044c0adae7 [K/JS] Implement an incremental compilation for the per-file granularity 2023-07-19 15:57:56 +00:00
Dmitriy Novozhilov 8e73d5a54a [FIR] Run irGenerationExtensions after IR actualization
^KT-56173 Fixed
2023-07-07 11:26:15 +00:00
Artem Kobzar 966a342bf1 [K/JS] Migrate invalidation tests to ES modules 2023-06-30 16:13:35 +00:00
Kirill Rakhman 2cc588d6d8 [RAW FIR] Rename raw FIR builder types for clarity 2023-06-30 12:05:43 +00:00
Alexander Udalov 6cce510319 Tests: tweak light analysis mode test filters
Do not compare private and synthetic methods between full and light
analysis modes, some private fields, and InnerClasses attributes. This
is needed to prepare these tests for migration to JVM IR.
2023-06-22 17:10:51 +02:00
Alexander Udalov 4ac6f01d31 Add ReplaceWithSupertypeAnonymousTypeTransformer to light analysis tests
To make these tests behave closer to kapt, since kapt is the primary use
case for the light analysis mode.

AbstractLightAnalysisModeTest compares the text dump of bytecode
obtained with full analysis and light analysis, removing things like
anonymous/synthetic entities. In the light analysis mode anonymous
objects in supertypes are always approximated, and in the full analysis
mode they are always present as is in signatures. So we're transforming
the text dump in the same way, by approximating anonymous objects in
signatures (more precisely, in return types of methods and fields) to
the supertype.
2023-06-22 17:10:51 +02:00
Ivan Kylchik 0021a5f655 [K2] Save inlined java field into special InlineConstTracker 2023-06-14 19:02:39 +00:00
Alexander Udalov fb900d2e2a JVM: remove most usages of JvmTarget.JVM_1_6 2023-05-19 13:24:00 +00:00
Kirill Rakhman 6119606cb6 [FIR LT] Make syntax error reporting in tests consistent with cli 2023-05-05 09:34:23 +00:00
Sergej Jaskiewicz a74df3b4b4 [IR] Store manglers used for signature computation in IrBackendInput
We will need them in signature dump tests later.
2023-05-04 14:58:06 +00:00
Nataliya.Valtman 2a391f7330 Move kotlin-build-statistic project to :compiler 2023-04-25 11:29:09 +00:00
nataliya.valtman e34dd043da Add minimal statistic report for JPS build
Fix build stat for gradle 8

#KT-56438 Fixed
2023-04-25 11:29:09 +00:00
Ivan Kylchik 0b70b7904d [K2] Create and add EvaluatedConstTracker in configuration 2023-04-19 13:52:43 +00:00
Ivan Kylchik fe989d0ba7 [K2] Add languageVersionSettings to Fir2IrConfiguration class 2023-04-19 13:52:42 +00:00
Ivan Kylchik e16231104e [K2] Add Fir2IrConfiguration class to store configuration parameters
One example of such parameter is `linkViaSignatures`. There is
`Psi2IrConfiguration` as an analog for K1.
2023-04-19 13:52:41 +00:00
Ivan Kylchik 525098dea6 [K2] Unbind fir:fir2ir:jvm-backend from other non jvm modules 2023-04-19 13:52:41 +00:00
Ivan Kochurkin 3a60b30dae Minor: IrActualizationResult -> IrActualizedResult 2023-04-17 19:55:35 +00:00
Artem Kobzar 5dc6da2b33 [K/JS] Add serialization/deserialization for JsImport/JsExport nodes 2023-04-13 12:58:46 +00:00
Ivan Kochurkin ee73e4774b [K2, MPP] Remove redundant expect declarations from klib metadata
^KT-57250 Fixed

Introduce flat Fir2IrActualizedResult

It contains output from Fir2Ir and IrActualizer
2023-03-24 14:48:26 +00:00
Dmitriy Dolovov 153aed29ba [JS][IC][test] Fix step numbers in tests 2023-03-23 10:24:28 +00:00
Dmitriy Dolovov dc05683f59 [PL][tests] Fix: Properly count test steps in KLIB ABI compatibility tests 2023-03-23 10:24:26 +00:00
Dmitriy Novozhilov da581f38e1 [Test] Require specifying parser for FIR test. Unify names for FIR tests
Now all tests with `Fir` in name are named accordingly to parser which
  is used in them -- `FirPsi` or `FirLightTree`. This is needed to keep
  consistency between different types of tests, because there is no
  single default in parser mode between different scenarios of using FIR
2023-02-24 11:15:26 +00:00
Alexander Udalov d2938e732a IR: remove IrTypeOperatorCall.typeOperandClassifier 2023-02-22 22:40:34 +00:00
Vladimir Dolzhenko 3e99807436 Add ability to provide specific AbsentDescriptorHandler
#EA-457188

Merge-request: KT-MR-8900
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-02-22 12:44:46 +00:00
Alexander Korepanov 3c9d653595 [JS IR] Ignore unbound symbols in IC infrastructure
The IR linker is responsible for detecting unbound symbols,
 if it skips them for some reason, IC infrastructure must not fail
 with unbound symbols exceptions. Anyway, the IR validator
 verifies later if there are unbound symbols in
 reachable IR and generates the corresponding error.

^KT-56602 Fixed
2023-02-21 14:46:44 +00:00
Simon Ogorodnik 36c3d62ba1 Modularized tests. Fix java source scope for light tree mode
We should use appropriate java source scope for java files,
not kotlin files

^KT-56075
2023-02-15 15:43:30 +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 0f9107c153 [FIR2IR] Remove passing excess arguments to jvm backend functions and classes
generateModuleInFrontendIRMode, runBackend

FirJvmBackendExtension, ModuleCompilerIrBackendInput
2023-02-01 11:42:45 +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
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 f17e1314f6 [FIR2IR] Implement tables merging in Fir2Ir classes and SymbolTable
- Pass dependent (usually common code) components to further FIR2IR converters
- Don't reinitialize builtin
2023-01-13 12:55:57 +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
Pavel Mikhailovskii 38a56ba8e8 KT-55308, KT-55769 Sort InnerClasses entries. Add DONT_SORT_DECLARATIONS directive 2023-01-13 01:07:10 +00:00
pyos 3887c80816 FIR CFA: ensure on API level that graphs have enter & exit
What's going on with script graphs?..
2023-01-10 15:40:49 +02:00
pyos fa0ea1504e FIR CFA: remove CFGNode.outgoingEdges
If it's symmetric with incomingEdges, then what's the point?..
2023-01-10 15:40:47 +02:00
Dmitriy Novozhilov 5d6cb2b691 [Test] Use IrPluginContext for searching declarations for DUMP_EXTERNAL_CLASS check 2022-12-09 12:02:07 +00:00
Alexander Korepanov 9edaebf235 [JS IR] Enable DTS generation in IC
^KT-54398 Fixed
2022-12-07 18:05:53 +00:00
Nikolay Lunyak 2e9f9f987b [FIR] KT-44698: Print file:line:offset on K2 crash
^KT-44698 Fixed
2022-11-29 22:35:51 +00:00
Egor Kulikov 067036c162 RawFirBuilder refactoring
Second step for KT-52615
Get rid of PsiHandlingMode
Get rid of source in FirLazyBlock
Refactor lazy creation

Merge-request: KT-MR-7753
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2022-11-22 14:43:53 +00:00
Ilya Chernikov 30df65c321 FIR2IR: pass external builtins to module descriptor
to support scenario when builtins are deserialized from KLib
2022-11-12 14:34:07 +01:00
Dmitriy Dolovov 181809e2af [IR][tests] Support friend-dependencies in KLIB ABI compatibility tests 2022-10-20 10:18:56 +02:00
Ivan Kochurkin a4ad8d59b6 [FIR] Move createSessionForTests, createSessionForTests into FirTestSessionFactoryHelper 2022-10-13 18:11:49 +00:00
Ivan Kochurkin 40a01180ff [FIR] Move createSessionWithDependencies and createEmptySession into FirSessionFactoryHelper 2022-10-13 18:11:48 +00:00
Pavel Mikhailovskii ca221cc6f2 Unused import 2022-09-27 13:34:09 +02:00
Alexander Korepanov 47bbd5e8c1 [JS IR] Add work around in EnumEntriesList for JS IR to avoid name clashes
JS IR generates bridges with type checks for special class methods,
 however if parent and child type parameters are same,
 the JS signature for the generated brige will be clashed with
 the JS signature of original method.

 This patch changes type parameter name of EnumEntriesList to avoid the clash.

^KT-54011 Fixed
2022-09-16 07:19:20 +00:00
Alexander Udalov 87d3ce6ded Write a copy of SMAP to a new annotation
To make it available for dynamically attached JVMTI agents.

`@SourceDebugExtension` annotation value is equal to the
SourceDebugExtension attribute value, which is checked now for all box
tests. The difference is that the annotation stored in the constant
pool, which is available for dynamically attached JVMTI agents.

 #KT-53438 Fixed
2022-09-09 14:32:35 +02:00
Pavel Mikhailovskii a75d5ba4cf KT-53465, KT-53677 Get rid of unnecessary checkcasts to array of reified type 2022-09-06 18:33:38 +00:00
Pavel Mikhailovskii 18e61315f4 KT-27936 Generate InnerClasses attributes 2022-08-23 22:06:10 +00:00