diff options
author | Eduardo Julian | 2021-08-12 03:12:42 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-12 03:12:42 -0400 |
commit | 17629d66062b88b040a2397032f6c08361a5f3a7 (patch) | |
tree | bdc6110750b895667b9e45da5e46bec9609f9a7c /lux-jvm/source/luxc | |
parent | a62ce3f9c2b605e0033f4772b0f64c4525de4d86 (diff) |
Improved binding syntax for "syntax:".
Diffstat (limited to 'lux-jvm/source/luxc')
-rw-r--r-- | lux-jvm/source/luxc/lang/directive/jvm.lux | 8 | ||||
-rw-r--r-- | lux-jvm/source/luxc/lang/host/jvm.lux | 8 | ||||
-rw-r--r-- | lux-jvm/source/luxc/lang/host/jvm/inst.lux | 2 | ||||
-rw-r--r-- | lux-jvm/source/luxc/lang/synthesis/variable.lux | 8 | ||||
-rw-r--r-- | lux-jvm/source/luxc/lang/translation/jvm/function.lux | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/lux-jvm/source/luxc/lang/directive/jvm.lux b/lux-jvm/source/luxc/lang/directive/jvm.lux index fa8b1420e..bc038bc92 100644 --- a/lux-jvm/source/luxc/lang/directive/jvm.lux +++ b/lux-jvm/source/luxc/lang/directive/jvm.lux @@ -426,7 +426,7 @@ #.None (let [label' (org/objectweb/asm/Label::new)] - [(dictionary.put label label' mapping) label']))) + [(dictionary.has label label' mapping) label']))) (def: (relabel_branching [mapping instruction]) (Re_labeler /.Branching) @@ -1477,6 +1477,6 @@ (def: .public (bundle class_loader extender) (-> java/lang/ClassLoader jvm.Extender (directive.Bundle jvm.Anchor jvm.Inst jvm.Definition)) (|> bundle.empty - (dictionary.put "lux def generation" (..def::generation extender)) - (dictionary.put "jvm class" (..jvm::class class_loader)) - (dictionary.put "jvm class interface" ..jvm::class::interface))) + (dictionary.has "lux def generation" (..def::generation extender)) + (dictionary.has "jvm class" (..jvm::class class_loader)) + (dictionary.has "jvm class interface" ..jvm::class::interface))) diff --git a/lux-jvm/source/luxc/lang/host/jvm.lux b/lux-jvm/source/luxc/lang/host/jvm.lux index a9b73c8b0..6ce7badc5 100644 --- a/lux-jvm/source/luxc/lang/host/jvm.lux +++ b/lux-jvm/source/luxc/lang/host/jvm.lux @@ -88,10 +88,10 @@ (type: .public (Generator i) (-> Phase Archive i (Operation Inst))) -(syntax: (config: {type <code>.local_identifier} - {none <code>.local_identifier} - {++ <code>.local_identifier} - {options (<code>.tuple (<>.many <code>.local_identifier))}) +(syntax: (config: [type <code>.local_identifier + none <code>.local_identifier + ++ <code>.local_identifier + options (<code>.tuple (<>.many <code>.local_identifier))]) (let [g!type (code.local_identifier type) g!none (code.local_identifier none) g!tags+ (list/map code.local_tag options) diff --git a/lux-jvm/source/luxc/lang/host/jvm/inst.lux b/lux-jvm/source/luxc/lang/host/jvm/inst.lux index 7229babab..90732578e 100644 --- a/lux-jvm/source/luxc/lang/host/jvm/inst.lux +++ b/lux-jvm/source/luxc/lang/host/jvm/inst.lux @@ -44,7 +44,7 @@ (import: java/lang/Object) (import: java/lang/String) -(syntax: (declare {codes (p.many s.local_identifier)}) +(syntax: (declare [codes (p.many s.local_identifier)]) (|> codes (list@map (function (_ code) (` ((~' #static) (~ (code.local_identifier code)) (~' int))))) in)) diff --git a/lux-jvm/source/luxc/lang/synthesis/variable.lux b/lux-jvm/source/luxc/lang/synthesis/variable.lux index 11fbaae51..4721187f8 100644 --- a/lux-jvm/source/luxc/lang/synthesis/variable.lux +++ b/lux-jvm/source/luxc/lang/synthesis/variable.lux @@ -47,11 +47,11 @@ (def: (unused-vars current-arity bound exprS) (-> ls.Arity (List Variable) ls.Synthesis (List Variable)) (let [tracker (loop [exprS exprS - tracker (list/fold s.add init-tracker bound)] + tracker (list/fold s.has init-tracker bound)] (case exprS (#ls.Variable var) (if (non-arg? current-arity var) - (s.remove var tracker) + (s.lacks var tracker) tracker) (#ls.Variant tag last? memberS) @@ -77,13 +77,13 @@ (recur bodyS (list/fold recur tracker initsS)) (#ls.Case inputS outputPS) - (let [tracker' (list/fold s.add + (let [tracker' (list/fold s.has (recur inputS tracker) (bound-vars outputPS))] (list/fold recur tracker' (path-bodies outputPS))) (#ls.Function arity env bodyS) - (list/fold s.remove tracker env) + (list/fold s.lacks tracker env) _ tracker diff --git a/lux-jvm/source/luxc/lang/translation/jvm/function.lux b/lux-jvm/source/luxc/lang/translation/jvm/function.lux index dfca4a6e6..e4fb2c65e 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/function.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/function.lux @@ -58,7 +58,7 @@ (-> (Environment Synthesis) Arity (Type Method)) (if (poly_arg? arity) (type.method [(list) - (list.concat (list (captured_args env) + (list.joined (list (captured_args env) (list type.int) (list.repeat (dec arity) //.$Value))) type.void |