aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-12-13 03:20:31 +0000
committerdos-reis <gdr@axiomatics.org>2011-12-13 03:20:31 +0000
commit2b67e7c6078a1fe400bcac82fd5b071cee643f8f (patch)
tree256f6b18267054c25440025b1ad360b7448064e4
parent5f863b1ca407b898fd3bf788cb3aaffdb2701d2b (diff)
downloadopen-axiom-2b67e7c6078a1fe400bcac82fd5b071cee643f8f.tar.gz
* 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.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/g-opt.boot10
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,5 +1,12 @@
2011-12-12 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * 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 <gdr@cs.tamu.edu>
+
* interp/g-opt.boot (packWhen!): Tidy.
(spliceSeq!): New.
(optimize!): Run splice! packWhen! twice.
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:"