aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/r
diff options
context:
space:
mode:
authorEduardo Julian2017-11-01 00:51:45 -0400
committerEduardo Julian2017-11-01 00:51:45 -0400
commit012f6bd41e527479dddbccbdab10daa78fd9a0fd (patch)
tree621f344a09acd52736f343d94582b3f1a2f0c5f9 /new-luxc/source/luxc/lang/translation/r
parent71d7a4c7206155e09f3e1e1d8699561ea6967382 (diff)
- Re-organized code-generation, and re-named it "translation".
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/reference.jvm.lux (renamed from new-luxc/source/luxc/generator/reference.jvm.lux)14
-rw-r--r--new-luxc/source/luxc/lang/translation/runtime.jvm.lux (renamed from new-luxc/source/luxc/generator/runtime.jvm.lux)14
2 files changed, 14 insertions, 14 deletions
diff --git a/new-luxc/source/luxc/generator/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/reference.jvm.lux
index 9af511167..7c42f9f08 100644
--- a/new-luxc/source/luxc/generator/reference.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/reference.jvm.lux
@@ -8,18 +8,18 @@
(jvm ["$t" type]
["$i" inst]))
(lang ["ls" synthesis]
- [";L" variable #+ Variable])
- (generator [";G" common]
- [";G" function])))
+ [";L" variable #+ Variable]
+ (translation [";T" common]
+ [";T" function]))))
(def: #export (generate-captured variable)
(-> Variable (Meta $;Inst))
(do meta;Monad<Meta>
- [function-class commonG;function]
+ [function-class commonT;function]
(wrap (|>. ($i;ALOAD +0)
($i;GETFIELD function-class
- (|> variable i.inc (i.* -1) int-to-nat functionG;captured)
- commonG;$Object)))))
+ (|> variable i.inc (i.* -1) int-to-nat functionT;captured)
+ commonT;$Object)))))
(def: #export (generate-variable variable)
(-> Variable (Meta $;Inst))
@@ -28,4 +28,4 @@
(def: #export (generate-definition [def-module def-name])
(-> Ident (Meta $;Inst))
(let [bytecode-name (format def-module "/" (&;normalize-name def-name))]
- (meta/wrap ($i;GETSTATIC bytecode-name commonG;value-field commonG;$Object))))
+ (meta/wrap ($i;GETSTATIC bytecode-name commonT;value-field commonT;$Object))))
diff --git a/new-luxc/source/luxc/generator/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/runtime.jvm.lux
index 4b57e802e..e5d237fc7 100644
--- a/new-luxc/source/luxc/generator/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/runtime.jvm.lux
@@ -13,8 +13,8 @@
["$d" def]
["$i" inst]))
(lang ["la" analysis]
- ["ls" synthesis])
- (generator ["&;" common])))
+ ["ls" synthesis]
+ (translation [";T" common]))))
(host;import java.lang.Object)
(host;import java.lang.String)
@@ -556,7 +556,7 @@
)))
(def: generate-runtime
- (Meta &common;Bytecode)
+ (Meta commonT;Bytecode)
(do meta;Monad<Meta>
[_ (wrap [])
#let [bytecode ($d;class #$;V1.6 #$;Public $;finalC hostL;runtime-class (list) ["java.lang.Object" (list)] (list)
@@ -566,11 +566,11 @@
deg-methods
pm-methods
io-methods))]
- _ (&common;store-class hostL;runtime-class bytecode)]
+ _ (commonT;store-class hostL;runtime-class bytecode)]
(wrap bytecode)))
(def: generate-function
- (Meta &common;Bytecode)
+ (Meta commonT;Bytecode)
(do meta;Monad<Meta>
[_ (wrap [])
#let [applyI (|> (list;n.range +2 num-apply-variants)
@@ -597,11 +597,11 @@
($i;PUTFIELD hostL;function-class partials-field $t;int)
$i;RETURN))
applyI))]
- _ (&common;store-class hostL;function-class bytecode)]
+ _ (commonT;store-class hostL;function-class bytecode)]
(wrap bytecode)))
(def: #export generate
- (Meta [&common;Bytecode &common;Bytecode])
+ (Meta [commonT;Bytecode commonT;Bytecode])
(do meta;Monad<Meta>
[runtime-bc generate-runtime
function-bc generate-function]