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 f31819b6b Recognize `make-variable' as primitive f31819b6b is described below commit f31819b6b179429a617c8bd881dbb61219823e39 Author: Andy Wingo <wi...@pobox.com> AuthorDate: Mon Sep 4 10:09:53 2023 +0200 Recognize `make-variable' as primitive * module/language/tree-il/primitives.scm (*interesting-primitive-names*): (*primitive-constructors*): (*effect+exception-free-primitives*): Add make-variable. * module/language/tree-il/cps-primitives.scm (make-variable): Lower as `box' primitive. --- module/language/tree-il/cps-primitives.scm | 4 ++-- module/language/tree-il/primitives.scm | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/module/language/tree-il/cps-primitives.scm b/module/language/tree-il/cps-primitives.scm index 196461904..ab16653ae 100644 --- a/module/language/tree-il/cps-primitives.scm +++ b/module/language/tree-il/cps-primitives.scm @@ -1,6 +1,6 @@ ;;; Continuation-passing style (CPS) intermediate language (IL) -;; Copyright (C) 2013-2015, 2017-2020 Free Software Foundation, Inc. +;; Copyright (C) 2013-2015, 2017-2020, 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 @@ -45,7 +45,7 @@ (define (tree-il-primitive->cps-primitive+nargs+nvalues name) (hashq-ref *primitives* name)) -(define-cps-primitive box 1 1) +(define-cps-primitive (make-variable box) 1 1) (define-cps-primitive (variable-ref box-ref) 1 1) (define-cps-primitive (variable-set! box-set!) 2 0) (define-cps-primitive (%variable-ref %box-ref) 1 1) diff --git a/module/language/tree-il/primitives.scm b/module/language/tree-il/primitives.scm index bcd2a1c05..3ddfb0fbc 100644 --- a/module/language/tree-il/primitives.scm +++ b/module/language/tree-il/primitives.scm @@ -84,7 +84,7 @@ length make-vector vector-length vector-ref vector-set! - variable? variable-ref variable-set! + variable? make-variable variable-ref variable-set! variable-bound? current-module define! @@ -145,7 +145,8 @@ ;; Primitives that return a fresh object. '(acons cons cons* list vector make-vector make-struct/simple - make-prompt-tag)) + make-prompt-tag + make-variable)) (define *primitive-accessors* ;; Primitives that are pure, but whose result depends on the mutable @@ -205,7 +206,7 @@ exact-integer? bytevector? keyword? bitvector? procedure? thunk? atomic-box? - acons cons cons* list vector)) + acons cons cons* list vector make-variable)) ;; Primitives that don't always return one value. (define *multiply-valued-primitives*