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/eval.jvm.lux | |
parent | 0190e084c6f44be32ea2bc5a89ef55b52bdc789b (diff) |
- WIP: Adjustments to new-luxc based on recent changes to stdlib.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js/eval.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/js/eval.jvm.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux index 04121b944..94136f356 100644 --- a/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux @@ -64,10 +64,10 @@ [[(Number::longValue [] (:! Number high)) (Number::longValue [] (:! Number low))] [high low]]) - (#.Some (nat-to-int (n/+ (|> high (:! Nat) (bit.left-shift +32)) - (if (i/< 0 (:! Int low)) - (|> low (:! Nat) (bit.left-shift +32) (bit.logical-right-shift +32)) - (|> low (:! Nat)))))) + (#.Some (.int (n/+ (|> high (:! Nat) (bit.left-shift +32)) + (if (i/< 0 (:! Int low)) + (|> low (:! Nat) (bit.left-shift +32) (bit.logical-right-shift +32)) + (|> low (:! Nat)))))) _ #.None)) @@ -90,24 +90,24 @@ (def: (array lux-object js-object) (-> (-> Object (Error Any)) ScriptObjectMirror (Maybe (Array Object))) (if (JSObject::isArray [] js-object) - (let [init-num-keys (int-to-nat (ScriptObjectMirror::size [] js-object))] + (let [init-num-keys (.nat (ScriptObjectMirror::size [] js-object))] (loop [num-keys init-num-keys idx +0 output (: (Array Object) (array.new init-num-keys))] (if (n/< num-keys idx) - (let [idx-key (|> idx nat-to-int %i)] + (let [idx-key (|> idx .int %i)] (case (JSObject::getMember idx-key js-object) (#.Some member) (case (lux-object member) (#e.Success parsed-member) - (recur num-keys (n/inc idx) (array.write idx (:! Object parsed-member) output)) + (recur num-keys (inc idx) (array.write idx (:! Object parsed-member) output)) (#e.Error error) #.None) #.None - (recur num-keys (n/inc idx) output))) + (recur num-keys (inc idx) output))) (#.Some output)))) #.None)) |