[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-9-ge0da53
From: |
Mark H Weaver |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-9-ge0da53b |
Date: |
Thu, 24 Apr 2014 22:24:44 +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=e0da53b4fe4abee2cdcd97fe46eeefcaab1da631
The branch, stable-2.0 has been updated
via e0da53b4fe4abee2cdcd97fe46eeefcaab1da631 (commit)
via 4755604501948008849dcc9e114e5c84f355624d (commit)
from fd584ec6707ae5b6e7b07fe19443b513fb0ba62b (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 e0da53b4fe4abee2cdcd97fe46eeefcaab1da631
Author: Mark H Weaver <address@hidden>
Date: Thu Apr 24 17:57:19 2014 -0400
Support weak vectors, arrays, and bitvectors in (system base types).
* module/system/base/types.scm (%tc7-wvect, %tc7-array, %tc7-bitvector):
New variables.
(cell->object): Add cases for weak vectors, arrays, and bitvectors.
commit 4755604501948008849dcc9e114e5c84f355624d
Author: Mark H Weaver <address@hidden>
Date: Thu Apr 24 17:55:47 2014 -0400
print: avoid triggering deprecation warnings when printing weak vectors.
* libguile/print.c (iprin1): Use 'scm_c_weak_vector_ref' to access
elements of weak vectors.
-----------------------------------------------------------------------
Summary of changes:
libguile/print.c | 7 +++++--
module/system/base/types.scm | 9 +++++++++
test-suite/tests/types.test | 8 ++++++++
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/libguile/print.c b/libguile/print.c
index 7e27f76..122e035 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -752,7 +752,7 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
`SIMPLE_VECTOR_REF ()' macro. */
for (i = 0; i < last; ++i)
{
- scm_iprin1 (scm_c_vector_ref (exp, i),
+ scm_iprin1 (scm_c_weak_vector_ref (exp, i),
port, pstate);
scm_putc (' ', port);
}
@@ -769,7 +769,10 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
if (i == last)
{
/* CHECK_INTS; */
- scm_iprin1 (scm_c_vector_ref (exp, i), port, pstate);
+ scm_iprin1 (SCM_I_WVECTP (exp)
+ ? scm_c_weak_vector_ref (exp, i)
+ : SCM_SIMPLE_VECTOR_REF (exp, i),
+ port, pstate);
}
if (cutp)
scm_puts (" ...", port);
diff --git a/module/system/base/types.scm b/module/system/base/types.scm
index 4544a6b..de86bfc 100644
--- a/module/system/base/types.scm
+++ b/module/system/base/types.scm
@@ -242,6 +242,7 @@ the matching bits, possibly with bitwise operations to
extract it from BITS."
(define %tc3-struct 1)
(define %tc7-symbol 5)
(define %tc7-vector 13)
+(define %tc7-wvect 15)
(define %tc7-string 21)
(define %tc7-number 23)
(define %tc7-hashtable 29)
@@ -255,6 +256,8 @@ the matching bits, possibly with bitwise operations to
extract it from BITS."
(define %tc7-vm-continuation 71)
(define %tc7-bytevector 77)
(define %tc7-program 79)
+(define %tc7-array 85)
+(define %tc7-bitvector 87)
(define %tc7-port 125)
(define %tc7-smob 127)
@@ -447,6 +450,8 @@ using BACKEND."
(bytevector->uint-list words (native-endianness)
%word-size)))
vector)))
+ (((_ & #x7f = %tc7-wvect))
+ (inferior-object 'weak-vector address)) ; TODO: show elements
((((n << 8) || %tc7-fluid) init-value)
(inferior-fluid n #f)) ; TODO: show current value
(((_ & #x7f = %tc7-dynamic-state))
@@ -474,6 +479,10 @@ using BACKEND."
(inferior-object 'vm address))
(((_ & #x7f = %tc7-vm-continuation))
(inferior-object 'vm-continuation address))
+ (((_ & #x7f = %tc7-array))
+ (inferior-object 'array address))
+ (((_ & #x7f = %tc7-bitvector))
+ (inferior-object 'bitvector address))
((((smob-type << 8) || %tc7-smob) word1)
(inferior-smob backend smob-type address))))))
diff --git a/test-suite/tests/types.test b/test-suite/tests/types.test
index e05ab11..191662d 100644
--- a/test-suite/tests/types.test
+++ b/test-suite/tests/types.test
@@ -22,6 +22,7 @@
#:use-module (rnrs io ports)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
+ #:use-module (ice-9 weak-vector)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
#:use-module (system foreign)
@@ -102,6 +103,13 @@
((open-input-string "hello") port (? integer?))
((lambda () #t) program _)
((the-vm) vm _)
+ ((make-weak-vector 3 #t) weak-vector _)
+ ((make-hash-table) hash-table _)
+ ((make-weak-key-hash-table) hash-table _)
+ ((make-weak-value-hash-table) hash-table _)
+ ((make-doubly-weak-hash-table) hash-table _)
+ (#2((1 2 3) (4 5 6)) array _)
+ (#*00000110 bitvector _)
((expt 2 70) bignum _))
(pass-if "fluid"
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-9-ge0da53b,
Mark H Weaver <=