Fix bytecode tests after new optimizations
- Turn some const conditions into non-const conditions - Make sure inlined const values are used where required (otherwise they are eliminated by POP backward propagation)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
val nonConstFlag = true
|
||||
|
||||
inline fun <T, R> calc(value : T, fn: (T) -> R) : R = fn(value)
|
||||
|
||||
inline fun <T> identity(value : T) : T = calc(value) {
|
||||
if (1 == 1) return it
|
||||
if (nonConstFlag) return it
|
||||
it
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user