aboutsummaryrefslogtreecommitdiff
path: root/luxc/src/lux/optimizer.clj
diff options
context:
space:
mode:
Diffstat (limited to 'luxc/src/lux/optimizer.clj')
-rw-r--r--luxc/src/lux/optimizer.clj9
1 files changed, 5 insertions, 4 deletions
diff --git a/luxc/src/lux/optimizer.clj b/luxc/src/lux/optimizer.clj
index 36caf3362..d83ac3014 100644
--- a/luxc/src/lux/optimizer.clj
+++ b/luxc/src/lux/optimizer.clj
@@ -19,6 +19,7 @@
("case" 2)
("function" 5)
("ann" 2)
+ ("def" 1)
("var" 1)
("captured" 3)
("proc" 3)
@@ -734,10 +735,7 @@
(&/|list [meta ($var (&/$Local 1))]))])
(&/$Local idx)
- (&/T [meta ($var (&/$Local (inc idx)))])
-
- (&/$Global ?module ?name)
- body)
+ (&/T [meta ($var (&/$Local (inc idx)))]))
body)
;; This special "apply" rule is for handling recursive calls better.
@@ -1177,6 +1175,9 @@
(&a/$ann value-expr type-expr)
(&/T [meta ($ann (pass-0 top-level-func? value-expr) type-expr)])
+ (&a/$def def-name)
+ (&/T [meta ($def def-name)])
+
(&a/$var var-kind)
(&/T [meta ($var var-kind)])