|
From: | Peter Bex |
Subject: | [PATCH] Fix #1756 by replacing rest ops for explicitly consed rest args |
Date: | Wed, 16 Jun 2021 08:45:55 +0200 |
User-agent: | Mutt/1.10.1 (2018-07-13) |
Hi all, The attached patches fix #1756 by detecting when a procedure with a rest argument is converted into a regular procedure with the last argument being a list which is consed up at the call sites (aka an "explicitly consed rest argument"). When this happens, we "undo" the argvector-based rest operations by replacing them with regular car/cdr/length list operations, like we also already do in closure conversion when the rest arg has been reified into a list and stored inside the current closure. To avoid code duplication, there's a commit which first moves that code into a procedure in support.scm, followed by a commit which calls this new procedure in the situation described above. The first commit simply adds tracking of the situation so that we know when a rest argument variable has become an explicitly consed parameter. So, while this is a medium-sized change, hopefully the way the commits are structured should make it easy to review. Cheers, Peter
0001-Add-information-to-the-db-for-rest-args-which-are-ex.patch
Description: Text Data
0002-Refactor-replacing-of-rest-args-to-make-it-reusable.patch
Description: Text Data
0003-Replace-rest-ops-with-list-ops-on-explicitly-consed-.patch
Description: Text Data
signature.asc
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |