diff options
author | Andy Wingo <wingo@pobox.com> | 2011-11-09 19:36:10 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-11-09 19:38:44 +0100 |
commit | 880e7948126e594d64cbf45c75a66ad3308ce1b3 (patch) | |
tree | 7ebb3217d7c0992c3028d2bf85a45b76fc17d39a /module/language/tree-il/debug.scm | |
parent | 2f4aae6bce7986ad724b374d1a72a6d4c48b462c (diff) | |
download | guile-880e7948126e594d64cbf45c75a66ad3308ce1b3.tar.gz |
inline dynwind guards for normal control flow
* module/language/tree-il.scm (<tree-il>): Add `pre' and `post' fields
to <dynwind>, so that we can inline the guard bodies in the normal
control-flow case. It also avoids duplicating code in compile-glil,
which probably hides more bugs in 2.0.
(parse-tree-il, unparse-tree-il, tree-il->scheme, tree-il-fold)
(make-tree-il-folder, post-order!, pre-order!): Update.
* module/language/tree-il/analyze.scm (analyze-lexicals): Update.
* module/language/tree-il/compile-glil.scm (flatten-lambda-case): Update
to use `pre' and `post' instead of compiling code twice.
* module/language/tree-il/debug.scm (verify-tree-il): Update.
* module/language/tree-il/peval.scm (peval): Update. Instead of doing
complicated things in <dynwind>, handle 'dynamic-wind primcalls.
* module/language/tree-il/primitives.scm (*primitive-expand-table*):
Remove 'dynamic-wind mess. Adapt '@dynamic-wind.
* test-suite/tests/tree-il.test ("partial evaluation"): Update tests.
Diffstat (limited to 'module/language/tree-il/debug.scm')
-rw-r--r-- | module/language/tree-il/debug.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/language/tree-il/debug.scm b/module/language/tree-il/debug.scm index 884f3de9a..a32fc4153 100644 --- a/module/language/tree-il/debug.scm +++ b/module/language/tree-il/debug.scm @@ -215,9 +215,11 @@ (for-each (cut visit <> env) fluids) (for-each (cut visit <> env) vals) (visit body env)))) - (($ <dynwind> src winder body unwinder) + (($ <dynwind> src winder pre body post unwinder) (visit winder env) + (visit pre env) (visit body env) + (visit post env) (visit unwinder env)) (($ <dynref> src fluid) (visit fluid env)) |