Don't generate default arguments for inline call
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
inline fun test(p: String = "OK"): String {
|
||||
return p
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
return test()
|
||||
}
|
||||
|
||||
//mask check in test$default
|
||||
// 1 IFEQ
|
||||
|
||||
//total ifs
|
||||
// 1 IF
|
||||
|
||||
//no default argument on call site
|
||||
// 0 NULL
|
||||
|
||||
//proper variable start label: after assignment
|
||||
// 1 LOCALVARIABLE p\$iv Ljava/lang/String; L2 L3 0
|
||||
// 1 LDC "OK"\s*ASTORE 0\s*L2
|
||||
@@ -1,11 +0,0 @@
|
||||
inline fun test(p: String = "OK"): String {
|
||||
return p
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
return test()
|
||||
}
|
||||
|
||||
//mask check in test$default
|
||||
// 1 IFEQ
|
||||
// 1 IF
|
||||
+2
@@ -1,3 +1,4 @@
|
||||
//open modality to method handle check generation
|
||||
open class A {
|
||||
inline fun test(p: String = "OK"): String {
|
||||
return p
|
||||
@@ -12,4 +13,5 @@ fun box(): String {
|
||||
// 1 IFNULL
|
||||
//mask check in test$default
|
||||
// 1 IFEQ
|
||||
//total ifs
|
||||
// 2 IF
|
||||
Reference in New Issue
Block a user