mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-13 07:10:20 +02:00
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.
This commit is contained in:
parent
8ee0b28b4d
commit
acdf4fcc05
1 changed files with 13 additions and 30 deletions
|
@ -473,23 +473,6 @@
|
||||||
'dynamic-wind
|
'dynamic-wind
|
||||||
(case-lambda
|
(case-lambda
|
||||||
((src pre thunk post)
|
((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"))
|
(let ((PRE (gensym " pre"))
|
||||||
(THUNK (gensym " thunk"))
|
(THUNK (gensym " thunk"))
|
||||||
(POST (gensym " post")))
|
(POST (gensym " post")))
|
||||||
|
@ -502,7 +485,7 @@
|
||||||
src
|
src
|
||||||
(make-lexical-ref #f 'pre PRE)
|
(make-lexical-ref #f 'pre PRE)
|
||||||
(make-application #f (make-lexical-ref #f 'thunk THUNK) '())
|
(make-application #f (make-lexical-ref #f 'thunk THUNK) '())
|
||||||
(make-lexical-ref #f 'post POST)))))))
|
(make-lexical-ref #f 'post POST)))))
|
||||||
(else #f)))
|
(else #f)))
|
||||||
|
|
||||||
(hashq-set! *primitive-expand-table*
|
(hashq-set! *primitive-expand-table*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue