diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/target/jvm/bytecode.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/lux/target/jvm/bytecode.lux b/stdlib/source/lux/target/jvm/bytecode.lux index 503970d6a..551b51087 100644 --- a/stdlib/source/lux/target/jvm/bytecode.lux +++ b/stdlib/source/lux/target/jvm/bytecode.lux @@ -154,7 +154,7 @@ (def: #export monad (Monad Bytecode) - (<| (:coerce (Monad Bytecode)) + (<| (:as (Monad Bytecode)) (writer.with ..relative_monoid) (: (Monad (State' Try [Pool Environment Tracker]))) state.with @@ -508,17 +508,17 @@ (-> java/lang/Float Int) (|>> java/lang/Float::floatToRawIntBits ffi.int_to_long - (:coerce Int))) + (:as Int))) (def: negative_zero_float_bits - (|> -0.0 (:coerce java/lang/Double) ffi.double_to_float ..float_bits)) + (|> -0.0 (:as java/lang/Double) ffi.double_to_float ..float_bits)) (def: #export (float value) (-> java/lang/Float (Bytecode Any)) (if (i.= ..negative_zero_float_bits (..float_bits value)) (..arbitrary_float value) - (case (|> value ffi.float_to_double (:coerce Frac)) + (case (|> value ffi.float_to_double (:as Frac)) (^template [<special> <instruction>] [<special> (..bytecode $0 $1 @_ <instruction> [])]) ([+0.0 _.fconst_0] @@ -548,23 +548,23 @@ (def: (arbitrary_double value) (-> java/lang/Double (Bytecode Any)) (do ..monad - [index (..lift (//constant/pool.double (//constant.double (:coerce Frac value))))] + [index (..lift (//constant/pool.double (//constant.double (:as Frac value))))] (..bytecode $0 $2 @_ _.ldc2_w/double [index]))) (def: double_bits (-> java/lang/Double Int) (|>> java/lang/Double::doubleToRawLongBits - (:coerce Int))) + (:as Int))) (def: negative_zero_double_bits - (..double_bits (:coerce java/lang/Double -0.0))) + (..double_bits (:as java/lang/Double -0.0))) (def: #export (double value) (-> java/lang/Double (Bytecode Any)) (if (i.= ..negative_zero_double_bits (..double_bits value)) (..arbitrary_double value) - (case (:coerce Frac value) + (case (:as Frac value) (^template [<special> <instruction>] [<special> (..bytecode $0 $2 @_ <instruction> [])]) ([+0.0 _.dconst_0] |