The patch removes logic of generating extra IrFiles (fake file) into
IrModuleFragment for the function type interfaces during klib deserialization,
because IC infrastructure can not process files which do not exist in klib.
Instead of adding extra IrFiles during deserialization, the empty files
with required packages are added into Kotlin/JS stdlib physically.
These files are used as containers for function type interface declarations.
Since Kotlin/WASM uses the same klib loading infrastructure as Kotlin/JS,
the the empty files are added into Kotlin/WASM stdlib as well.
The patch also adds a check that IrModuleFagment has files only from klib.
^KT-55720 Fixed
As absolute paths were also revealed in
atomicfu.jar
kotlin-stdlib-wasm
kotlin-test-wasm
Use solution from Alexander Likhachev (avoid accessing
buildDir, projectDir in doFirst()) to prevent breaking the configuration
cache.
Should be removed after fixing KT-50876
KTI-729
`jsArguments()` is lowered into a reference of the `arguments` object.
This is useful for extracting varargs, when calling Kotlin code from
JavaScript. For a concrete example, see KT-15223.
This is needed to 1) avoid ambiguity about the type of linkage used in Kotlin/Native compiler, 2) have the same exception name in JS and Native backends.
^KT-50775
Some sources for kotlin-stdlib-js-ir are not copied to build dir
and used directly from the project.
Modify kotlin.test/js-ir as well, while there's no evidence of the
problem so far.
Should be removed after KT-50876 fix.
^KTI-730 In Progress
Intentionally use doFirst section to trick gradle and not affect
inputs with absolute path usage.
Old behaviour can be returned by kotlin.build.use.absolute.paths.in.klib
in local.properties
Should be removed after KT-50876 fix.
^KTI-730 In Progress
This method was used for coercing `Long` values to JavaScript
`number`. However, it caused issues when `Long` values were
concatenated to a string (see KT-8666, KT-26706).
- Reuse JS IR Suspend function lowering
- Fix types
- Disable reinterpretCast-based optimization for inline
classes
- Add basic support to Wasm stdlib
- Explicitly transform suspend functions into regular functions
with continuations
- Clean suspend function handling from JS IR codegen