[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] branch main updated: peval cross-module-inlining gracefu
From: |
Andy Wingo |
Subject: |
[Guile-commits] branch main updated: peval cross-module-inlining gracefully handles missing interface |
Date: |
Mon, 17 Jan 2022 15:26:42 -0500 |
This is an automated email from the git hooks/post-receive script.
wingo pushed a commit to branch main
in repository guile.
The following commit(s) were added to refs/heads/main by this push:
new 373f35b5f peval cross-module-inlining gracefully handles missing
interface
373f35b5f is described below
commit 373f35b5f7c4ad211f9ff2920d736d9ad2dcbd7e
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Mon Jan 17 21:25:08 2022 +0100
peval cross-module-inlining gracefully handles missing interface
* module/language/tree-il/peval.scm (peval): The intention was for
resolve-interface to return an interface only if it exists, but actually
it throws if the interface isn't know. Fix to do what we intended to
do.
---
module/language/tree-il/peval.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/module/language/tree-il/peval.scm
b/module/language/tree-il/peval.scm
index d910088c9..e2d98f946 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, 2021 Free Software Foundation,
Inc.
+;; Copyright (C) 2011-2014, 2017, 2019, 2020, 2021, 2022 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
@@ -1072,10 +1072,12 @@ top-level bindings from ENV and return the resulting
expression."
(cond
((and cross-module-inlining?
public?
- (and=> (resolve-interface module)
+ (and=> (resolve-module module #:ensure #f)
(lambda (module)
- (and=> (module-inlinable-exports module)
- (lambda (proc) (proc name))))))
+ (and=> (module-public-interface module)
+ (lambda (iface)
+ (and=> (module-inlinable-exports iface)
+ (lambda (proc) (proc name))))))))
=> (lambda (inlined)
;; Similar logic to lexical-ref, but we can't enumerate
;; uses, and don't know about aliases.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] branch main updated: peval cross-module-inlining gracefully handles missing interface,
Andy Wingo <=