guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-9-37-g7b7


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-9-37-g7b702b5
Date: Thu, 01 Apr 2010 07:07: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=7b702b5391fb54114307636934e4d28101655093

The branch, master has been updated
       via  7b702b5391fb54114307636934e4d28101655093 (commit)
      from  a587d6a97338a0fd62173e60581ff07f55ec2042 (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 7b702b5391fb54114307636934e4d28101655093
Author: Andy Wingo <address@hidden>
Date:   Thu Apr 1 09:05:59 2010 +0200

    fix vector-ref and vector-set opcodes for weak vectors
    
    * libguile/vectors.h (SCM_I_IS_NONWEAK_VECTOR): New internal predicate.
    * libguile/vm-i-scheme.c (vector-ref, vector-set): Only inline access to
      nonweak vectors.

-----------------------------------------------------------------------

Summary of changes:
 libguile/vectors.h     |    1 +
 libguile/vm-i-scheme.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libguile/vectors.h b/libguile/vectors.h
index 7f74519..3746e90 100644
--- a/libguile/vectors.h
+++ b/libguile/vectors.h
@@ -68,6 +68,7 @@ SCM_API SCM *scm_vector_writable_elements (SCM vec,
 #define SCM_I_VECTOR_HEADER_SIZE  2U
 
 #define SCM_I_IS_VECTOR(x)     (!SCM_IMP(x) && (SCM_TYP7S(x)==scm_tc7_vector))
+#define SCM_I_IS_NONWEAK_VECTOR(x) (!SCM_IMP(x) && 
(SCM_TYP7(x)==scm_tc7_vector))
 #define SCM_I_VECTOR_ELTS(x)   ((const SCM *) SCM_I_VECTOR_WELTS (x))
 #define SCM_I_VECTOR_WELTS(x)  (SCM_CELL_OBJECT_LOC (x, 
SCM_I_VECTOR_HEADER_SIZE))
 #define SCM_I_VECTOR_LENGTH(x) (((size_t) SCM_CELL_WORD_0 (x)) >> 8)
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c
index df31810..af052af 100644
--- a/libguile/vm-i-scheme.c
+++ b/libguile/vm-i-scheme.c
@@ -346,7 +346,7 @@ VM_DEFINE_FUNCTION (161, vector_ref, "vector-ref", 2)
 {
   long i = 0;
   ARGS2 (vect, idx);
-  if (SCM_LIKELY (SCM_I_IS_VECTOR (vect)
+  if (SCM_LIKELY (SCM_I_IS_NONWEAK_VECTOR (vect)
                   && SCM_I_INUMP (idx)
                   && ((i = SCM_I_INUM (idx)) >= 0)
                   && i < SCM_I_VECTOR_LENGTH (vect)))
@@ -363,7 +363,7 @@ VM_DEFINE_INSTRUCTION (162, vector_set, "vector-set", 0, 3, 
0)
   long i = 0;
   SCM vect, idx, val;
   POP (val); POP (idx); POP (vect);
-  if (SCM_LIKELY (SCM_I_IS_VECTOR (vect)
+  if (SCM_LIKELY (SCM_I_IS_NONWEAK_VECTOR (vect)
                   && SCM_I_INUMP (idx)
                   && ((i = SCM_I_INUM (idx)) >= 0)
                   && i < SCM_I_VECTOR_LENGTH (vect)))


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]