From a59fc865aee240afe21b82ffef2681bb9a6ea693 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 29 Jul 2018 02:30:13 -0400 Subject: Adapted new-luxc to some of the latest changes to Lux. --- new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 ba606a437..2268b3ba2 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux @@ -3,7 +3,7 @@ [control [monad (#+ do)]] [data - [text ("text/." Hash) + [text format]] [compiler [default @@ -32,7 +32,7 @@ (-> Register (Operation Inst)) (do phase.Monad [function-class translation.context] - (wrap (|>> (_.ALOAD +0) + (wrap (|>> (_.ALOAD 0) (_.GETFIELD function-class (|> variable .nat foreign-name) //.$Object))))) @@ -50,7 +50,8 @@ (#reference.Foreign variable) (foreign variable))) -(def: #export (constant [module short]) +(def: #export (constant name) (-> Name (Operation Inst)) - (let [bytecode-name (format module "/" (name.normalize short) (%n (text/hash short)))] + (do phase.Monad + [bytecode-name (translation.remember name)] (operation/wrap (_.GETSTATIC bytecode-name //.value-field //.$Object)))) -- cgit v1.2.3