summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-11-09 16:44:59 +0100
committerAndy Wingo <wingo@pobox.com>2011-11-09 16:54:43 +0100
commitacdf4fcc059df325f66698090359b3455725c865 (patch)
treef9974d946ca139f095b01f88f4674ea7c8ac62ec /module
parent8ee0b28b4d51dac704c151bf7f6d1874018ed3ae (diff)
simplify primitives.scm for dynwind
* module/language/tree-il/primitives.scm (*primitive-expand-table*): Remove a dynwind hack, as we have a good inliner now.
Diffstat (limited to 'module')
-rw-r--r--module/language/tree-il/primitives.scm43
1 files changed, 13 insertions, 30 deletions
diff --git a/module/language/tree-il/primitives.scm b/module/language/tree-il/primitives.scm
index 172150bdf..f7bb5cab2 100644
--- a/module/language/tree-il/primitives.scm
+++ b/module/language/tree-il/primitives.scm
@@ -473,36 +473,19 @@
'dynamic-wind
(case-lambda
((src pre thunk post)
- ;; Here we will make concessions to the fact that our inliner is
- ;; lame, and add a hack.
- (cond
- ((lambda? thunk)
- (let ((PRE (gensym " pre"))
- (POST (gensym " post")))
- (make-let
- src
- '(pre post)
- (list PRE POST)
- (list pre post)
- (make-dynwind
- src
- (make-lexical-ref #f 'pre PRE)
- (make-application #f thunk '())
- (make-lexical-ref #f 'post POST)))))
- (else
- (let ((PRE (gensym " pre"))
- (THUNK (gensym " thunk"))
- (POST (gensym " post")))
- (make-let
- src
- '(pre thunk post)
- (list PRE THUNK POST)
- (list pre thunk post)
- (make-dynwind
- src
- (make-lexical-ref #f 'pre PRE)
- (make-application #f (make-lexical-ref #f 'thunk THUNK) '())
- (make-lexical-ref #f 'post POST)))))))
+ (let ((PRE (gensym " pre"))
+ (THUNK (gensym " thunk"))
+ (POST (gensym " post")))
+ (make-let
+ src
+ '(pre thunk post)
+ (list PRE THUNK POST)
+ (list pre thunk post)
+ (make-dynwind
+ src
+ (make-lexical-ref #f 'pre PRE)
+ (make-application #f (make-lexical-ref #f 'thunk THUNK) '())
+ (make-lexical-ref #f 'post POST)))))
(else #f)))
(hashq-set! *primitive-expand-table*