aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm/reference.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-05-30 15:19:28 -0400
committerEduardo Julian2020-05-30 15:19:28 -0400
commitb4d0eba7485caf0c6cf58de1193a9114fa273d8b (patch)
treef6f7fa2967bb5923347db1ed1d4c9b08e56bf8c6 /new-luxc/source/luxc/lang/translation/jvm/reference.lux
parent6eaa3b57f3f1ea2ce13b942bdb4ef502fc1729bc (diff)
Split new-luxc into lux-jvm and lux-r.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/reference.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/reference.lux65
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))))