diff options
author | Eduardo Julian | 2022-01-10 16:41:27 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-01-10 16:41:27 -0400 |
commit | 0613deddeb934b523dd59ef0a2c6303716883a0c (patch) | |
tree | 41e89c8a041fdaef5c8fc3ad8153f553d064d863 /lux-jvm/source/luxc/lang/translation | |
parent | b7873d4b68ffc041f9ff134c52a32b54c20febf9 (diff) |
Fixes for the pure-Lux JVM compiler machinery. [Part 5]
Diffstat (limited to 'lux-jvm/source/luxc/lang/translation')
3 files changed, 15 insertions, 21 deletions
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux index 888a7a5a5..20f3fdf7a 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux @@ -54,11 +54,6 @@ {try.#Failure error} (phase.except extension.invalid_syntax [extension_name %synthesis input])))) -(import: java/lang/Double - ["[1]::[0]" - ("static" MIN_VALUE java/lang/Double) - ("static" MAX_VALUE java/lang/Double)]) - (def: $String (type.class "java.lang.String" (list))) (def: $CharSequence (type.class "java.lang.CharSequence" (list))) (def: $System (type.class "java.lang.System" (list))) @@ -160,16 +155,6 @@ [i64::right_shift _.LUSHR] ) -(template [<name> <const> <type>] - [(def: (<name> _) - (Nullary Inst) - (|>> <const> (_.wrap <type>)))] - - [f64::smallest (_.double (java/lang/Double::MIN_VALUE)) type.double] - [f64::min (_.double (f.* -1.0 (java/lang/Double::MAX_VALUE))) type.double] - [f64::max (_.double (java/lang/Double::MAX_VALUE)) type.double] - ) - (template [<name> <type> <op>] [(def: (<name> [paramI subjectI]) (Binary Inst) @@ -341,9 +326,6 @@ (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 "i64" (unary f64::i64)) (bundle.install "encode" (unary f64::encode)) (bundle.install "decode" (unary f64::decode))))) diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux index 17165b434..dc806c8d0 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux @@ -130,26 +130,32 @@ [_.D2F conversion::double_to_float] [_.D2I conversion::double_to_int] [_.D2L conversion::double_to_long] + [_.F2D conversion::float_to_double] [_.F2I conversion::float_to_int] [_.F2L conversion::float_to_long] + [_.I2B conversion::int_to_byte] [_.I2C conversion::int_to_char] [_.I2D conversion::int_to_double] [_.I2F conversion::int_to_float] [_.I2L conversion::int_to_long] [_.I2S conversion::int_to_short] + [_.L2D conversion::long_to_double] [_.L2F conversion::long_to_float] [_.L2I conversion::long_to_int] [..L2S conversion::long_to_short] [..L2B conversion::long_to_byte] [..L2C conversion::long_to_char] + [_.I2B conversion::char_to_byte] [_.I2S conversion::char_to_short] [_.NOP conversion::char_to_int] [_.I2L conversion::char_to_long] + [_.I2L conversion::byte_to_long] + [_.I2L conversion::short_to_long] ) @@ -160,33 +166,39 @@ (bundle.install "double-to-float" (unary conversion::double_to_float)) (bundle.install "double-to-int" (unary conversion::double_to_int)) (bundle.install "double-to-long" (unary conversion::double_to_long)) + (bundle.install "float-to-double" (unary conversion::float_to_double)) (bundle.install "float-to-int" (unary conversion::float_to_int)) (bundle.install "float-to-long" (unary conversion::float_to_long)) + (bundle.install "int-to-byte" (unary conversion::int_to_byte)) (bundle.install "int-to-char" (unary conversion::int_to_char)) (bundle.install "int-to-double" (unary conversion::int_to_double)) (bundle.install "int-to-float" (unary conversion::int_to_float)) (bundle.install "int-to-long" (unary conversion::int_to_long)) (bundle.install "int-to-short" (unary conversion::int_to_short)) + (bundle.install "long-to-double" (unary conversion::long_to_double)) (bundle.install "long-to-float" (unary conversion::long_to_float)) (bundle.install "long-to-int" (unary conversion::long_to_int)) (bundle.install "long-to-short" (unary conversion::long_to_short)) (bundle.install "long-to-byte" (unary conversion::long_to_byte)) (bundle.install "long-to-char" (unary conversion::long_to_char)) + (bundle.install "char-to-byte" (unary conversion::char_to_byte)) (bundle.install "char-to-short" (unary conversion::char_to_short)) (bundle.install "char-to-int" (unary conversion::char_to_int)) (bundle.install "char-to-long" (unary conversion::char_to_long)) + (bundle.install "byte-to-long" (unary conversion::byte_to_long)) + (bundle.install "short-to-long" (unary conversion::short_to_long)) ))) (template [<name> <op>] - [(def: (<name> [parameterI subject1]) + [(def: (<name> [parameterI subjectI]) (Binary Inst) - (|>> subject1 + (|>> subjectI parameterI <op>))] diff --git a/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux b/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux index d3e69daec..0f2b64f9f 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux @@ -93,7 +93,7 @@ ([-1.0 _.ICONST_M1] ... [+0.0 _.ICONST_0] ... [+1.0 _.ICONST_1] - [+2.0 _.ICONST_2] + ... [+2.0 _.ICONST_2] [+3.0 _.ICONST_3] [+4.0 _.ICONST_4] [+5.0 _.ICONST_5]) |