diff options
author | Andy Wingo <wingo@pobox.com> | 2014-02-08 17:14:47 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-02-08 17:19:52 +0100 |
commit | a32488ba13e81e51c1fef9fb057bdd805e8b3d72 (patch) | |
tree | 7f664cbefdaad9898f0bb16c6ee84b0e55243493 /libguile/vm.c | |
parent | 787f7b644fa480b4815974c9850d5707881cf9f7 (diff) | |
download | guile-a32488ba13e81e51c1fef9fb057bdd805e8b3d72.tar.gz |
SCM_I_IS_VECTOR only true for tc7_vector, not weak vectors
* libguile/tags.h (SCM_TYP7S, SCM_HAS_TYP7S): Remove these, as we no
longer do the differs-by-one-bit thing for vectors and weak vectors.
* libguile/vectors.h (SCM_I_IS_VECTOR): Use SCM_HAS_TYP7.
(SCM_I_IS_NONWEAK_VECTOR): Remove.
* libguile/vm-engine.c (vector-length, vector-ref, vector-set!)
(vector-ref/immediate, vector-set!/immediate): We can inline these
instructions completely now.
* libguile/vm.c (vm_error_not_a_vector, vm_error_out_of_range): New
error conditions.
Diffstat (limited to 'libguile/vm.c')
-rw-r--r-- | libguile/vm.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libguile/vm.c b/libguile/vm.c index b0918b6bf..4c67d5040 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -423,6 +423,8 @@ static void vm_error_improper_list (SCM x) SCM_NORETURN SCM_NOINLINE; static void vm_error_not_a_pair (const char *subr, SCM x) SCM_NORETURN SCM_NOINLINE; static void vm_error_not_a_bytevector (const char *subr, SCM x) SCM_NORETURN SCM_NOINLINE; static void vm_error_not_a_struct (const char *subr, SCM x) SCM_NORETURN SCM_NOINLINE; +static void vm_error_not_a_vector (const char *subr, SCM v) SCM_NORETURN SCM_NOINLINE; +static void vm_error_out_of_range (const char *subr, SCM k) SCM_NORETURN SCM_NOINLINE; static void vm_error_no_values (void) SCM_NORETURN SCM_NOINLINE; static void vm_error_not_enough_values (void) SCM_NORETURN SCM_NOINLINE; static void vm_error_wrong_number_of_values (scm_t_uint32 expected) SCM_NORETURN SCM_NOINLINE; @@ -548,6 +550,19 @@ vm_error_not_a_struct (const char *subr, SCM x) } static void +vm_error_not_a_vector (const char *subr, SCM x) +{ + scm_wrong_type_arg_msg (subr, 1, x, "vector"); +} + +static void +vm_error_out_of_range (const char *subr, SCM k) +{ + scm_to_size_t (k); + scm_out_of_range (subr, k); +} + +static void vm_error_no_values (void) { vm_error ("Zero values returned to single-valued continuation", |