(Un)mute and add tests for vararg codegen

This commit is contained in:
Steven Schäfer
2019-07-30 15:45:59 +02:00
committed by max-kammerer
parent d22814f6da
commit ac667403ef
10 changed files with 68 additions and 9 deletions
@@ -9,7 +9,7 @@ inline class UInt(val u: Int)
fun <T> takeVarargs(vararg e: T) {}
fun test(u1: UInt, u2: UInt, us: Array<UInt>) {
takeVarargs(*us) // copy + checkcast
takeVarargs(*us) // copy + checkcast (on non-ir backend)
takeVarargs(u1, u2, *us) // 2 box + ...
}
@@ -17,9 +17,13 @@ fun test(u1: UInt, u2: UInt, us: Array<UInt>) {
// 2 INVOKESTATIC UInt\.box
// 0 INVOKEVIRTUAL UInt.unbox
// 2 CHECKCAST \[LUInt
// 0 CHECKCAST \[Ljava/lang/Integer
// 0 intValue
// 0 valueOf
// 0 valueOf
// JVM_TEMPLATES
// 2 CHECKCAST \[LUInt
// JVM_IR_TEMPLATES
// 1 CHECKCAST \[LUInt