[WASM] Add ConstEvaluationLowering to the lowering list

This commit is contained in:
Ivan Kylchik
2023-11-16 17:16:15 +01:00
committed by Space Team
parent 427c067cd8
commit c82bc8f0ce
50 changed files with 560 additions and 130 deletions
@@ -21711,6 +21711,66 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt");
}
@Test
@TestMetadata("booleanOperations.kt")
public void testBooleanOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.kt");
}
@Test
@TestMetadata("byteOperations.kt")
public void testByteOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/byteOperations.kt");
}
@Test
@TestMetadata("charOperations.kt")
public void testCharOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt");
}
@Test
@TestMetadata("complexBooleanConstant.kt")
public void testComplexBooleanConstant() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/doubleOperations.kt");
}
@Test
@TestMetadata("floatOperations.kt")
public void testFloatOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/floatOperations.kt");
}
@Test
@TestMetadata("inJavaLangPackage.kt")
public void testInJavaLangPackage() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/inJavaLangPackage.kt");
}
@Test
@TestMetadata("inJavaPackage.kt")
public void testInJavaPackage() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/inJavaPackage.kt");
}
@Test
@TestMetadata("intOperations.kt")
public void testIntOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intOperations.kt");
}
@Test
@TestMetadata("jvmFloatDoubleToString.kt")
public void testJvmFloatDoubleToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/jvmFloatDoubleToString.kt");
}
@Test
@TestMetadata("kt55912.kt")
public void testKt55912() throws Exception {
@@ -21723,6 +21783,72 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/involvesIrInterpreter/kt56215.kt");
}
@Test
@TestMetadata("longOperations.kt")
public void testLongOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt");
}
@Test
@TestMetadata("objectConstValInAnnotationArgument.kt")
public void testObjectConstValInAnnotationArgument() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/shortOperations.kt");
}
@Test
@TestMetadata("stdlibConst.kt")
public void testStdlibConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt");
}
@Test
@TestMetadata("thisPlusStringWithObject.kt")
public void testThisPlusStringWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/constEvaluationFromJavaWorld")
@TestDataPath("$PROJECT_ROOT")
@@ -21741,6 +21867,72 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
public void testAllFilesPresentInIntrinsicConst() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt");
}
@Test
@TestMetadata("enumNameWithInit.kt")
public void testEnumNameWithInit() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt");
}
@Test
@TestMetadata("equals_after.kt")
public void testEquals_after() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt");
}
@Test
@TestMetadata("kCallableNameWithSideEffect.kt")
public void testKCallableNameWithSideEffect() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt");
}
@Test
@TestMetadata("kt58717.kt")
public void testKt58717() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt");
}
@Test
@TestMetadata("nullableEnumName.kt")
public void testNullableEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/nullableEnumName.kt");
}
}
@Nested
@@ -21751,6 +21943,42 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
public void testAllFilesPresentInSerialization() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/serialization"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("annotationInArguments.kt")
public void testAnnotationInArguments() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt");
}
@Test
@TestMetadata("annotationSerialization.kt")
public void testAnnotationSerialization() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt");
}
@Test
@TestMetadata("annotationWithArray.kt")
public void testAnnotationWithArray() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt");
}
@Test
@TestMetadata("annotationWithDefaults.kt")
public void testAnnotationWithDefaults() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt");
}
@Test
@TestMetadata("nestedTypeAnnotation.kt")
public void testNestedTypeAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/nestedTypeAnnotation.kt");
}
@Test
@TestMetadata("typeAnnotation.kt")
public void testTypeAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/typeAnnotation.kt");
}
}
}
@@ -21711,6 +21711,66 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt");
}
@Test
@TestMetadata("booleanOperations.kt")
public void testBooleanOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.kt");
}
@Test
@TestMetadata("byteOperations.kt")
public void testByteOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/byteOperations.kt");
}
@Test
@TestMetadata("charOperations.kt")
public void testCharOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt");
}
@Test
@TestMetadata("complexBooleanConstant.kt")
public void testComplexBooleanConstant() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/doubleOperations.kt");
}
@Test
@TestMetadata("floatOperations.kt")
public void testFloatOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/floatOperations.kt");
}
@Test
@TestMetadata("inJavaLangPackage.kt")
public void testInJavaLangPackage() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/inJavaLangPackage.kt");
}
@Test
@TestMetadata("inJavaPackage.kt")
public void testInJavaPackage() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/inJavaPackage.kt");
}
@Test
@TestMetadata("intOperations.kt")
public void testIntOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intOperations.kt");
}
@Test
@TestMetadata("jvmFloatDoubleToString.kt")
public void testJvmFloatDoubleToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/jvmFloatDoubleToString.kt");
}
@Test
@TestMetadata("kt55912.kt")
public void testKt55912() throws Exception {
@@ -21723,6 +21783,72 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/involvesIrInterpreter/kt56215.kt");
}
@Test
@TestMetadata("longOperations.kt")
public void testLongOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt");
}
@Test
@TestMetadata("objectConstValInAnnotationArgument.kt")
public void testObjectConstValInAnnotationArgument() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/shortOperations.kt");
}
@Test
@TestMetadata("stdlibConst.kt")
public void testStdlibConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt");
}
@Test
@TestMetadata("thisPlusStringWithObject.kt")
public void testThisPlusStringWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/constEvaluationFromJavaWorld")
@TestDataPath("$PROJECT_ROOT")
@@ -21741,6 +21867,72 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
public void testAllFilesPresentInIntrinsicConst() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt");
}
@Test
@TestMetadata("enumNameWithInit.kt")
public void testEnumNameWithInit() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt");
}
@Test
@TestMetadata("equals_after.kt")
public void testEquals_after() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt");
}
@Test
@TestMetadata("kCallableNameWithSideEffect.kt")
public void testKCallableNameWithSideEffect() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt");
}
@Test
@TestMetadata("kt58717.kt")
public void testKt58717() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt");
}
@Test
@TestMetadata("nullableEnumName.kt")
public void testNullableEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/nullableEnumName.kt");
}
}
@Nested
@@ -21751,6 +21943,42 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
public void testAllFilesPresentInSerialization() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/serialization"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("annotationInArguments.kt")
public void testAnnotationInArguments() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt");
}
@Test
@TestMetadata("annotationSerialization.kt")
public void testAnnotationSerialization() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt");
}
@Test
@TestMetadata("annotationWithArray.kt")
public void testAnnotationWithArray() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt");
}
@Test
@TestMetadata("annotationWithDefaults.kt")
public void testAnnotationWithDefaults() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt");
}
@Test
@TestMetadata("nestedTypeAnnotation.kt")
public void testNestedTypeAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/nestedTypeAnnotation.kt");
}
@Test
@TestMetadata("typeAnnotation.kt")
public void testTypeAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/typeAnnotation.kt");
}
}
}