mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
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.
This commit is contained in:
parent
787f7b644f
commit
a32488ba13
5 changed files with 50 additions and 56 deletions
|
@ -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;
|
||||
|
@ -547,6 +549,19 @@ vm_error_not_a_struct (const char *subr, SCM x)
|
|||
scm_wrong_type_arg_msg (subr, 1, x, "struct");
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue