Fir2Ir: enable IR-based fake override builder
Invert the logic of IR/FIR2IR-based generators: change the CLI argument to -Xuse-fir-fake-override-builder, test directive to USE_FIR_BASED_FAKE_OVERRIDE_GENERATOR, etc. The changes in test data caused by using IR fake override builder by default are in the subsequent commit. #KT-61514
This commit is contained in:
committed by
Space Team
parent
09db7dbd22
commit
f98a22e8e4
+2
-1
@@ -137,10 +137,11 @@ where advanced options include:
|
||||
Eliminate builder inference restrictions, for example by allowing type variables to be returned from builder inference calls.
|
||||
-Xuse-fir-extended-checkers Use extended analysis mode based on the frontend IR.
|
||||
Warning: This feature is not yet production-ready.
|
||||
-Xuse-fir-fake-override-builder
|
||||
Generate all fake overrides via FIR2IR instead of IR, i.e. revert to behavior before KT-61514 was resolved.
|
||||
-Xuse-fir-ic Compile using frontend IR internal incremental compilation.
|
||||
Warning: This feature is not yet production-ready.
|
||||
-Xuse-fir-lt Compile using the LightTree parser with the frontend IR.
|
||||
-Xuse-ir-fake-override-builder Generate fake overrides via IR. See KT-61514
|
||||
-Xuse-k2 Compile using the experimental K2 compiler pipeline. No compatibility guarantees are provided yet.
|
||||
-Xverbose-phases Be verbose while performing the given backend phases.
|
||||
|
||||
|
||||
+2
-1
@@ -229,10 +229,11 @@ where advanced options include:
|
||||
Eliminate builder inference restrictions, for example by allowing type variables to be returned from builder inference calls.
|
||||
-Xuse-fir-extended-checkers Use extended analysis mode based on the frontend IR.
|
||||
Warning: This feature is not yet production-ready.
|
||||
-Xuse-fir-fake-override-builder
|
||||
Generate all fake overrides via FIR2IR instead of IR, i.e. revert to behavior before KT-61514 was resolved.
|
||||
-Xuse-fir-ic Compile using frontend IR internal incremental compilation.
|
||||
Warning: This feature is not yet production-ready.
|
||||
-Xuse-fir-lt Compile using the LightTree parser with the frontend IR.
|
||||
-Xuse-ir-fake-override-builder Generate fake overrides via IR. See KT-61514
|
||||
-Xuse-k2 Compile using the experimental K2 compiler pipeline. No compatibility guarantees are provided yet.
|
||||
-Xverbose-phases Be verbose while performing the given backend phases.
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
open class Base
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// KT-64692
|
||||
|
||||
// test data differs - no getOrDefault in AbstractMap for non-jvm.
|
||||
@@ -11,4 +10,4 @@ class MyMap : AbstractMap<Int, Int>() {
|
||||
|
||||
// clash with stdlib internal function
|
||||
fun containsEntry(entry: Map.Entry<*, *>?) = false
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// FILE: J.java
|
||||
@@ -29,4 +28,4 @@ class E : D() {
|
||||
|
||||
fun foo(x : I) {
|
||||
x.foo()
|
||||
}
|
||||
}
|
||||
|
||||
+3
-6
@@ -1,10 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// SEPARATE_SIGNATURE_DUMP_FOR_K2
|
||||
// ^ Value parameters in fake overrides generated by K1 and K2 are different
|
||||
|
||||
// WITH_REFLECT
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// SEPARATE_SIGNATURE_DUMP_FOR_K2
|
||||
// ^ Value parameters in fake overrides generated by K1 and K2 are different
|
||||
|
||||
// FILE: Java1.java
|
||||
public class Java1 extends KotlinClass { }
|
||||
@@ -14,4 +11,4 @@ import java.util.ArrayList
|
||||
|
||||
class A : Java1()
|
||||
|
||||
open class KotlinClass : ArrayList<Int>()
|
||||
open class KotlinClass : ArrayList<Int>()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// SEPARATE_SIGNATURE_DUMP_FOR_K2
|
||||
// ISSUE: KT-65302
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// ISSUE: KT-65207
|
||||
|
||||
// FILE: Java1.java
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// ISSUE: KT-65493
|
||||
|
||||
|
||||
Reference in New Issue
Block a user