aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-05-24 00:56:01 +0000
committerdos-reis <gdr@axiomatics.org>2010-05-24 00:56:01 +0000
commitcd465d2c88f45cb35d3488dbe0ad24e4ee0e05ab (patch)
tree243321effa8cef0e98d6f9d039c0dce401ad7088 /src
parent332c97dae1bfc5de9d8af1a3400310903f79abe1 (diff)
downloadopen-axiom-cd465d2c88f45cb35d3488dbe0ad24e4ee0e05ab.tar.gz
More cleanups
Diffstat (limited to 'src')
-rw-r--r--src/interp/i-spec1.boot10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot
index c3c0179a..16405b14 100644
--- a/src/interp/i-spec1.boot
+++ b/src/interp/i-spec1.boot
@@ -844,6 +844,16 @@ checkForFreeVariables(v,locals) ==
["getSimpleArrayEntry","envArg",positionInVec(0,#($freeVariables))]
["SETF",newvar,checkForFreeVariables(form,locals)]
error "Non-simple variable bindings are not currently supported"
+ op in '(LET LET_* %Bind) =>
+ vars := [first init for init in first args]
+ inits := [checkInit(init,locals) for init in first args] where
+ checkInit([var,init],locals) ==
+ init := checkForFreeVariables(init,locals)
+ $boundVariables := [var,:$boundVariables]
+ [var,init]
+ body := checkForFreeVariables(rest args,locals)
+ $boundVariables := setDifference($boundVariables,vars)
+ [op,inits,:body]
op = "PROG" =>
error "Non-simple variable bindings are not currently supported"
[op,:[checkForFreeVariables(a,locals) for a in args]]