[JS IR] Fix IC invalidation for fake override inline functions
The patch enables the direct dependency between fake override inline function and its implementation from the base class. Because klibs do not keep a signature of fake override implementation, incremental cache can not use the signature index, therefore the signature is serialized to a cache file as is. ^KT-51896 Fixed
This commit is contained in:
committed by
Space
parent
c6299ee277
commit
644447db84
+12
@@ -0,0 +1,12 @@
|
||||
abstract class AbstractClassA {
|
||||
inline val propertyWithGetter: String
|
||||
get() = "0"
|
||||
|
||||
inline var propertyWithSetter: String
|
||||
get() = savedStr
|
||||
set(str) {
|
||||
savedStr = "$str 0"
|
||||
}
|
||||
|
||||
var savedStr = "empty"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
abstract class AbstractClassA {
|
||||
inline val propertyWithGetter: String
|
||||
get() = "1"
|
||||
|
||||
inline var propertyWithSetter: String
|
||||
get() = savedStr
|
||||
set(str) {
|
||||
savedStr = "$str 0"
|
||||
}
|
||||
|
||||
var savedStr = "empty"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
abstract class AbstractClassA {
|
||||
inline val propertyWithGetter: String
|
||||
get() = "1"
|
||||
|
||||
inline var propertyWithSetter: String
|
||||
get() = savedStr
|
||||
set(str) {
|
||||
savedStr = "$str 2"
|
||||
}
|
||||
|
||||
var savedStr = "empty"
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1.0.kt -> l1.kt
|
||||
added file: l1.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1.1.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1.2.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
class ClassA: AbstractClassA() {
|
||||
inline fun testPropertyWithGetter() = propertyWithGetter
|
||||
|
||||
inline fun testPropertyWithSetter(): String {
|
||||
propertyWithSetter = "test"
|
||||
return savedStr
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
fun box(stepId: Int): String {
|
||||
val a = ClassA()
|
||||
when (stepId) {
|
||||
0 -> {
|
||||
if (a.testPropertyWithGetter() != "0") return "Fail testPropertyWithGetter()"
|
||||
if (a.testPropertyWithSetter() != "test 0") return "Fail testPropertyWithSetter()"
|
||||
}
|
||||
1 -> {
|
||||
if (a.testPropertyWithGetter() != "1") return "Fail testPropertyWithGetter()"
|
||||
if (a.testPropertyWithSetter() != "test 0") return "Fail testPropertyWithSetter()"
|
||||
}
|
||||
2 -> {
|
||||
if (a.testPropertyWithGetter() != "1") return "Fail testPropertyWithGetter()"
|
||||
if (a.testPropertyWithSetter() != "test 2") return "Fail testPropertyWithSetter()"
|
||||
}
|
||||
else -> return "Unknown"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
added file: m.kt, classA.kt
|
||||
STEP 1..2:
|
||||
dependencies: lib1
|
||||
updated inline imports: m.kt, classA.kt
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
STEP 1..2:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
Reference in New Issue
Block a user