From 8b4f0ded7bddaa42cf432f74523bfd6aa1e76fed Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 18 Jul 2018 23:44:29 -0400 Subject: WIP: Fix new-luxc's JVM back-end. --- .../luxc/lang/translation/jvm/primitive.jvm.lux | 46 +++++++++++----------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux index 250b0db52..f1d639b72 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux @@ -1,29 +1,31 @@ (.module: - lux - (lux (control monad) - (data text/format) - [macro "macro/" Monad]) - (luxc ["&" lang] - (lang [".L" host] - (host ["$" jvm] - (jvm ["$i" inst] - ["$t" type])) - ["la" analysis] - ["ls" synthesis])) - (// [".T" common])) + [lux (#- i64) + [control + monad] + [data + [text + format]] + [language + [compiler ("operation/" Monad)]]] + [luxc + [lang + [host + [jvm (#+ Inst Operation) + ["$i" inst] + ["$t" type]]]]]) -(def: #export (translate-bit value) - (-> Bit (Meta $.Inst)) - (macro/wrap ($i.GETSTATIC "java.lang.Boolean" - (if value "TRUE" "FALSE") - ($t.class "java.lang.Boolean" (list))))) +(def: #export (bit value) + (-> Bit (Operation Inst)) + (operation/wrap ($i.GETSTATIC "java.lang.Boolean" + (if value "TRUE" "FALSE") + ($t.class "java.lang.Boolean" (list))))) (do-template [ ] [(def: #export ( value) - (-> (Meta $.Inst)) - (macro/wrap (|>> ( value) )))] + (-> (Operation Inst)) + (operation/wrap (|>> ( value) )))] - [translate-i64 Int $i.long ($i.wrap #$.Long)] - [translate-f64 Frac $i.double ($i.wrap #$.Double)] - [translate-text Text $i.string id] + [i64 Int $i.long ($i.wrap #jvm.Long)] + [f64 Frac $i.double ($i.wrap #jvm.Double)] + [text Text $i.string (<|)] ) -- cgit v1.2.3