From b14102eaa2a80f51f160ba293ec01928dbe683c3 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 22 Jul 2018 02:52:46 -0400 Subject: - Some fixes due to recent changes in stdlib. - Removed some (now) useless modules. --- .../luxc/lang/translation/jvm/reference.jvm.lux | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux index 3686b9210..ba606a437 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux @@ -3,19 +3,20 @@ [control [monad (#+ do)]] [data - [text ("text/" Hash) + [text ("text/." Hash) format]] - [language - ["." name] - ["." reference (#+ Register Variable)] - ["." compiler ("operation/" Monad) - ["." translation]]]] + [compiler + [default + ["." name] + ["." reference (#+ Register Variable)] + ["." phase ("operation/." Monad) + ["." translation]]]]] [luxc [lang [host [jvm (#+ Inst Operation) ["$t" type] - ["$i" inst]]]]] + ["_" inst]]]]] ["." //]) (do-template [ ] @@ -29,16 +30,16 @@ (def: (foreign variable) (-> Register (Operation Inst)) - (do compiler.Monad + (do phase.Monad [function-class translation.context] - (wrap (|>> ($i.ALOAD +0) - ($i.GETFIELD function-class - (|> variable .nat foreign-name) - //.$Object))))) + (wrap (|>> (_.ALOAD +0) + (_.GETFIELD function-class + (|> variable .nat foreign-name) + //.$Object))))) (def: local (-> Register (Operation Inst)) - (|>> $i.ALOAD operation/wrap)) + (|>> _.ALOAD operation/wrap)) (def: #export (variable variable) (-> Variable (Operation Inst)) @@ -49,7 +50,7 @@ (#reference.Foreign variable) (foreign variable))) -(def: #export (constant [def-module def-name]) - (-> Ident (Operation Inst)) - (let [bytecode-name (format def-module "/" (name.normalize def-name) (%n (text/hash def-name)))] - (operation/wrap ($i.GETSTATIC bytecode-name //.value-field //.$Object)))) +(def: #export (constant [module short]) + (-> Name (Operation Inst)) + (let [bytecode-name (format module "/" (name.normalize short) (%n (text/hash short)))] + (operation/wrap (_.GETSTATIC bytecode-name //.value-field //.$Object)))) -- cgit v1.2.3