gexp: 'gexp-inputs' returns both native and non-native inputs.
authorLudovic Courtès <ludo@gnu.org>
Tue, 16 Feb 2021 20:46:18 +0000 (21:46 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 23 Feb 2021 14:24:48 +0000 (15:24 +0100)
commit4fa9d48fd47df45372fddf2251c3fc0afd48fda0
tree251c7bcac03efdb64254f304d0fc2b72651637b1
parentfc6d6aee6659acb293eb33f498fdac3b47a19a48
gexp: 'gexp-inputs' returns both native and non-native inputs.

This avoids double traversal of references and extra bookkeeping,
thereby further reducing memory allocations.

* guix/gexp.scm (lower-gexp): Include only one call to 'lower-inputs'.
(gexp-inputs): Remove #:native? parameter.
[set-gexp-input-native?]: New procedure.
[add-reference-inputs]: Use it.
(gexp-native-inputs): Remove.
* tests/gexp.scm (gexp-native-inputs): Remove.
(gexp-input->tuple): Include 'gexp-input-native?'.
("let-system")
("let-system, nested")
("ungexp + ungexp-native")
("ungexp + ungexp-native, nested")
("ungexp + ungexp-native, nested, special mixture")
("input list")
("input list + ungexp-native")
("input list splicing")
("input list splicing + ungexp-native-splicing")
("gexp list splicing + ungexp-splicing"): Adjust accordingly.
guix/gexp.scm
tests/gexp.scm