From 2b67e7c6078a1fe400bcac82fd5b071cee643f8f Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 13 Dec 2011 03:20:31 +0000 Subject: * interp/g-opt.boot: Rework. Schedule conditional splitting before changing %LETs to %stores. Run beta reduction and condtional splitting afterward, one more time. (optimizeFunctionDef): Simplify. --- src/ChangeLog | 7 +++++++ src/interp/g-opt.boot | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e8f198e6..2a2a5186 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-12-12 Gabriel Dos Reis + + * interp/g-opt.boot: Rework. Schedule conditional splitting + before changing %LETs to %stores. Run beta reduction and + condtional splitting afterward, one more time. + (optimizeFunctionDef): Simplify. + 2011-12-12 Gabriel Dos Reis * interp/g-opt.boot (packWhen!): Tidy. diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index bdca2d74..20b1b962 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -318,8 +318,10 @@ spliceSeq! x == walkWith!(x,function f) where ++ a lower intermediate form, applying several transformations ++ generaly intended to improve quality and efficiency. optimize! x == - simplifyVMForm spliceSeq! packWhen! spliceSeq! packWhen! transformIF! - removeSeq! inlineLocals! groupTranscients! reduceXLAM! x + x := spliceSeq! packWhen! transformIF! x + changeVariableDefinitionToStore(x,nil) + simplifyVMForm spliceSeq! packWhen! inlineLocals! + groupTranscients! removeSeq! reduceXLAM! x ++ A non-mutating version of `optimize!'. optimize x == @@ -330,9 +332,7 @@ optimizeFunctionDef(def) == sayBrightlyI bright '"Original LISP code:" pp def - expr := copyTree second def - changeVariableDefinitionToStore(expr.absBody,expr.absParms) - expr := optimize! expr + expr := optimize! copyTree second def if $reportOptimization then sayBrightlyI bright '"Intermediate VM code:" -- cgit v1.2.3