From e4c1b1645fa1a62a0bf8c90723eab7be634dd67f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 16 Aug 2018 06:22:54 -0400 Subject: Extension-related fixes. --- .../luxc/lang/translation/jvm/expression.jvm.lux | 2 +- .../luxc/lang/translation/jvm/procedure/common.jvm.lux | 18 +++++++++--------- new-luxc/source/program.lux | 6 ++++-- 3 files changed, 14 insertions(+), 12 deletions(-) (limited to 'new-luxc/source') diff --git a/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux index f250604b5..9579acaa3 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux @@ -67,4 +67,4 @@ (function.function translate abstraction) (#synthesis.Extension extension) - (extension.apply translate extension))) + (extension.apply "Translation" translate extension))) 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 efccb25f6..d1826669a 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 @@ -307,27 +307,27 @@ (bundle.install "is" (binary lux::is)) (bundle.install "try" (unary lux::try)))) -(def: bundle::bit +(def: bundle::i64 Bundle - (<| (bundle.prefix "bit") + (<| (bundle.prefix "i64") (|> (: Bundle bundle.empty) (bundle.install "and" (binary bit::and)) (bundle.install "or" (binary bit::or)) (bundle.install "xor" (binary bit::xor)) (bundle.install "left-shift" (binary bit::left-shift)) (bundle.install "logical-right-shift" (binary bit::logical-right-shift)) - (bundle.install "arithmetic-right-shift" (binary bit::arithmetic-right-shift))))) + (bundle.install "arithmetic-right-shift" (binary bit::arithmetic-right-shift)) + (bundle.install "+" (binary i64::+)) + (bundle.install "-" (binary i64::-)) + (bundle.install "=" (binary i64::=))))) -(def: bundle::i64 +(def: bundle::int Bundle - (<| (bundle.prefix "i64") + (<| (bundle.prefix "int") (|> (: Bundle bundle.empty) - (bundle.install "+" (binary i64::+)) - (bundle.install "-" (binary i64::-)) (bundle.install "*" (binary i64::*)) (bundle.install "/" (binary i64::/)) (bundle.install "%" (binary i64::%)) - (bundle.install "=" (binary i64::=)) (bundle.install "<" (binary i64::<)) (bundle.install "to-f64" (unary i64::to-f64)) (bundle.install "char" (unary i64::char))))) @@ -375,8 +375,8 @@ Bundle (<| (bundle.prefix "lux") (|> bundle::lux - (dictionary.merge bundle::bit) (dictionary.merge bundle::i64) + (dictionary.merge bundle::int) (dictionary.merge bundle::f64) (dictionary.merge bundle::text) (dictionary.merge bundle::io)))) diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux index 01b3a2eee..7b29f7283 100644 --- a/new-luxc/source/program.lux +++ b/new-luxc/source/program.lux @@ -27,7 +27,9 @@ [translation ["." jvm ["." runtime] - ["." expression]]]]]) + ["." expression] + [procedure + ["." common]]]]]]) (def: (or-crash! failure-description action) (All [a] @@ -72,7 +74,7 @@ (#cli.Compilation configuration) (<| (or-crash! "Compilation failed:") ..timed - (default.compile platform configuration)) + (default.compile platform configuration common.bundle)) (#cli.Interpretation configuration) (<| (or-crash! "Interpretation failed:") -- cgit v1.2.3