diff options
author | Eduardo Julian | 2018-06-15 00:11:33 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-06-15 00:11:33 -0400 |
commit | bcd3d9ee8f6797f758a2abea98d5cb6a74cc7df0 (patch) | |
tree | b122b9ecf2d5333ba97cffbadfeee00eba2e1cf8 /new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux | |
parent | 0190e084c6f44be32ea2bc5a89ef55b52bdc789b (diff) |
- WIP: Adjustments to new-luxc based on recent changes to stdlib.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux index 270fa510d..305f46adf 100644 --- a/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux @@ -13,21 +13,21 @@ (-> Bool (Meta Expression)) (|>> %b meta/wrap)) -(def: low-mask Nat (n/dec (bit.left-shift +32 +1))) +(def: low-mask Nat (dec (bit.left-shift +32 +1))) (def: #export (translate-nat value) (-> Nat (Meta Expression)) (let [high (|> value (bit.logical-right-shift +32) - nat-to-int %i) + .int %i) low (|> value (bit.and low-mask) - nat-to-int %i)] + .int %i)] (meta/wrap (format runtimeT.int//new "(" high "," low ")")))) (def: #export translate-int (-> Int (Meta Expression)) - (|>> int-to-nat translate-nat)) + (|>> .nat translate-nat)) (def: deg-to-nat (-> Deg Nat) |