[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 11/19: Contification uses 'cons primcall
From: |
Andy Wingo |
Subject: |
[Guile-commits] 11/19: Contification uses 'cons primcall |
Date: |
Thu, 22 Jun 2023 10:12:47 -0400 (EDT) |
wingo pushed a commit to branch main
in repository guile.
commit a80a5ade781f534959ad12b8c316d1bbb7673758
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Thu Jun 22 12:21:10 2023 +0200
Contification uses 'cons primcall
* module/language/cps/contification.scm (apply-contification): Reify
'cons instead of using the lower-level scm-set! etc.
---
module/language/cps/contification.scm | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/module/language/cps/contification.scm
b/module/language/cps/contification.scm
index 7a05fa241..5167e4d3a 100644
--- a/module/language/cps/contification.scm
+++ b/module/language/cps/contification.scm
@@ -1,6 +1,6 @@
;;; Continuation-passing style (CPS) intermediate language (IL)
-;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2021, 2023 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
@@ -426,20 +426,11 @@ function set."
(build-term ($continue k src ($const '())))))
((v . vals)
(with-cps cps
- (letv pair tail)
- (letk kdone ($kargs () () ($continue k src ($values (pair)))))
- (letk ktail
- ($kargs () ()
- ($continue kdone src
- ($primcall 'scm-set!/immediate '(pair . 1) (pair tail)))))
- (letk khead
- ($kargs ('pair) (pair)
- ($continue ktail src
- ($primcall 'scm-set!/immediate '(pair . 0) (pair v)))))
+ (letv tail)
(letk ktail
($kargs ('tail) (tail)
- ($continue khead src
- ($primcall 'allocate-words/immediate '(pair . 2) ()))))
+ ($continue k src
+ ($primcall 'cons #f (v tail)))))
($ (build-list ktail src vals))))))
(cond
((and (not rest) (eqv? (length vals) nreq))
- [Guile-commits] 16/19: Tree-IL-to-CPS lowers to high-level object reprs: structs, (continued)
- [Guile-commits] 16/19: Tree-IL-to-CPS lowers to high-level object reprs: structs, Andy Wingo, 2023/06/22
- [Guile-commits] 13/19: Tree-IL-to-CPS lowers to high-level object representations: boxes, Andy Wingo, 2023/06/22
- [Guile-commits] 15/19: Tree-IL-to-CPS lowers to high-level object reprs: pairs, Andy Wingo, 2023/06/22
- [Guile-commits] 18/19: Tree-IL-to-CPS lowers to high-level object reprs: strings, Andy Wingo, 2023/06/22
- [Guile-commits] 19/19: Tree-IL-to-CPS lowers to high-level object reprs: vectors, Andy Wingo, 2023/06/22
- [Guile-commits] 01/19: Fix target-max-size-t/scm to not be a fraction (oops), Andy Wingo, 2023/06/22
- [Guile-commits] 09/19: Remove useless code in CSE, Andy Wingo, 2023/06/22
- [Guile-commits] 12/19: Closure conversion produces high-level object representations, Andy Wingo, 2023/06/22
- [Guile-commits] 10/19: DCE ignores setters to dead objects, Andy Wingo, 2023/06/22
- [Guile-commits] 17/19: Tree-IL-to-CPS lowers to high-level object reprs: bytevectors, Andy Wingo, 2023/06/22
- [Guile-commits] 11/19: Contification uses 'cons primcall,
Andy Wingo <=
- [Guile-commits] 14/19: Tree-IL-to-CPS lowers to high-level object reprs: atomic boxes, Andy Wingo, 2023/06/22