[JS IR] Fix offsets and add new test

[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 is contained in:
Ilya Goncharov
2021-10-11 09:02:08 +00:00
committed by Space
parent c9510af2c7
commit b0aefd543a
14 changed files with 267 additions and 10 deletions
@@ -26820,6 +26820,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("callableReferenceInlinedFun.kt")
public void testCallableReferenceInlinedFun() throws Exception {
runTest("compiler/testData/codegen/box/reified/callableReferenceInlinedFun.kt");
}
@TestMetadata("checkcast.kt")
public void testCheckcast() throws Exception {
runTest("compiler/testData/codegen/box/reified/checkcast.kt");
@@ -26226,6 +26226,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("callableReferenceInlinedFun.kt")
public void testCallableReferenceInlinedFun() throws Exception {
runTest("compiler/testData/codegen/box/reified/callableReferenceInlinedFun.kt");
}
@TestMetadata("checkcast.kt")
public void testCheckcast() throws Exception {
runTest("compiler/testData/codegen/box/reified/checkcast.kt");
@@ -26136,6 +26136,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("callableReferenceInlinedFun.kt")
public void testCallableReferenceInlinedFun() throws Exception {
runTest("compiler/testData/codegen/box/reified/callableReferenceInlinedFun.kt");
}
@TestMetadata("checkcast.kt")
public void testCheckcast() throws Exception {
runTest("compiler/testData/codegen/box/reified/checkcast.kt");
@@ -20060,6 +20060,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("callableReferenceInlinedFun.kt")
public void testCallableReferenceInlinedFun() throws Exception {
runTest("compiler/testData/codegen/box/reified/callableReferenceInlinedFun.kt");
}
@TestMetadata("checkcast.kt")
public void testCheckcast() throws Exception {
runTest("compiler/testData/codegen/box/reified/checkcast.kt");