diff options
Diffstat (limited to 'stdlib/source/lux/compiler/default/phase/translation/scheme/runtime.jvm.lux')
-rw-r--r-- | stdlib/source/lux/compiler/default/phase/translation/scheme/runtime.jvm.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/lux/compiler/default/phase/translation/scheme/runtime.jvm.lux b/stdlib/source/lux/compiler/default/phase/translation/scheme/runtime.jvm.lux index a2c9e31da..d72312693 100644 --- a/stdlib/source/lux/compiler/default/phase/translation/scheme/runtime.jvm.lux +++ b/stdlib/source/lux/compiler/default/phase/translation/scheme/runtime.jvm.lux @@ -114,14 +114,14 @@ (runtime: (slice offset length list) (<| (_.if (_.null?/1 list) list) - (_.if (|> offset (_.>/2 (_.int 0))) - (slice (|> offset (_.-/2 (_.int 1))) + (_.if (|> offset (_.>/2 (_.int +0))) + (slice (|> offset (_.-/2 (_.int +1))) length (_.cdr/1 list))) - (_.if (|> length (_.>/2 (_.int 0))) + (_.if (|> length (_.>/2 (_.int +0))) (_.cons/2 (_.car/1 list) (slice offset - (|> length (_.-/2 (_.int 1))) + (|> length (_.-/2 (_.int +1))) (_.cdr/1 list)))) _.nil)) @@ -157,7 +157,7 @@ (def: minimum-index-length (-> Expression Computation) - (|>> (_.+/2 (_.int 1)))) + (|>> (_.+/2 (_.int +1)))) (def: product-element (-> Expression Expression Computation) @@ -165,7 +165,7 @@ (def: (product-tail product) (-> Expression Computation) - (_.vector-ref/2 product (|> (_.length/1 product) (_.-/2 (_.int 1))))) + (_.vector-ref/2 product (|> (_.length/1 product) (_.-/2 (_.int +1))))) (def: (updated-index min-length product) (-> Expression Expression Computation) @@ -202,7 +202,7 @@ (_.begin (list (_.define @slice [(list) #.None] (_.make-vector/1 (|> @product_length (_.-/2 index)))) - (_.vector-copy!/5 @slice (_.int 0) product index @product_length) + (_.vector-copy!/5 @slice (_.int +0) product index @product_length) @slice))))))) (runtime: (sum//get sum last? wanted-tag) @@ -235,11 +235,11 @@ @@sum//get))) (runtime: (bit//logical-right-shift shift input) - (_.if (_.=/2 (_.int 0) shift) + (_.if (_.=/2 (_.int +0) shift) input (|> input (_.arithmetic-shift/2 (_.*/2 (_.int -1) shift)) - (_.bit-and/2 (_.int (hex "7FFFFFFFFFFFFFFF")))))) + (_.bit-and/2 (_.int (hex "+7FFFFFFFFFFFFFFF")))))) (def: runtime//bit Computation @@ -286,10 +286,10 @@ (runtime: (atom//compare-and-swap atom old new) (with-vars [@temp] - (_.let (list [@temp (_.vector-ref/2 atom (_.int 0))]) + (_.let (list [@temp (_.vector-ref/2 atom (_.int +0))]) (_.if (_.eq?/2 old @temp) (_.begin - (list (_.vector-set!/3 atom (_.int 0) new) + (list (_.vector-set!/3 atom (_.int +0) new) (_.bool #1))) (_.bool #0))))) @@ -300,7 +300,7 @@ (runtime: (box//write value box) (_.begin (list - (_.vector-set!/3 box (_.int 0) value) + (_.vector-set!/3 box (_.int +0) value) ..unit))) (def: runtime//box @@ -309,7 +309,7 @@ (runtime: (io//current-time _) (|> (_.apply/* (_.global "current-second") (list)) - (_.*/2 (_.int 1_000)) + (_.*/2 (_.int +1_000)) _.exact/1)) (def: runtime//io @@ -334,7 +334,7 @@ (_.set! process//incoming (_.cons/2 process process//incoming)))] (_.begin (list - (_.if (_.=/2 (_.int 0) milli-seconds) + (_.if (_.=/2 (_.int +0) milli-seconds) (process//future procedure) (with-vars [@start @process @now @ignored] (_.let (list [@start (io//current-time ..unit)]) |