guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 02/02: Fix bug if call-with-prompt tag not a lexical


From: Andy Wingo
Subject: [Guile-commits] 02/02: Fix bug if call-with-prompt tag not a lexical
Date: Sat, 1 May 2021 16:16:49 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit d643913ac2705351fcd44c84d809219ef6375ec7
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Sat May 1 22:14:57 2021 +0200

    Fix bug if call-with-prompt tag not a lexical
    
    * module/language/tree-il/peval.scm (peval): peval could throw if the
    call-with-prompt operand wasn't a lexical.  Terrible!
---
 module/language/tree-il/peval.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/module/language/tree-il/peval.scm 
b/module/language/tree-il/peval.scm
index def4235..123b403 100644
--- a/module/language/tree-il/peval.scm
+++ b/module/language/tree-il/peval.scm
@@ -1,6 +1,6 @@
 ;;; Tree-IL partial evaluator
 
-;; Copyright (C) 2011-2014, 2017, 2019, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2014, 2017, 2019, 2020, 2021 Free Software Foundation, 
Inc.
 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -1650,7 +1650,7 @@ top-level bindings from ENV and return the resulting 
expression."
                 ;; There is no way that an <abort> could know the tag
                 ;; for this <prompt>, so we can elide the <prompt>
                 ;; entirely.
-                (unrecord-operand-uses op 1)
+                (when op (unrecord-operand-uses op 1))
                 (for-tail (if escape-only? body (make-call src body '())))))
           (else
            (let ((handler (for-value handler)))



reply via email to

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