aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/synthesizer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/synthesizer.lux12
-rw-r--r--new-luxc/source/luxc/synthesizer/loop.lux10
2 files changed, 11 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/synthesizer.lux b/new-luxc/source/luxc/synthesizer.lux
index 9cfcc020e..7bee8fe58 100644
--- a/new-luxc/source/luxc/synthesizer.lux
+++ b/new-luxc/source/luxc/synthesizer.lux
@@ -54,9 +54,9 @@
(#;Local register)
(if (&&function;nested? outer-arity)
(if (n.= +0 register)
- (<| (#ls;Call (#ls;Variable 0))
- (L/map (|>. &&function;to-local #ls;Variable))
- (list;n.range +1 (n.dec outer-arity)))
+ (#ls;Call (|> (list;n.range +1 (n.dec outer-arity))
+ (L/map (|>. &&function;to-local #ls;Variable)))
+ (#ls;Variable 0))
(#ls;Variable (&&function;adjust-var outer-arity (&&function;to-local register))))
(#ls;Variable (&&function;to-local register)))
@@ -136,11 +136,11 @@
(#ls;Loop register-offset argsS
(&&loop;adjust _env register-offset _bodyS)))
- (#ls;Call funcS' argsS')
- (#ls;Call funcS' (L/append argsS' argsS))
+ (#ls;Call argsS' funcS')
+ (#ls;Call (L/append argsS' argsS) funcS')
_
- (#ls;Call funcS argsS)))
+ (#ls;Call argsS funcS)))
(#la;Procedure name args)
(#ls;Procedure name (L/map (recur +0 resolver num-locals) args))
diff --git a/new-luxc/source/luxc/synthesizer/loop.lux b/new-luxc/source/luxc/synthesizer/loop.lux
index 06b1d1bb0..9f4d09a49 100644
--- a/new-luxc/source/luxc/synthesizer/loop.lux
+++ b/new-luxc/source/luxc/synthesizer/loop.lux
@@ -32,7 +32,7 @@
(#ls;Function arity environment bodyS)
(list;any? &&function;self? environment)
- (#ls;Call funcS argsS)
+ (#ls;Call argsS funcS)
(or (contains-self-reference? funcS)
(list;any? contains-self-reference? argsS))
@@ -81,11 +81,11 @@
_
pathS))))
- (^multi (#ls;Call (#ls;Variable 0) argsS)
+ (^multi (#ls;Call argsS (#ls;Variable 0))
(n.= arity (list;size argsS)))
(#ls;Recur argsS)
- (#ls;Call (#ls;Variable var) argsS)
+ (#ls;Call argsS (#ls;Variable var))
exprS
(#ls;Let register inputS bodyS)
@@ -136,8 +136,8 @@
(L/map resolve-captured scope)
(recur bodyS))
- (#ls;Call funcS argsS)
- (#ls;Call (recur funcS) (L/map recur argsS))
+ (#ls;Call argsS funcS)
+ (#ls;Call (L/map recur argsS) (recur funcS))
(#ls;Recur argsS)
(#ls;Recur (L/map recur argsS))