[JS IR] Take into account the declaration annotations in IC hash

So the annotation modifications invalidate the caller.
This commit is contained in:
Alexander Korepanov
2022-12-02 18:47:34 +01:00
committed by Space Team
parent 0a35d84193
commit d21cbfe02e
14 changed files with 91 additions and 19 deletions
@@ -0,0 +1,3 @@
class MyClassA {
inline fun foo() = 42
}
@@ -0,0 +1,4 @@
@JsExport
class MyClassA {
inline fun foo() = 42
}
@@ -0,0 +1,5 @@
@JsExport
class MyClassA {
@JsName("bar")
inline fun foo() = 42
}
@@ -0,0 +1,5 @@
@JsExport
class MyClassA {
@JsName("baz")
inline fun foo() = 42
}
@@ -0,0 +1,5 @@
@JsExport
class MyClassA {
@JsName("baz")
inline fun foo() = 33
}
@@ -0,0 +1,20 @@
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
STEP 3:
modifications:
U : l1.3.kt -> l1.kt
modified ir: l1.kt
STEP 4:
modifications:
U : l1.4.kt -> l1.kt
modified ir: l1.kt
@@ -0,0 +1,8 @@
fun box(stepId: Int): String {
when (stepId) {
0, 1, 2, 3 -> if (MyClassA().foo() != 42) return "Fail"
4 -> if (MyClassA().foo() != 33) return "Fail"
else -> return "Unknown"
}
return "OK"
}
@@ -0,0 +1,6 @@
STEP 0:
dependencies: lib1
added file: m.kt
STEP 1..4:
dependencies: lib1
updated imports: m.kt
@@ -0,0 +1,5 @@
MODULES: lib1, main
STEP 0..4:
libs: lib1, main
dirty js: lib1, main