aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/generator/host
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/generator/host')
-rw-r--r--new-luxc/source/luxc/generator/host/jvm.lux36
-rw-r--r--new-luxc/source/luxc/generator/host/jvm/def.lux22
-rw-r--r--new-luxc/source/luxc/generator/host/jvm/inst.lux5
3 files changed, 32 insertions, 31 deletions
diff --git a/new-luxc/source/luxc/generator/host/jvm.lux b/new-luxc/source/luxc/generator/host/jvm.lux
index 149fbf123..4fb3fa77d 100644
--- a/new-luxc/source/luxc/generator/host/jvm.lux
+++ b/new-luxc/source/luxc/generator/host/jvm.lux
@@ -2,7 +2,7 @@
[lux #- Type Def]
(lux (control monad
["p" parser])
- (data (coll [list "L/" Functor<List>]))
+ (data (coll [list "list/" Functor<List>]))
[macro]
(macro [code]
["s" syntax #+ syntax:])
@@ -86,32 +86,32 @@
[options (s;tuple (p;many s;local-symbol))])
(let [g!type (code;local-symbol type)
g!none (code;local-symbol none)
- g!tags+ (L/map code;local-tag options)
+ g!tags+ (list/map code;local-tag options)
g!_left (code;local-symbol "_left")
g!_right (code;local-symbol "_right")
- g!options+ (L/map (function [option]
- (` (def: (~' #export) (~ (code;local-symbol option))
- (~ g!type)
- (|> (~ g!none)
- (set@ (~ (code;local-tag option)) true)))))
- options)]
+ g!options+ (list/map (function [option]
+ (` (def: (~' #export) (~ (code;local-symbol option))
+ (~ g!type)
+ (|> (~ g!none)
+ (set@ (~ (code;local-tag option)) true)))))
+ options)]
(wrap (list& (` (type: (~' #export) (~ g!type)
- (~ (code;record (L/map (function [tag]
- [tag (` ;Bool)])
- g!tags+)))))
+ (~ (code;record (list/map (function [tag]
+ [tag (` ;Bool)])
+ g!tags+)))))
(` (def: (~' #export) (~ g!none)
(~ g!type)
- (~ (code;record (L/map (function [tag]
- [tag (` false)])
- g!tags+)))))
+ (~ (code;record (list/map (function [tag]
+ [tag (` false)])
+ g!tags+)))))
(` (def: (~' #export) ((~ (code;local-symbol ++)) (~ g!_left) (~ g!_right))
(-> (~ g!type) (~ g!type) (~ g!type))
- (~ (code;record (L/map (function [tag]
- [tag (` (and (get@ (~ tag) (~ g!_left))
- (get@ (~ tag) (~ g!_right))))])
- g!tags+)))))
+ (~ (code;record (list/map (function [tag]
+ [tag (` (and (get@ (~ tag) (~ g!_left))
+ (get@ (~ tag) (~ g!_right))))])
+ g!tags+)))))
g!options+))))
diff --git a/new-luxc/source/luxc/generator/host/jvm/def.lux b/new-luxc/source/luxc/generator/host/jvm/def.lux
index 18cd4f945..7dd78ceb3 100644
--- a/new-luxc/source/luxc/generator/host/jvm/def.lux
+++ b/new-luxc/source/luxc/generator/host/jvm/def.lux
@@ -4,7 +4,7 @@
text/format
[product]
(coll ["a" array]
- [list "L/" Functor<List>]))
+ [list "list/" Functor<List>]))
[host #+ do-to])
["$" ..]
(.. ["$t" type]))
@@ -56,13 +56,13 @@
(visitEnd [] void)
(visitField [int String String String Object] FieldVisitor)
(visitMethod [int String String String (Array String)] MethodVisitor)
- (toByteArray [] Byte-Array))
+ (toByteArray [] (Array byte)))
## [Defs]
(def: (string-array values)
(-> (List Text) (a;Array Text))
(let [output (host;array String (list;size values))]
- (exec (L/map (function [[idx value]]
+ (exec (list/map (function [[idx value]]
(host;array-write idx value output))
(list;enumerate values))
output)))
@@ -70,7 +70,7 @@
(def: exceptions-array
(-> $;Method (a;Array Text))
(|>. (get@ #$;exceptions)
- (L/map (|>. #$;Generic $t;descriptor))
+ (list/map (|>. #$;Generic $t;descriptor))
string-array))
(def: (version-flag version)
@@ -127,7 +127,7 @@
(format name
(param-signature super)
(|> interfaces
- (L/map param-signature)
+ (list/map param-signature)
(text;join-with ""))))
(def: (parameters-signature parameters super interfaces)
@@ -137,13 +137,13 @@
""
(format "<"
(|> parameters
- (L/map formal-param)
+ (list/map formal-param)
(text;join-with ""))
">"))]
(format formal-params
(|> super class-to-type $t;signature)
(|> interfaces
- (L/map (|>. class-to-type $t;signature))
+ (list/map (|>. class-to-type $t;signature))
(text;join-with "")))))
(def: class-computes
@@ -156,7 +156,7 @@
[(def: #export (<name> version visibility config name parameters super interfaces
definitions)
(-> $;Version $;Visibility $;Class-Config Text (List $;Parameter) $;Class (List $;Class) $;Def
- host;Byte-Array)
+ (host;type (Array byte)))
(let [writer (|> (do-to (ClassWriter.new class-computes)
(ClassWriter.visit [(version-flag version)
($_ i.+
@@ -168,7 +168,7 @@
(parameters-signature parameters super interfaces)
(|> super product;left $t;binary-name)
(|> interfaces
- (L/map (|>. product;left $t;binary-name))
+ (list/map (|>. product;left $t;binary-name))
string-array)]))
definitions)
_ (ClassWriter.visitEnd [] writer)]
@@ -183,7 +183,7 @@
(def: #export (interface version visibility config name parameters interfaces
definitions)
(-> $;Version $;Visibility $;Class-Config Text (List $;Parameter) (List $;Class) $;Def
- host;Byte-Array)
+ (host;type (Array byte)))
(let [writer (|> (do-to (ClassWriter.new class-computes)
(ClassWriter.visit [(version-flag version)
($_ i.+
@@ -195,7 +195,7 @@
(parameters-signature parameters $Object interfaces)
(|> $Object product;left $t;binary-name)
(|> interfaces
- (L/map (|>. product;left $t;binary-name))
+ (list/map (|>. product;left $t;binary-name))
string-array)]))
definitions)
_ (ClassWriter.visitEnd [] writer)]
diff --git a/new-luxc/source/luxc/generator/host/jvm/inst.lux b/new-luxc/source/luxc/generator/host/jvm/inst.lux
index 02027294a..aa9a852dd 100644
--- a/new-luxc/source/luxc/generator/host/jvm/inst.lux
+++ b/new-luxc/source/luxc/generator/host/jvm/inst.lux
@@ -2,8 +2,9 @@
[lux #- char]
(lux (control monad
["p" parser])
- (data text/format
+ (data [maybe]
["R" result]
+ text/format
(coll [list "L/" Functor<List>]))
[host #+ do-to]
[macro]
@@ -262,7 +263,7 @@
_ (loop [idx +0]
(if (n.< num-labels idx)
(exec (host;array-write idx
- (assume (list;nth idx labels))
+ (maybe;assume (list;nth idx labels))
labels-array)
(recur (n.inc idx)))
[]))]