As well as mapFieldSignature, mapReturnType, mapAsmMethod and smaller
methods. This removes yet another dependency on KotlinTypeMapper in the
IR backend.
This information might be needed in subsequent lowerings or codegen. For
example, it'll be needed in MethodSignatureMapper to determine that we
need to box primitive return type if one of overridden functions has a
non-primitive return type.
For invoke in lambda classes specifically though, we need to remove this
override from the specialized invoke because otherwise we'd call a boxed
version in the bridge (see 73d2ae961c). In this change, we still keep
the override on a bridge though just for the sake of IR consistency.
- Insert patchDeclarationParents after whole processing
- Copy IR nodes to avoid duplications
- Insert correct type for getter during serialization of properties from parent class
- Do not use irThrowIse because it is broken somewhere in Native backend
The free args DSL may be changed in 1.3.70 for all platforms. So it
was decided to preserve the old behaviour here to avoid making
similar changes in two releases in a row.
We leave an ability to build final native binaries directly from
sources instead of building them from a klib. Thus we allow
a user to workaround possible bugs related to building a final
binary from a klib (-Xinclude compiler flag).
Earlier we propagated all free args specified for a compilation into
a link task. It was required because the link task actually compiled
the same source as the compile task but with another output kind.
But currently a link task produces a final binary from a klib instead
of sources. It means that such a propagation becomes incorrect. Now
options related to the compiler frontend like -Xexperimental must
be specified per compilation while options related to the compiler
backend (e.g. -opt, -g, -Xstatic-framework etc) - per binary.
This path shows a special warning if some of "binary-specific"
arguments are passed to a compilation.
Earlier all native binaries were produced directly from sources of
corresponding compilations. This patch changes this behavior. Now
a klibrary produced by a compilation is used to build a final
binary instead of sources. This allows us to avoid parsing the same
sources several times and reduces build time.
This patch also updates K/N version to 1.3.60-dev-11975, to get the
corresponding support from the compiler side.
Issue #KT-33076 Fixed
- change `detectReceiverTypes` return type to `List` instead of `Collection`
- it reflects that receiver types are actually ordered
- did not propagate signature changes to all possible places because it creates too much noise in git history
- ^KT-30996 Fixed