1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 01:00:20 +02:00

Remove VM struct-ref, etc instructions

* libguile/vm-engine.c (VM_VALIDATE_STRUCT)
  (VM_VALIDATE_BOXED_STRUCT_FIELD, VM_VALIDATE_UNBOXED_STRUCT_FIELD)
  (struct-ref, struct-set!, struct-vtable, allocate-struct)
  (allocate-struct/immediate, struct-ref/immediate)
  (struct-set!/immediate): Remove these opcodes.
* libguile/vm.c: Remove error cases for struct ops.
This commit is contained in:
Andy Wingo 2018-01-22 07:42:59 +01:00
parent dd203e5d7d
commit fcea9eeabd
2 changed files with 7 additions and 182 deletions

View file

@ -438,10 +438,7 @@ static void vm_error_wrong_type_apply (SCM proc) SCM_NORETURN SCM_NOINLINE;
static void vm_error_not_a_char (const char *subr, SCM x) SCM_NORETURN SCM_NOINLINE;
static void vm_error_not_a_string (const char *subr, SCM x) SCM_NORETURN SCM_NOINLINE;
static void vm_error_not_a_atomic_box (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_out_of_range_uint64 (const char *subr, scm_t_uint64 idx) SCM_NORETURN SCM_NOINLINE;
static void vm_error_boxed_struct_field (const char *subr, scm_t_uint64 idx) SCM_NORETURN SCM_NOINLINE;
static void vm_error_unboxed_struct_field (const char *subr, scm_t_uint64 idx) 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;
@ -566,30 +563,12 @@ vm_error_not_a_atomic_box (const char *subr, SCM x)
scm_wrong_type_arg_msg (subr, 1, x, "atomic box");
}
static void
vm_error_not_a_struct (const char *subr, SCM x)
{
scm_wrong_type_arg_msg (subr, 1, x, "struct");
}
static void
vm_error_out_of_range_uint64 (const char *subr, scm_t_uint64 idx)
{
scm_out_of_range (subr, scm_from_uint64 (idx));
}
static void
vm_error_boxed_struct_field (const char *subr, scm_t_uint64 idx)
{
scm_wrong_type_arg_msg (subr, 2, scm_from_uint64 (idx), "boxed field");
}
static void
vm_error_unboxed_struct_field (const char *subr, scm_t_uint64 idx)
{
scm_wrong_type_arg_msg (subr, 2, scm_from_uint64 (idx), "unboxed field");
}
static void
vm_error_no_values (void)
{