aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm/procedure
diff options
context:
space:
mode:
authorEduardo Julian2018-07-13 22:01:32 -0400
committerEduardo Julian2018-07-13 22:01:32 -0400
commit69fefab57c40f323d759dc444dbcebad15071585 (patch)
treedb08a3ea37c7818c8a98fc995d3c19440141b700 /new-luxc/source/luxc/lang/translation/jvm/procedure
parent6acf4ffc362c0f8ef77d96f8cfe991adb2d9a0eb (diff)
Re-named "Bool" type to "Bit".
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/procedure')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux16
1 files changed, 10 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
index f6a0069f5..45cb67fb9 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
@@ -155,6 +155,10 @@
[double//% $i.DREM #$.Double #$.Double #$.Double]
)
+(def: boolean-class ($t.class "java.lang.Boolean" (list)))
+(def: falseI ($i.GETSTATIC "java.lang.Boolean" "FALSE" boolean-class))
+(def: trueI ($i.GETSTATIC "java.lang.Boolean" "TRUE" boolean-class))
+
(do-template [<name> <op> <unwrapX> <unwrapY> <wrap>]
[(def: (<name> [xI yI])
@.Binary
@@ -163,10 +167,10 @@
(|>> xI ($i.unwrap <unwrapX>)
yI ($i.unwrap <unwrapY>)
(<op> @then)
- ($i.GETSTATIC "java.lang.Boolean" "FALSE" ($t.class "java.lang.Boolean" (list)))
+ falseI
($i.GOTO @end)
($i.label @then)
- ($i.GETSTATIC "java.lang.Boolean" "TRUE" ($t.class "java.lang.Boolean" (list)))
+ trueI
($i.label @end))))]
[int//= $i.IF_ICMPEQ #$.Int #$.Int #$.Boolean]
@@ -186,10 +190,10 @@
<op>
($i.int <reference>)
($i.IF_ICMPEQ @then)
- ($i.GETSTATIC "java.lang.Boolean" "FALSE" ($t.class "java.lang.Boolean" (list)))
+ falseI
($i.GOTO @end)
($i.label @then)
- ($i.GETSTATIC "java.lang.Boolean" "TRUE" ($t.class "java.lang.Boolean" (list)))
+ trueI
($i.label @end))))]
[long//= $i.LCMP 0 #$.Long #$.Long #$.Boolean]
@@ -380,10 +384,10 @@
$i.with-label (function (_ @end))
(|>> objectI
($i.IFNULL @then)
- ($i.GETSTATIC "java.lang.Boolean" "FALSE" ($t.class "java.lang.Boolean" (list)))
+ falseI
($i.GOTO @end)
($i.label @then)
- ($i.GETSTATIC "java.lang.Boolean" "TRUE" ($t.class "java.lang.Boolean" (list)))
+ trueI
($i.label @end))))
(def: (object//synchronized [monitorI exprI])