A full mangled name of a declaration is a mangled name that includes
the mangled names of all the declaration's parents.
We don't use full mangled names for building `IdSignature`s. We use them
in two places:
- Generating stable names for JavaScript functions in Kotlin/JS
(see `NameTables.kt`)
- Generating names for LLVM symbols from lowered IR functions in
Kotlin/Native (see `BinaryInterface.kt`)
In both of these places we run the IR mangler, hence we don't need this
functionality in other manglers.
We plan to disable computing full mangled names of declarations in all
manglers except the IR mangler (see the subsequent commits).
From now on, in irText tests we dump only the following mangled names:
- Full mangled names computed using the IR mangler
- Signature mangled names computed using the Descriptor mangler
- Signature mangled names computed using the IR mangler
- Signature mangled names computed using the FIR mangler
Here by a full mangled name we mean the mangled name of a declaration
computed using the `MangleMode.FULL` mode. Those mangled names include
the mangled names of the declaration'a parents.
By a signature mangled name we mean the mangled name of a declaration
computed using the `MangleMode.SIGNATURE` mode.
These mangled names are used to compute an `IdSignature` for
the declaration, hence the name.
Add missing type propagation to getter and setter that was missed due
to copy-pasted logic.
`computeReturnTypeRef` should check the session to avoid infinitive
recursion
^KT-63361 Fixed
Each compiler-based LL FIR test can:
- fail in both non-reversed and reversed configurations, muted with `// MUTE_LL_FIR`
- fail in non-reversed test only, muted with `// IGNORE_NON_REVERSED_RESOLVE`
- fail in reversed test only, muted with `// IGNORE_REVERSED_RESOLVE`
`KotlinAnnotationsResolver` must see everything that is resolvable from
the current module; otherwise it will not work properly.
The previous scope was the module itself + its binary dependencies
(jars).
Now the scope will contain the module itself and ALL its dependencies,
including other modules.
^KT-63096 Fixed
The existing reference shortener does not use import alias when it
shortens a symbol. Instead, it adds a new import directive for the
symbol that is already imported. This commit updates reference shortener
to let it reuse the existing import alias rather than adding a new one:
1. When shortening a symbol, check whether the symbol is already
imported.
2. If it is already imported by an import alias, keep the symbol
reference expression and the import alias as a string together in
`ShortenCommand`.
The actual PSI update (shortening) based on the ShortenCommand is done
by IntelliJ.
^KTIJ-27205
- While `collectionInitializationInfo` unwrapped a script's top-level
declarations, `check` forgot to do it, so a script effectively had no
top-level properties in the mind of the checker.
^KT-63286 fixed
- The test data is missing initialization checks and will be fixed with
the subsequent commit.
- The test data is originally taken from
`backingField/TopLevelPropertyInitialization` and has been simplified.
- I didn't add `const val` properties to the test data (compared to the
original) due to KT-20110.
^KT-63286
This change reorders declared fields such that LLVM can pack each class
space optimally, minimizing the padding required. The guarantee is that
an objects body will take up space equal to the sum of the sizes of its
fields (inherited and declared) rounded up to a multiple of 8 bytes.
This also implies that no object will contain more than 7 bytes of
padding.
Previous changes uncovered a problem with lacking of stdlib in
dependencies, which was quite hard to debug and determine.
So this check is supposed to discover similar issues in the future
much more easily.