[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/15: grafts: Inline 'grafting?' and 'set-grafting'.
From: |
guix-commits |
Subject: |
13/15: grafts: Inline 'grafting?' and 'set-grafting'. |
Date: |
Tue, 23 Feb 2021 08:34:03 -0500 (EST) |
civodul pushed a commit to branch wip-build-systems-gexp
in repository guix.
commit 966574b794e2500ca633d44aef216edc35980796
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Feb 19 22:19:41 2021 +0100
grafts: Inline 'grafting?' and 'set-grafting'.
As for 'current-target-system' & co., this makes sure we don't
needlessly allocate closures.
* guix/grafts.scm (grafting?, set-grafting): Inline.
---
guix/grafts.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/guix/grafts.scm b/guix/grafts.scm
index 910dcad..fd8a108 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès
<ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès
<ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -323,14 +323,14 @@ DRV, and graft DRV itself to refer to those grafted
dependencies."
;; Whether to honor package grafts by default.
(make-parameter #t))
-(define (set-grafting enable?)
- "This monadic procedure enables grafting when ENABLE? is true, and disables
-it otherwise. It returns the previous setting."
+(define-inlinable (set-grafting enable?)
+ ;; This monadic procedure enables grafting when ENABLE? is true, and
+ ;; disables it otherwise. It returns the previous setting.
(lambda (store)
(values (%graft? enable?) store)))
-(define (grafting?)
- "Return a Boolean indicating whether grafting is enabled."
+(define-inlinable (grafting?)
+ ;; Return a Boolean indicating whether grafting is enabled.
(lambda (store)
(values (%graft?) store)))
- 03/15: packages: Simplify patch instantiation., (continued)
- 03/15: packages: Simplify patch instantiation., guix-commits, 2021/02/23
- 05/15: gexp: Micro-optimize sexp serialization., guix-commits, 2021/02/23
- 09/15: gexp: Keep 'lower-inputs' private., guix-commits, 2021/02/23
- 06/15: squash! build-system: Rewrite using gexps., guix-commits, 2021/02/23
- 11/15: store: Object cache profiling shows the number of entries., guix-commits, 2021/02/23
- 10/15: gexp: Micro-optimize 'gexp->sexp' and 'lower-inputs'., guix-commits, 2021/02/23
- 08/15: gexp: 'gexp-inputs' returns both native and non-native inputs., guix-commits, 2021/02/23
- 14/15: store: Micro-optimize object cache lookup., guix-commits, 2021/02/23
- 04/15: packages: Core procedures are written in monadic style., guix-commits, 2021/02/23
- 02/15: packages: Turn 'bag->derivation' into a monadic procedure., guix-commits, 2021/02/23
- 13/15: grafts: Inline 'grafting?' and 'set-grafting'.,
guix-commits <=
- 07/15: gexp: 'gexp-inputs' returns a list of <gexp-input> records., guix-commits, 2021/02/23
- 12/15: gexp: Reduce allocations while traversing lists., guix-commits, 2021/02/23
- 01/15: build-system: Rewrite using gexps., guix-commits, 2021/02/23
- 15/15: gexp: Reduce allocations in 'gexp-attribute'., guix-commits, 2021/02/23