diff options
author | dos-reis <gdr@axiomatics.org> | 2011-12-06 19:36:20 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-12-06 19:36:20 +0000 |
commit | 682a48e0c01c5cc090858c8300857ef5d01d30ba (patch) | |
tree | 6db6fd6132a19769dd4bef68fdb70a8c853c3d7e | |
parent | 8fb518856f8163bbea25d6033a844c277a91c19a (diff) | |
download | open-axiom-682a48e0c01c5cc090858c8300857ef5d01d30ba.tar.gz |
* interp/compiler.boot (setqMultipleExplicit): Introduced
temporary variables are local to the assignment.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/compiler.boot | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dcbf4bc6..4c2466d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-12-06 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/compiler.boot (setqMultipleExplicit): Introduced + temporary variables are local to the assignment. + +2011-12-06 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/compiler.boot (compResolveCall): Update description. (compRetractGuard): Tidy. (compRecoverDomain): Likewise. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index d2dfd84b..59ea4e90 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1022,17 +1022,16 @@ setqMultipleExplicit(nameList,valList,m,e) == #nameList~=#valList => stackMessage('"Multiple assignment error; # of items in: %1b must = # in: %2",[nameList,valList]) gensymList:= [genVariable() for name in nameList] - assignList:= - --should be fixed to declare genVar when possible - [[.,.,e]:= compSetq1(g,val,$EmptyMode,e) or return "failed" - for g in gensymList for val in valList] - assignList="failed" => nil - reAssignList:= - [[.,.,e]:= compSetq1(name,g,$EmptyMode,e) or return "failed" + bindings := --should be fixed to declare genVar when possible + [insn.args for g in gensymList for val in valList + | [insn,.,e] := compSetq1(g,val,$EmptyMode,e) or leave "failed" ] + bindings is "failed" => nil + reAssignList := + [[.,.,e] := compSetq1(name,g,$EmptyMode,e) or return "failed" for g in gensymList for name in nameList] - reAssignList="failed" => nil - [['%seq,:[T.expr for T in assignList],:[T.expr for T in reAssignList]], - $NoValueMode, last(reAssignList).env] + reAssignList is "failed" => nil + [['%bind,bindings,['%seq,:[T.expr for T in reAssignList]]], + $NoValueMode, last(reAssignList).env] --% Quasiquotation |