diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/procedure')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux | 16 |
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]) |