diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 386c9887..3412327d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-12-15 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot (modified?): Tidy. + +2011-12-15 Gabriel Dos Reis <gdr@cs.tamu.edu> + * lisp/core.lisp.in: Do not require SB-SPROF or SB-POSIX on Windows. 2011-12-14 Gabriel Dos Reis <gdr@cs.tamu.edu> diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index c2e18d41..0236e4f4 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -657,13 +657,18 @@ findVMFreeVars form == setUnion(findVMFreeVars op,vars) ++ Return true is `var' is the left hand side of an assignment -++ in `form'. +++ or a sort of binding in `form'. modified?(var,form) == atomic? form => false form is [op,var',expr,:.] and op in '(%LET LETT SETQ %store) => modified?(var,expr) => true symbol? var' => var' = var -- whole var is assigned - var' is [.,=var] -- only part of it is modified + var' is [.,=var,:.] -- only part of it is modified + form is ['%bind,:.] and + (or/[symbolEq?(var,var') for [var',.] in form.absParms]) => true + form is ['%loop,:iters,.,.] and + (or/[symbolEq?(var,iteratorName i) for i in iters]) => true + abstraction? form and symbolMember?(var,form.absParms) => true or/[modified?(var,f) for f in form] @@ -695,6 +700,7 @@ canInlineVarDefinition(var,expr,body) == or/[modified?(x,body) for x in dependentVars expr] => false -- If the initializer is a variable and not modified in body, -- and the new var is not modified, then we can inline. + -- FIXME: except if the modification is done via normal function calls. ident? expr => true -- Conversatively stay out of loops cons? body and body.op in '(%loop %collect) => false |