[JS IR] Use TypeSubstitutor for full substitution of types
- adding new tests
[JS IR] Commonize context and use in wasm
[JS IR] Add test with receiver with callable reference
[JS IR] Add prerequisites around inlining and callable references
[JS IR] Review fixes
- Add test with bounded type parameter
- Remove redundant casts
- Use offsets for synth function
- Correct traversing
[JS IR] Not use origin for not inlined function reference
[JS IR] Move util into common place
[JS IR] Fix offsets
[JS IR] Add type parameter argument and using value in test
[JS IR] Wrap inlined callable references with reified parameters
[JS IR] Add test on callable reference inlined fun
Merge-request: KT-MR-4722
This commit addresses the following issues:
* accessors didn't take into account their property's receiver type,
which caused NoSuchMethod due to signature mismatch. Now the property's
receiver type is passed to Fir2Ir translation of accessors.
* property's parent was not class, e.g., kotlin.collections.indices.
Now the symbol table collects WrappedPropertyDescriptorWithContainerSource
besides WrappedFunctionDescriptorWithContainerSource, so that
facade classes for such properties can be generated before codegen.
* accessor's parent was not class. Now the containerSource of
the property descriptor is passed to accessor descriptor.
Library methods such as 'listOf' are resolved
to have the package fragments as their parents,
but JVM expects their containing file classes as parents.
This fix generates those file classes and
uses them as parent replacements for such library methods.
where "fix" means "work around a bug that is much harder to fix". When
lambdas are extracted into the nearest class, captured type parameters
are not transformed into type parameters of the new method; because of
this, to check whether a reified type parameter is captured by a method
we need to check the outermost named function, not the current function.
Most of these tests used this directive as a way to opt in to a new
language feature, and most of those features are already stable for a
long time, so no opt-in is needed. Some other tests used the directive
to opt out from a language feature, replace those by the `LANGUAGE`
directive. One test used the directive to test behavior that actually
depended on the API version; use `API_VERSION` directive there instead.
* Move FinallyBlockLowering to common part
* Fix catching of dynamic exception
* Fix bridges for suspend functions
* Disable explicit cast to Unit
* Run lowering per module
* Update some test data