mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Implement constant folding in the IR backend for JVM
The newly added pass folds the set of constant functions of the current backend, plus IrBuiltIns.
This commit is contained in:
committed by
max-kammerer
parent
7e4d33be24
commit
79fcaae991
14
compiler/testData/codegen/bytecodeText/stringOperations/primitiveToStringNotOptimizable.kt
vendored
Normal file
14
compiler/testData/codegen/bytecodeText/stringOperations/primitiveToStringNotOptimizable.kt
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
fun main(a: Boolean, b:Byte, c: Short, d: Int, e: Long, f: Float, g: Double, h: Char) {
|
||||
a.toString()
|
||||
b.toString()
|
||||
c.toString()
|
||||
d.toString()
|
||||
e.toString()
|
||||
f.toString()
|
||||
g.toString()
|
||||
h.toString()
|
||||
}
|
||||
|
||||
/*Check that all "valueOf" are String ones and there is no boxing*/
|
||||
// 8 valueOf
|
||||
// 8 INVOKESTATIC java/lang/String.valueOf
|
||||
Reference in New Issue
Block a user