Opened 15 years ago

Closed 14 years ago

#220 closed enhancement (wontfix)

call-with-values rewrite rule for known producer with single-valued body

Reported by: felix winkelmann Owned by:
Priority: not urgent at all Milestone:
Component: compiler Version:
Keywords: optimization call-with-values Cc:
Estimated difficulty:

Description

(call-with-values K P F) with P having a lambda as known value and a body of the form (<CONT> X) where X is a constant, a variable reference, a lambda or a ##core#inline[...] form can be rewritten to (F K X).

Change History (3)

comment:1 Changed 15 years ago by felix winkelmann

Since the producer may refer to bindings not lexically visible in F, a better transformation would be:

([##sys#]call-with-values K P F)

~>

(let ((T1 (lambda (R) (F K R))))   ; continuation lambda
  (P T1))

comment:2 Changed 14 years ago by felix winkelmann

Owner: felix winkelmann deleted
Status: newassigned

comment:3 Changed 14 years ago by felix winkelmann

Resolution: wontfix
Status: assignedclosed

Too much hassle for too little gain.

Note: See TracTickets for help on using tickets.