diff options
author | Eduardo Julian | 2018-04-15 02:24:27 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-04-15 02:24:27 -0400 |
commit | 6eb9cf17f161522d4eddf6783284952f8a84f099 (patch) | |
tree | 9158749544826d8d0940117ca5884fdd2f90c327 /new-luxc/source/luxc/lang/translation/r/eval.jvm.lux | |
parent | 0bba53ceb52502510e0f6ba4c53a951933532a61 (diff) |
- Fixes for R back-end.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/r/eval.jvm.lux | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux index c026750a7..5685ae05e 100644 --- a/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux @@ -81,7 +81,7 @@ (Long::intValue [])) (: Top (if (host.instance? Null flag) - host.null + (host.null) //.unit)) value]))) @@ -90,9 +90,14 @@ (do e.Monad<Error> [high (ListVector::get-field-sexp [//.int-high-field] host-object) low (ListVector::get-field-sexp [//.int-low-field] host-object) - #let [high (:! Nat (IntArrayVector::getElementAsInt [0] (:! IntArrayVector high))) - low (:! Nat (IntArrayVector::getElementAsInt [0] (:! IntArrayVector low)))]] - (wrap (|> high (bit.shift-left +32) (n/+ low) nat-to-int)))) + #let [get-int-32 (|>> (IntArrayVector::getElementAsInt [0]) (:! Nat)) + high (get-int-32 (:! IntArrayVector high)) + low (get-int-32 (:! IntArrayVector low))]] + (wrap (:! Int + (n/+ (|> high (bit.shift-left +32)) + (if (i/< 0 (:! Int low)) + (|> low (bit.shift-left +32) (bit.shift-right +32)) + low)))))) (def: (lux-object host-object) (-> Object (Error Top)) |