emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#9844: closed (peval & dynamic-wind)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#9844: closed (peval & dynamic-wind)
Date: Wed, 09 Nov 2011 16:00:03 +0000

Your message dated Wed, 09 Nov 2011 16:58:45 +0100
with message-id <address@hidden>
and subject line Re: bug#9844: peval & dynamic-wind
has caused the debbugs.gnu.org bug report #9844,
regarding peval & dynamic-wind
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9844: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9844
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: peval & dynamic-wind Date: Sun, 23 Oct 2011 12:48:43 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
I'm getting incorrect results in v2.0.3 when combining
dynamic-wind+call/cc with partial evaluation. In the program below, the
before-thunk is supposed to protect against reentry into the
body-thunk. However, with partial-evaluation turned on it doesn't error.


(define (test peval?)
  (compile
   '(let ()
      (define (rewind-protect thunk protector)
        (dynamic-wind
          (let ((entered? #f))
            (lambda ()
              (if entered?
                  (error "Re-entering rewind-protected extent."))
              (set! entered? #t)))
          thunk
          protector))
      ((call/cc
        (lambda (k)
          (rewind-protect
           (lambda ()
             (call/cc k)
             (lambda _ 'not-supposed-to-happen))
           (lambda () #f))))
       #f))
   #:opts `(#:partial-eval? ,peval?)))

;; scheme@(guile−user)> (test #t)
;; $1 = not−supposed−to−happen
;; scheme@(guile−user)> (test #f)
;; ERROR: In procedure scm−error:
;; ERROR: Re−entering rewind−protected extent.

;; Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
;; scheme@(#{ g256}#) [1]> ,q
;; scheme@(guile−user)>


If I place a (format #t "entered? ~s~%" entered?) before the (set!
entered? #t), I see


entered? #f
entered? #f
$2 = not−supposed−to−happen


which tells me that the earlier mutation isn't effecting later continuations.

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"



--- End Message ---
--- Begin Message --- Subject: Re: bug#9844: peval & dynamic-wind Date: Wed, 09 Nov 2011 16:58:45 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
On Sun 23 Oct 2011 13:48, Ian Price <address@hidden> writes:

> I'm getting incorrect results in v2.0.3 when combining
> dynamic-wind+call/cc with partial evaluation.

Sorry it's taken so long, but this is fixed now in stable-2.0

Thanks for the report,

Andy
-- 
http://wingolog.org/


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]