diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/reference.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/reference.lux | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/reference.lux b/new-luxc/source/luxc/lang/translation/jvm/reference.lux index ba5cb33de..ff5d7a96c 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/reference.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/reference.lux @@ -10,9 +10,10 @@ ["." type]]] [tool [compiler - ["." name] ["." reference (#+ Register Variable)] ["." phase ("operation@." monad)] + [meta + [archive (#+ Archive)]] [language [lux ["." generation]]]]]] @@ -21,7 +22,8 @@ [host [jvm (#+ Inst Operation) ["_" inst]]]]] - ["." //]) + ["." // + ["#." runtime]]) (template [<name> <prefix>] [(def: #export <name> @@ -35,9 +37,10 @@ (def: (foreign variable) (-> Register (Operation Inst)) (do phase.monad - [function-class generation.context] + [class-name (:: @ map //runtime.class-name + generation.context)] (wrap (|>> (_.ALOAD 0) - (_.GETFIELD (type.class function-class (list)) + (_.GETFIELD (type.class class-name (list)) (|> variable .nat foreign-name) //.$Value))))) @@ -54,8 +57,9 @@ (#reference.Foreign variable) (foreign variable))) -(def: #export (constant name) - (-> Name (Operation Inst)) +(def: #export (constant archive name) + (-> Archive Name (Operation Inst)) (do phase.monad - [bytecode-name (generation.remember name)] - (wrap (_.GETSTATIC (type.class bytecode-name (list)) //.value-field //.$Value)))) + [class-name (:: @ map //runtime.class-name + (generation.remember archive name))] + (wrap (_.GETSTATIC (type.class class-name (list)) //.value-field //.$Value)))) |