unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#33652: let/ec bug
@ 2018-12-06 22:34 Stefan Israelsson Tampe
  2018-12-11 21:03 ` bug#33652: The optimization that fails Stefan Israelsson Tampe
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Israelsson Tampe @ 2018-12-06 22:34 UTC (permalink / raw)
  To: 33652

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

The following code does not compile on guile-2.9:

--------------------------------------------
(define-module (r)
  #:use-module (ice-9 control)
  #:export ())

(define ramanujan
  (lambda ()
  (let/ec break-ret
    (let lp ()
      (break-ret)
      (lp)))))
----------------------------------------------

The error report
;; WARNING: compilation of /home/stis/src/python-on-guile/modules/langua
ge/python/module/r.scm failed:
;;; not found 37

Regards
Stefan

[-- Attachment #2: Type: text/html, Size: 905 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#33652: The optimization that fails
  2018-12-06 22:34 bug#33652: let/ec bug Stefan Israelsson Tampe
@ 2018-12-11 21:03 ` Stefan Israelsson Tampe
  2018-12-12 21:45 ` bug#33652: Possible fix Stefan Israelsson Tampe
  2019-05-08 20:32 ` bug#33652: close thanks Andy Wingo
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Israelsson Tampe @ 2018-12-11 21:03 UTC (permalink / raw)
  To: 33652

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

(define f
  (compile
    '(lambda ()
       (let/ec b
         (let lp ()
            (b)
            (lp))))
      #:env (current-module) #:opts '(#:contify? #f)))

compiles so the issue is in the contify section of the optimizer.

[-- Attachment #2: Type: text/html, Size: 1049 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#33652: Possible fix
  2018-12-06 22:34 bug#33652: let/ec bug Stefan Israelsson Tampe
  2018-12-11 21:03 ` bug#33652: The optimization that fails Stefan Israelsson Tampe
@ 2018-12-12 21:45 ` Stefan Israelsson Tampe
  2019-05-08 20:32 ` bug#33652: close thanks Andy Wingo
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Israelsson Tampe @ 2018-12-12 21:45 UTC (permalink / raw)
  To: 33652

[-- Attachment #1: Type: text/plain, Size: 790 bytes --]

When I apply this to head master:

diff --git a/module/language/cps/simplify.scm b/module/language/cps/simpl
ify.scm
index 311566043..b6fcffcd1 100644
--- a/module/language/cps/simplify.scm
+++ b/module/language/cps/simplify.scm
@@ -149,6 +149,9 @@
              (($ $kargs names syms ($ $branch kf kt src op param args))
               ($kargs names syms
                 ($branch (subst kf) (subst kt) src op param args)))
+              (($ $kargs names syms ($ $prompt k kh src escape? tag))
+               ($kargs names syms
+                 ($prompt (subst k) (subst kh) src escape? tag)))
              (($ $kargs names syms ($ $continue k src ($ $const val)))
               ,(match (intmap-ref conts k)
                  (($ $kargs (_)

Things compiles just fine

Regards
Stefan

[-- Attachment #2: Type: text/html, Size: 2007 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#33652: close thanks
  2018-12-06 22:34 bug#33652: let/ec bug Stefan Israelsson Tampe
  2018-12-11 21:03 ` bug#33652: The optimization that fails Stefan Israelsson Tampe
  2018-12-12 21:45 ` bug#33652: Possible fix Stefan Israelsson Tampe
@ 2019-05-08 20:32 ` Andy Wingo
  2 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2019-05-08 20:32 UTC (permalink / raw)
  To: 33652

close
thanks

Fixed in master.  Thanks very much for the report and patch!





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-08 20:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 22:34 bug#33652: let/ec bug Stefan Israelsson Tampe
2018-12-11 21:03 ` bug#33652: The optimization that fails Stefan Israelsson Tampe
2018-12-12 21:45 ` bug#33652: Possible fix Stefan Israelsson Tampe
2019-05-08 20:32 ` bug#33652: close thanks Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).