diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/generation/jvm/extension/common.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/generation/jvm/extension/common.lux | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/extension/common.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/extension/common.lux index 8759bf2e8..d8ac81cc4 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/extension/common.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/extension/common.lux @@ -93,8 +93,6 @@ (_.set-label @end) ))) -(def: unit (_.ldc/string //////synthesis.unit)) - ## TODO: Get rid of this ASAP (def: lux::syntax-char-case! (..custom [($_ <>.and @@ -190,15 +188,11 @@ (#static MIN_VALUE java/lang/Double) (#static MAX_VALUE java/lang/Double)) -(def: ldc/double - (-> Frac (Instruction Any)) - (|>> constant.double _.ldc/double)) - (template [<name> <const>] [(def: (<name> _) (Nullary (Instruction Any)) ($_ _.compose - (..ldc/double <const>) + (_.ldc/double (constant.double <const>)) (///value.wrap type.double)))] [f64::smallest (java/lang/Double::MIN_VALUE)] @@ -227,10 +221,6 @@ [f64::% type.double _.drem] ) -(def: ldc/integer - (-> (I64 Any) (Instruction Any)) - (|>> .i64 i32.i32 constant.integer _.ldc/integer)) - (template [<eq> <lt> <type> <cmp>] [(template [<name> <reference>] [(def: (<name> [paramG subjectG]) @@ -239,11 +229,11 @@ subjectG (///value.unwrap <type>) paramG (///value.unwrap <type>) <cmp> - (..ldc/integer <reference>) + <reference> (..predicate _.if-icmpeq)))] - [<eq> +0] - [<lt> -1])] + [<eq> _.iconst-0] + [<lt> _.iconst-m1])] [i64::= i64::< type.long _.lcmp] [f64::= f64::< type.double _.dcmpg] @@ -383,7 +373,7 @@ startG ..jvm-int (_.invokevirtual ..$String "indexOf" index-method) _.dup - (ldc/integer -1) + _.iconst-m1 (_.if-icmpeq @not-found) ..lux-int ///runtime.some-injection @@ -413,7 +403,7 @@ messageG ..ensure-string (_.invokevirtual ..$PrintStream "println" ..string-method) - ..unit)) + ///runtime.unit)) (def: (io::error messageG) (Unary (Instruction Any)) |