aboutsummaryrefslogtreecommitdiff
path: root/src/interp/g-util.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-07-23 21:09:39 +0000
committerdos-reis <gdr@axiomatics.org>2010-07-23 21:09:39 +0000
commit3a373a0b802ee86308db78cba8696aa7b6cdf4df (patch)
tree108c4c3e28d1fb0c98a0841e9696f51c0e87ec72 /src/interp/g-util.boot
parent95a01c8b0ae5635b456e34d95bc7b0570a1952b8 (diff)
downloadopen-axiom-3a373a0b802ee86308db78cba8696aa7b6cdf4df.tar.gz
* interp/g-opt.boot (optBind): Check for dependencies in
initializations in %bind expressions. * interp/g-util.boot (expandBind): The body of s %bind expression may be a sequence of statements.
Diffstat (limited to 'src/interp/g-util.boot')
-rw-r--r--src/interp/g-util.boot10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 5889fc2a..13acbdc6 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -305,16 +305,14 @@ expandFgt ['%fgt,x,y] ==
expandFlt ['%flt,y,x]
-- Local variable bindings
-expandBind ['%bind,inits,body] ==
+expandBind ['%bind,inits,:body] ==
body := expandToVMForm body
inits := [[first x,expandToVMForm second x] for x in inits]
- n := #inits
- n = 0 => body
-- FIXME: we should consider turning LET* into LET or direct inlining.
op :=
- n = 1 => 'LET
- 'LET_*
- [op,inits,body]
+ or/[CONTAINED(v,x) for [[v,.],:x] in tails inits] => 'LET_*
+ 'LET
+ [op,inits,:body]
-- Memory load/store