Don't generate default arguments for inline call

This commit is contained in:
Mikhael Bogdanov
2017-04-27 15:38:11 +02:00
parent 7690a8bc3e
commit a7c9e14805
13 changed files with 81 additions and 62 deletions
@@ -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
@@ -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