From 65c182755954f64fd112284a5336ba05547a4283 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 3 Jul 2017 18:15:24 -0400 Subject: - Tested the compilation for "nat" procedures. - Expanded the runtime. - Some bug-fixes and refactorings. --- new-luxc/source/luxc/generator/procedure/common.jvm.lux | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'new-luxc/source/luxc/generator/procedure/common.jvm.lux') 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 ) (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 [ ] -- cgit v1.2.3