diff options
author | dos-reis <gdr@axiomatics.org> | 2010-07-23 21:09:39 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-07-23 21:09:39 +0000 |
commit | 3a373a0b802ee86308db78cba8696aa7b6cdf4df (patch) | |
tree | 108c4c3e28d1fb0c98a0841e9696f51c0e87ec72 /src/interp/g-util.boot | |
parent | 95a01c8b0ae5635b456e34d95bc7b0570a1952b8 (diff) | |
download | open-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.boot | 10 |
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 |