diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux | 9 |
1 files changed, 5 insertions, 4 deletions
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>) + [text format]] [compiler [default @@ -32,7 +32,7 @@ (-> Register (Operation Inst)) (do phase.Monad<Operation> [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<Operation> + [bytecode-name (translation.remember name)] (operation/wrap (_.GETSTATIC bytecode-name //.value-field //.$Object)))) |