1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-20 02:30:23 +02:00
Conflicts:
	libguile/foreign.c
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
This commit is contained in:
Andy Wingo 2012-01-30 18:25:07 +01:00
commit 855db1905d
331 changed files with 1929 additions and 817 deletions

View file

@ -103,6 +103,15 @@
(define (immediate? x)
(object->assembly x))
;; This tests for a proper scheme list whose last cdr is '(), not #nil.
;;
(define (scheme-list? x)
(and (list? x)
(or (eq? x '())
(let ((p (last-pair x)))
(and (pair? p)
(eq? (cdr p) '()))))))
;; 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 +742,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 +824,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)