diff options
author | Eduardo Julian | 2018-08-16 21:39:04 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-16 21:39:04 -0400 |
commit | 46b1f5100b13daa4225ca8a156de7be58f3d8b0a (patch) | |
tree | 6514ed78424fafc5ea74a9add40e13999a353a25 /new-luxc | |
parent | e4c1b1645fa1a62a0bf8c90723eab7be634dd67f (diff) |
Various fixes.
Diffstat (limited to 'new-luxc')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux | 60 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux | 2 |
2 files changed, 31 insertions, 31 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux index d1826669a..b073aa3b7 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux @@ -149,9 +149,9 @@ Nullary (|>> <const> (_.wrap <type>)))] - [f64::smallest (_.double Double::MIN_VALUE) #$.Double] - [f64::min (_.double (f/* -1.0 Double::MAX_VALUE)) #$.Double] - [f64::max (_.double Double::MAX_VALUE) #$.Double] + [frac::smallest (_.double Double::MIN_VALUE) #$.Double] + [frac::min (_.double (f/* -1.0 Double::MAX_VALUE)) #$.Double] + [frac::max (_.double Double::MAX_VALUE) #$.Double] ) (do-template [<name> <type> <op>] @@ -168,11 +168,11 @@ [i64::/ #$.Long _.LDIV] [i64::% #$.Long _.LREM] - [f64::+ #$.Double _.DADD] - [f64::- #$.Double _.DSUB] - [f64::* #$.Double _.DMUL] - [f64::/ #$.Double _.DDIV] - [f64::% #$.Double _.DREM] + [frac::+ #$.Double _.DADD] + [frac::- #$.Double _.DSUB] + [frac::* #$.Double _.DMUL] + [frac::/ #$.Double _.DDIV] + [frac::% #$.Double _.DREM] ) (do-template [<eq> <lt> <unwrap> <cmp>] @@ -189,7 +189,7 @@ [<lt> -1])] [i64::= i64::< (_.unwrap #$.Long) _.LCMP] - [f64::= f64::< (_.unwrap #$.Double) _.DCMPG] + [frac::= frac::< (_.unwrap #$.Double) _.DCMPG] ) (do-template [<name> <prepare> <transform>] @@ -197,14 +197,14 @@ Unary (|>> inputI <prepare> <transform>))] - [i64::to-f64 (_.unwrap #$.Long) (<| (_.wrap #$.Double) _.L2D)] + [i64::to-frac (_.unwrap #$.Long) (<| (_.wrap #$.Double) _.L2D)] [i64::char (_.unwrap #$.Long) ((|>> _.L2I _.I2C (_.INVOKESTATIC "java.lang.Character" "toString" (_t.method (list _t.char) (#.Some $String) (list)) #0)))] - [f64::to-i64 (_.unwrap #$.Double) (<| (_.wrap #$.Long) _.D2L)] - [f64::encode (_.unwrap #$.Double) + [frac::to-i64 (_.unwrap #$.Double) (<| (_.wrap #$.Long) _.D2L)] + [frac::encode (_.unwrap #$.Double) (_.INVOKESTATIC "java.lang.Double" "toString" (_t.method (list _t.double) (#.Some $String) (list)) #0)] - [f64::decode ..check-stringI + [frac::decode ..check-stringI (_.INVOKESTATIC ///.runtime-class "decode_frac" (_t.method (list $String) (#.Some $Object-Array) (list)) #0)] ) @@ -329,26 +329,26 @@ (bundle.install "/" (binary i64::/)) (bundle.install "%" (binary i64::%)) (bundle.install "<" (binary i64::<)) - (bundle.install "to-f64" (unary i64::to-f64)) + (bundle.install "to-frac" (unary i64::to-frac)) (bundle.install "char" (unary i64::char))))) -(def: bundle::f64 +(def: bundle::frac Bundle - (<| (bundle.prefix "f64") + (<| (bundle.prefix "frac") (|> (: Bundle bundle.empty) - (bundle.install "+" (binary f64::+)) - (bundle.install "-" (binary f64::-)) - (bundle.install "*" (binary f64::*)) - (bundle.install "/" (binary f64::/)) - (bundle.install "%" (binary f64::%)) - (bundle.install "=" (binary f64::=)) - (bundle.install "<" (binary f64::<)) - (bundle.install "smallest" (nullary f64::smallest)) - (bundle.install "min" (nullary f64::min)) - (bundle.install "max" (nullary f64::max)) - (bundle.install "to-i64" (unary f64::to-i64)) - (bundle.install "encode" (unary f64::encode)) - (bundle.install "decode" (unary f64::decode))))) + (bundle.install "+" (binary frac::+)) + (bundle.install "-" (binary frac::-)) + (bundle.install "*" (binary frac::*)) + (bundle.install "/" (binary frac::/)) + (bundle.install "%" (binary frac::%)) + (bundle.install "=" (binary frac::=)) + (bundle.install "<" (binary frac::<)) + (bundle.install "smallest" (nullary frac::smallest)) + (bundle.install "min" (nullary frac::min)) + (bundle.install "max" (nullary frac::max)) + (bundle.install "to-i64" (unary frac::to-i64)) + (bundle.install "encode" (unary frac::encode)) + (bundle.install "decode" (unary frac::decode))))) (def: bundle::text Bundle @@ -377,6 +377,6 @@ (|> bundle::lux (dictionary.merge bundle::i64) (dictionary.merge bundle::int) - (dictionary.merge bundle::f64) + (dictionary.merge bundle::frac) (dictionary.merge bundle::text) (dictionary.merge bundle::io)))) diff --git a/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux index 2268b3ba2..9d1d8134f 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux @@ -22,7 +22,7 @@ (do-template [<name> <prefix>] [(def: #export (<name> idx) (-> Nat Text) - (|> idx .int %i (format <prefix>)))] + (|> idx %n (format <prefix>)))] [foreign-name "f"] [partial-name "p"] |