* 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:
parent
509a375871
commit
31b73fd46c
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -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)])
|
||||
|
|
Loading…
Reference in New Issue