aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/generator/procedure/common.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-07-03 18:15:24 -0400
committerEduardo Julian2017-07-03 18:15:24 -0400
commit65c182755954f64fd112284a5336ba05547a4283 (patch)
tree88ceff9a934883981660a53ca6002029522e0cc6 /new-luxc/source/luxc/generator/procedure/common.jvm.lux
parenta7cb1e8d06e62c710c3cdfc4b225e8b4a8c26205 (diff)
- Tested the compilation for "nat" procedures.
- Expanded the runtime. - Some bug-fixes and refactorings.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/generator/procedure/common.jvm.lux12
1 files changed, 6 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/generator/procedure/common.jvm.lux b/new-luxc/source/luxc/generator/procedure/common.jvm.lux
index 957a2efa4..fcfba7682 100644
--- a/new-luxc/source/luxc/generator/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/generator/procedure/common.jvm.lux
@@ -172,7 +172,7 @@
(def: (bit//count inputI)
Unary
- (|>. inputI
+ (|>. inputI $i;unwrap-long
($i;INVOKESTATIC "java.lang.Long" "bitCount" ($t;method (list $t;long) (#;Some $t;int) (list)) false)
lux-intI))
@@ -231,7 +231,7 @@
(def: deg-method $;Method nat-method)
-(def: compare-unsigned-method
+(def: compare-nat-method
$;Method
($t;method (list $t;long $t;long) (#;Some $t;int) (list)))
@@ -305,8 +305,8 @@
($i;int <reference>)
(predicateI $i;IF_ICMPEQ)))]
- [nat//eq 0 $i;unwrap-long ($i;INVOKESTATIC &runtime;runtime-name "compareUnsigned" compare-unsigned-method false)]
- [nat//lt -1 $i;unwrap-long ($i;INVOKESTATIC &runtime;runtime-name "compareUnsigned" compare-unsigned-method false)]
+ [nat//eq 0 $i;unwrap-long ($i;INVOKESTATIC &runtime;runtime-name "compare_nat" compare-nat-method false)]
+ [nat//lt -1 $i;unwrap-long ($i;INVOKESTATIC &runtime;runtime-name "compare_nat" compare-nat-method false)]
[int//eq 0 $i;unwrap-long $i;LCMP]
[int//lt -1 $i;unwrap-long $i;LCMP]
@@ -314,8 +314,8 @@
[real//eq 0 $i;unwrap-double $i;DCMPG]
[real//lt -1 $i;unwrap-double $i;DCMPG]
- [deg//eq 0 $i;unwrap-long ($i;INVOKESTATIC &runtime;runtime-name "compareUnsigned" compare-unsigned-method false)]
- [deg//lt -1 $i;unwrap-long ($i;INVOKESTATIC &runtime;runtime-name "compareUnsigned" compare-unsigned-method false)]
+ [deg//eq 0 $i;unwrap-long ($i;INVOKESTATIC &runtime;runtime-name "compare_nat" compare-nat-method false)]
+ [deg//lt -1 $i;unwrap-long ($i;INVOKESTATIC &runtime;runtime-name "compare_nat" compare-nat-method false)]
)
(do-template [<name> <prepare> <transform>]