[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-151-g39eb0
From: |
Mark H Weaver |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-151-g39eb0b7 |
Date: |
Sat, 14 Jan 2012 08:34:02 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=39eb0b7297a0e5baad5d3dc34068c854fa4c0c8b
The branch, stable-2.0 has been updated
via 39eb0b7297a0e5baad5d3dc34068c854fa4c0c8b (commit)
from 88c0a1d5911e68aed20675948b15d7e67896df87 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 39eb0b7297a0e5baad5d3dc34068c854fa4c0c8b
Author: Mark H Weaver <address@hidden>
Date: Sat Jan 14 03:27:35 2012 -0500
Fix serialization of #nil-terminated lists during compilation
* module/language/glil/compile-assembly.scm (scheme-list?): New
predicate, like `list?' but requires that the last cdr must be '(),
not #nil.
(dump-object, dump-constants): Use `list' opcode to create a list only
if it is terminated by '(). If it's terminated by #nil, we must use
the more general `cons' opcode.
-----------------------------------------------------------------------
Summary of changes:
module/language/glil/compile-assembly.scm | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/module/language/glil/compile-assembly.scm
b/module/language/glil/compile-assembly.scm
index c76e412..997f7c7 100644
--- a/module/language/glil/compile-assembly.scm
+++ b/module/language/glil/compile-assembly.scm
@@ -103,6 +103,13 @@
(define (immediate? x)
(object->assembly x))
+;; This tests for a proper scheme list whose last cdr is '(), not #nil.
+;;
+(define (scheme-list? x)
+ (or (eq? x '())
+ (and (pair? x)
+ (scheme-list? (cdr x)))))
+
;; Note: in all of these procedures that build up constant tables, the
;; first (zeroth) index is reserved. At runtime it is replaced with the
;; procedure's module. Hence all of this 1+ length business.
@@ -733,7 +740,7 @@
((keyword? x)
`(,@(dump-object (keyword->symbol x) addr)
(make-keyword)))
- ((list? x)
+ ((scheme-list? x)
(let ((tail (let ((len (length x)))
(if (>= len 65536) (too-long "list"))
`((list ,(quotient len 256) ,(modulo len 256))))))
@@ -815,7 +822,7 @@
(values code (addr+ addr code))))
((variable-cache-cell? x)
(dump1 (variable-cache-cell-key x) i addr))
- ((list? x)
+ ((scheme-list? x)
(receive (codes addr)
(fold2 (lambda (x codes addr)
(receive (subcode addr) (ref-or-dump x i addr)
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-151-g39eb0b7,
Mark H Weaver <=