From bcd3d9ee8f6797f758a2abea98d5cb6a74cc7df0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 15 Jun 2018 00:11:33 -0400 Subject: - WIP: Adjustments to new-luxc based on recent changes to stdlib. --- new-luxc/source/luxc/lang/translation/js.lux | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/js.lux') diff --git a/new-luxc/source/luxc/lang/translation/js.lux b/new-luxc/source/luxc/lang/translation/js.lux index edca93d10..d38409b10 100644 --- a/new-luxc/source/luxc/lang/translation/js.lux +++ b/new-luxc/source/luxc/lang/translation/js.lux @@ -104,14 +104,14 @@ (function (_ compiler) (let [old (:! Host (get@ #.host compiler)) [old-name old-sub] (get@ #context old) - new-name (format old-name "$" (%i (nat-to-int old-sub)))] + new-name (format old-name "$" (%i (.int old-sub)))] (case (expr (set@ #.host (:! Nothing (set@ #context [new-name +0] old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host (|>> (:! Host) - (set@ #context [old-name (n/inc old-sub)]) + (set@ #context [old-name (inc old-sub)]) (:! Nothing)) compiler') [new-name output]]) @@ -206,7 +206,7 @@ (:! Object (js-object (Arrays::copyOfRange [value (|> args (array.read +0) maybe.assume (:! Int)) - (nat-to-int (array.size value))])))) + (.int (array.size value))])))) )) (def: #export int-high-field Text "H") @@ -222,7 +222,7 @@ (def: low-mask Nat - (|> +1 (bit.left-shift +32) n/dec)) + (|> +1 (bit.left-shift +32) dec)) (def: #export high (-> Nat Nat) (bit.logical-right-shift +32)) (def: #export low (-> Nat Nat) (bit.and low-mask)) @@ -241,10 +241,10 @@ (:! Long value)) (AbstractJSObject (getMember [member String]) Object (cond (text/= int-high-field member) - (|> value int-to-nat high jvm-int) + (|> value .nat high jvm-int) (text/= int-low-field member) - (|> value int-to-nat low jvm-int) + (|> value .nat low jvm-int) ## else (error! (ex.construct Unknown-Member -- cgit v1.2.3