Revert "JVM IR: Implement CHECK_NOT_NULL as a lowering"
This reverts commit dcd72b06d8.
Using a temporary variable has an effect on casts and GC.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// NB '!!' uses Intrinsics.throwNpe/checkNotNull
|
||||
// NB '!!' uses Intrinsics.throwNpe/checkNotNull, but IR follows it with ATHROW
|
||||
// while the old backend returns null from `exit`
|
||||
inline fun exit(): Nothing = null!!
|
||||
|
||||
fun box(): String {
|
||||
@@ -13,4 +14,7 @@ fun box(): String {
|
||||
return a
|
||||
}
|
||||
|
||||
// JVM_TEMPLATES
|
||||
// 1 ATHROW
|
||||
// JVM_IR_TEMPLATES
|
||||
// 2 ATHROW
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// NB '!!' uses Intrinsics.throwNpe/checkNotNull, but IR follows it with ATHROW
|
||||
// while the old backend returns null from `exit`
|
||||
inline fun exit(): Nothing = null!!
|
||||
inline fun exita(): Nothing = exit() // ATHROW
|
||||
inline fun exitb(): Nothing = exita() // ATHROW
|
||||
@@ -14,4 +16,7 @@ fun box(): String {
|
||||
return a
|
||||
}
|
||||
|
||||
// 4 ATHROW
|
||||
// JVM_TEMPLATES
|
||||
// 4 ATHROW
|
||||
// JVM_IR_TEMPLATES
|
||||
// 5 ATHROW
|
||||
|
||||
Reference in New Issue
Block a user