Optimize JVM byte code generation for conditional conjunction
Implement an intrinsic method for boolean.and operation, and replace ANDAND condition with a call to such intrinsic method.
This commit is contained in:
committed by
max-kammerer
parent
53493657ff
commit
4b99d85322
@@ -0,0 +1,18 @@
|
||||
var s = ""
|
||||
|
||||
fun o(): Boolean {
|
||||
s += "O"
|
||||
return false
|
||||
}
|
||||
|
||||
fun k(): Boolean {
|
||||
s += "K"
|
||||
return true
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val b = o() and k()
|
||||
if (b)
|
||||
return "fail: b should be false"
|
||||
return s
|
||||
}
|
||||
Reference in New Issue
Block a user