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 | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/reference.lux b/new-luxc/source/luxc/lang/translation/jvm/reference.lux deleted file mode 100644 index 6bcf4a2e5..000000000 --- a/new-luxc/source/luxc/lang/translation/jvm/reference.lux +++ /dev/null @@ -1,65 +0,0 @@ -(.module: - [lux #* - [abstract - [monad (#+ do)]] - [data - [text - ["%" format (#+ format)]]] - [target - [jvm - ["." type]]] - [tool - [compiler - ["." reference (#+ Register Variable)] - ["." phase ("operation@." monad)] - [meta - [archive (#+ Archive)]] - [language - [lux - ["." generation]]]]]] - [luxc - [lang - [host - [jvm (#+ Inst Operation) - ["_" inst]]]]] - ["." // - ["#." runtime]]) - -(template [<name> <prefix>] - [(def: #export <name> - (-> Nat Text) - (|>> %.nat (format <prefix>)))] - - [foreign-name "f"] - [partial-name "p"] - ) - -(def: (foreign archive variable) - (-> Archive Register (Operation Inst)) - (do {@ phase.monad} - [class-name (:: @ map //.class-name - (generation.context archive))] - (wrap (|>> (_.ALOAD 0) - (_.GETFIELD (type.class class-name (list)) - (|> variable .nat foreign-name) - //.$Value))))) - -(def: local - (-> Register Inst) - (|>> _.ALOAD)) - -(def: #export (variable archive variable) - (-> Archive Variable (Operation Inst)) - (case variable - (#reference.Local variable) - (operation@wrap (local variable)) - - (#reference.Foreign variable) - (foreign archive variable))) - -(def: #export (constant archive name) - (-> Archive Name (Operation Inst)) - (do {@ phase.monad} - [class-name (:: @ map //.class-name - (generation.remember archive name))] - (wrap (_.GETSTATIC (type.class class-name (list)) //.value-field //.$Value)))) |