Skip to content
Snippets Groups Projects
Commit b913f3ca authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Fix code-gen for Chars

parent e8e1b598
No related branches found
No related tags found
No related merge requests found
...@@ -978,7 +978,7 @@ trait CodeGeneration { ...@@ -978,7 +978,7 @@ trait CodeGeneration {
mkExpr(l, ch) mkExpr(l, ch)
mkExpr(r, ch) mkExpr(r, ch)
l.getType match { l.getType match {
case Int32Type => case Int32Type | CharType =>
ch << If_ICmpLt(thenn) << Goto(elze) ch << If_ICmpLt(thenn) << Goto(elze)
case IntegerType => case IntegerType =>
ch << InvokeVirtual(BigIntClass, "lessThan", s"(L$BigIntClass;)Z") ch << InvokeVirtual(BigIntClass, "lessThan", s"(L$BigIntClass;)Z")
...@@ -989,7 +989,7 @@ trait CodeGeneration { ...@@ -989,7 +989,7 @@ trait CodeGeneration {
mkExpr(l, ch) mkExpr(l, ch)
mkExpr(r, ch) mkExpr(r, ch)
l.getType match { l.getType match {
case Int32Type => case Int32Type | CharType =>
ch << If_ICmpGt(thenn) << Goto(elze) ch << If_ICmpGt(thenn) << Goto(elze)
case IntegerType => case IntegerType =>
ch << InvokeVirtual(BigIntClass, "greaterThan", s"(L$BigIntClass;)Z") ch << InvokeVirtual(BigIntClass, "greaterThan", s"(L$BigIntClass;)Z")
...@@ -1000,7 +1000,7 @@ trait CodeGeneration { ...@@ -1000,7 +1000,7 @@ trait CodeGeneration {
mkExpr(l, ch) mkExpr(l, ch)
mkExpr(r, ch) mkExpr(r, ch)
l.getType match { l.getType match {
case Int32Type => case Int32Type | CharType =>
ch << If_ICmpLe(thenn) << Goto(elze) ch << If_ICmpLe(thenn) << Goto(elze)
case IntegerType => case IntegerType =>
ch << InvokeVirtual(BigIntClass, "lessEquals", s"(L$BigIntClass;)Z") ch << InvokeVirtual(BigIntClass, "lessEquals", s"(L$BigIntClass;)Z")
...@@ -1011,7 +1011,7 @@ trait CodeGeneration { ...@@ -1011,7 +1011,7 @@ trait CodeGeneration {
mkExpr(l, ch) mkExpr(l, ch)
mkExpr(r, ch) mkExpr(r, ch)
l.getType match { l.getType match {
case Int32Type => case Int32Type | CharType =>
ch << If_ICmpGe(thenn) << Goto(elze) ch << If_ICmpGe(thenn) << Goto(elze)
case IntegerType => case IntegerType =>
ch << InvokeVirtual(BigIntClass, "greaterEquals", s"(L$BigIntClass;)Z") ch << InvokeVirtual(BigIntClass, "greaterEquals", s"(L$BigIntClass;)Z")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment