imasahiro/konohascript — Issue #13: Improve comparison with boolean value
Author: imasahiro
Created: 2012-01-01 07:21:36+00:00
State: open

Current version of IR compiler generate comparison with boolean value with boxing code.

`$ cat bool.k`

void main (String[] args) {
boolean t = true;
boolean f = false;
OUT.println(t == t);
}

`$ konohac bool.k`

def null Script.main ( konoha.Array aval1_0 ) {
BasicBlock0
bval2_0 = const konoha.Boolean true
bval3_0 = const konoha.Boolean false
ous8_0 = call konoha.OutputStream System.getOut ( ) @static
obj13_0 = box konoha.Object bval2_0
obj14_0 = box konoha.Object bval2_0
bval9_0 = call konoha.Boolean Object.== ( obj13_0 obj14_0 ) @nonstatic
obj9_0 = box konoha.Object bval9_0
_ = call null OutputStream.println ( ous8_0 obj9_0 ) @nonstatic
_ = return
}