* the decision criteria for complex primitives (in optimize-letrec)

has changed.  right now, any primitive call is treated as complex.
  further research into what primitive calls can be treated as
  simple is suspended until further notice.
This commit is contained in:
Abdulaziz Ghuloum 2007-05-09 06:30:09 -04:00
parent 509a375871
commit 31b73fd46c
2 changed files with 7 additions and 2 deletions

Binary file not shown.

View File

@ -627,6 +627,11 @@
(Expr x))
(define simple-primitives
;;; primitives that are side-effect-free
;;; FIXME: surely something must go here, no?
'())
(define (optimize-letrec x)
(define who 'optimize-letrec)
(define (extend-hash lhs* h ref)
@ -738,14 +743,14 @@
cls*)
#f)]
[(primcall rator rand*)
(when (memq rator '(call/cc call/cf))
(unless (memq rator simple-primitives)
(comp))
(make-primcall rator (E* rand* ref comp))]
[(funcall rator rand*)
(let ([rator (E rator ref comp)] [rand* (E* rand* ref comp)])
(record-case rator
[(primref op)
(when (memq op '(call/cc call/cf))
(unless (memq op simple-primitives)
(comp))]
[else
(comp)])