For now there is no need to place object on stack before evaluation.
The result will be taken from memory and all unnecessary values on
stack will be removed
1. throw goes to catches instead of main exist block
2. return goes via finally (single level only supported atm)
3. collect non-direct return to retrieve all return expressions easier
As the `*Default` configurations are gone, each K/N target now has two
consumable configuration, the `*ApiElements` and the
`*CInteropApiElements`. They have diverging sets of attributes (both
more concrete than `*Default` had).
To make their attribute sets non-diverging, we set the
local-to-project=public on the `*CInteropApiElements` in order to match
the same attribute on the `*ApiElements` configuration
Related to the original fix of KT-47506
This is done to prevent unwanted files from also being located
in the output directory. If the task is executed it is expected
that the output directory only contains this one file.
This is necessary, since *everything* located in the output directory
will potentially be bundled into release apks.
^KT-48019
This approach is better than manual check for `IGNORE_BACKEND` directive
because it also tracks `IGNORE_BACKEND_FIR` directive and reduces
duplicating code
Changes in Gradle integration tests are needed because:
- in new-mpp-android, kotlin-stdlib-jdk8 is used, and JVM IR generates
JDK 8-specific bytecode (invokedynamic). D8 needs to be configured to
desugar it with source/target versions set to 1.8, otherwise it
reports an error.
- in AndroidExtensionsManyVariants and AndroidIcepickProject, D8 fails
with assertions enabled if AGP < 4.0.0 is used because of
https://issuetracker.google.com/issues/148661132. The tests which use
old AGP versions are probably not relevant anymore anyway.
Changes in kotlin-stdlib-runtime-merged.txt are caused by a slightly
different generation scheme of collection subclasses in JVM IR, and are
harmless.
(Previous attempt was at 15e978dbd311c2ba78ec32b394c21acde9811ccb.)
* Set the local-to-project attribute on the compatibility metadata
variant's "elements" configuration; not setting this attribute could
lead to ambiguity because of diverging sets of non-matched attributes
* Don't create the `runtimeOnly` configuration for the Kotlin/Native
targets (or potentially other targets with no runtime dependencies),
as the K/N target configurator is not aware of the configuration and
would not set the configuration up properly
* Don't create the legacy `*Default` configurations, as they basically
duplicate the `*ApiElements` / `*RuntimeElements` configurations but
don't have all the right attributes, so they are reckoned compatible
with some consumers unnecessarily and pollute the dependency
resolution error reports.
Issue #KT-47506