diff options
author | Andy Wingo <wingo@pobox.com> | 2021-04-25 20:27:34 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2021-04-25 20:27:34 +0200 |
commit | 976433d667e2502c25f8f6ac8eef04b7d472df6d (patch) | |
tree | fdb1671b3d8ea8ddb8f798723687049ac5d69cc9 /module | |
parent | 5809279b9949692469d98a843227cd242217bea3 (diff) | |
download | guile-976433d667e2502c25f8f6ac8eef04b7d472df6d.tar.gz |
Fix cached-module-box cache keys
* module/language/cps/reify-primitives.scm (cached-module-box): Include
public? in cache key, so we don't accidentally alias private and
exported names. Also include bound?, to avoid a window in which thread
A resolves and caches var V in preparation for setting it, but thread B
sees V for ref before it was initialized.
Diffstat (limited to 'module')
-rw-r--r-- | module/language/cps/reify-primitives.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/language/cps/reify-primitives.scm b/module/language/cps/reify-primitives.scm index 494f1ca56..710ad6ff0 100644 --- a/module/language/cps/reify-primitives.scm +++ b/module/language/cps/reify-primitives.scm @@ -1,6 +1,6 @@ ;;; Continuation-passing style (CPS) intermediate language (IL) -;; Copyright (C) 2013-2020 Free Software Foundation, Inc. +;; Copyright (C) 2013-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 @@ -224,7 +224,7 @@ (define-ephemeral (cached-module-box cps k src param) (match param ((module name public? bound?) - (let ((cache-key (cons module name))) + (let ((cache-key param)) (with-cps cps (letv mod cached) (let$ lookup |