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 | 35 |
1 files changed, 18 insertions, 17 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 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 ("text/." Hash<Text>) format]] - [language - ["." name] - ["." reference (#+ Register Variable)] - ["." compiler ("operation/" Monad<Operation>) - ["." translation]]]] + [compiler + [default + ["." name] + ["." reference (#+ Register Variable)] + ["." phase ("operation/." Monad<Operation>) + ["." translation]]]]] [luxc [lang [host [jvm (#+ Inst Operation) ["$t" type] - ["$i" inst]]]]] + ["_" inst]]]]] ["." //]) (do-template [<name> <prefix>] @@ -29,16 +30,16 @@ (def: (foreign variable) (-> Register (Operation Inst)) - (do compiler.Monad<Operation> + (do phase.Monad<Operation> [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)))) |