diff options
Diffstat (limited to 'lux-jvm/source/luxc/lang/translation/jvm/reference.lux')
-rw-r--r-- | lux-jvm/source/luxc/lang/translation/jvm/reference.lux | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/reference.lux b/lux-jvm/source/luxc/lang/translation/jvm/reference.lux deleted file mode 100644 index 88b2af2ed..000000000 --- a/lux-jvm/source/luxc/lang/translation/jvm/reference.lux +++ /dev/null @@ -1,67 +0,0 @@ -(.using - [library - [lux {"-" local} - [abstract - [monad {"+" do}]] - [data - [text - ["%" format {"+" format}]]] - [target - [jvm - ["[0]" type]]] - [tool - [compiler - [reference - ["[0]" variable {"+" Register Variable}]] - ["[0]" phase ("operation@[0]" monad)] - [meta - [archive {"+" Archive}]] - [language - [lux - ["[0]" generation]]]]]]] - [luxc - [lang - [host - [jvm {"+" Inst Operation} - ["_" inst]]]]] - ["[0]" // - ["[1][0]" runtime]]) - -(template [<name> <prefix>] - [(def: .public <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 (# @ each //.class_name - (generation.context archive))] - (in (|>> (_.ALOAD 0) - (_.GETFIELD (type.class class_name (list)) - (|> variable .nat foreign_name) - //.$Value))))) - -(def: local - (-> Register Inst) - (|>> _.ALOAD)) - -(def: .public (variable archive variable) - (-> Archive Variable (Operation Inst)) - (case variable - {variable.#Local variable} - (operation@in (local variable)) - - {variable.#Foreign variable} - (foreign archive variable))) - -(def: .public (constant archive name) - (-> Archive Symbol (Operation Inst)) - (do [@ phase.monad] - [class_name (# @ each //.class_name - (generation.remember archive name))] - (in (_.GETSTATIC (type.class class_name (list)) //.value_field //.$Value)))) |