JVM IR: Avoid redundant coercions in ExpressionCodegen
This commit is contained in:
committed by
Dmitry Petrov
parent
2b2ae8a5f1
commit
5760c0be9c
@@ -12,6 +12,6 @@ fun f() {
|
||||
// 1 LOCALVARIABLE c C L3 L\d+ 0
|
||||
|
||||
// JVM_IR_TEMPLATES
|
||||
// 1 ISTORE 2\s+L5
|
||||
// 1 ISTORE 2\s+L4
|
||||
// 1 ILOAD 2\s+INVOKEVIRTUAL java/io/PrintStream.print \(C\)V
|
||||
// 1 LOCALVARIABLE c C L5 L\d+ 2
|
||||
// 1 LOCALVARIABLE c C L4 L\d+ 2
|
||||
Vendored
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
// FILE: utils.kt
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
// FILE: utils.kt
|
||||
|
||||
|
||||
compiler/testData/codegen/bytecodeText/inlineClasses/passInlineClassesWithSpreadOperatorToVarargs.kt
Vendored
+2
-2
@@ -10,7 +10,7 @@ fun <T> takeVarargs(vararg e: T) {}
|
||||
|
||||
fun test(u1: UInt, u2: UInt, us: Array<UInt>) {
|
||||
takeVarargs(*us) // copy + checkcast (on non-ir backend)
|
||||
takeVarargs(u1, u2, *us) // 2 box + ...
|
||||
takeVarargs(u1, u2, *us) // 2 box + checkcast (on non-ir backend)
|
||||
}
|
||||
|
||||
// @TestKt.class:
|
||||
@@ -26,4 +26,4 @@ fun test(u1: UInt, u2: UInt, us: Array<UInt>) {
|
||||
// 2 CHECKCAST \[LUInt
|
||||
|
||||
// JVM_IR_TEMPLATES
|
||||
// 1 CHECKCAST \[LUInt
|
||||
// 0 CHECKCAST \[LUInt
|
||||
|
||||
Vendored
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
// FILE: utils.kt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user