diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index a47e1b11a..83eefd8bd 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -1488,50 +1488,12 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp, NEXT (2); } - /* box dst:12 src:12 - * - * Create a new variable holding SRC, and place it in DST. - */ - VM_DEFINE_OP (51, box, "box", OP1 (X8_S12_S12) | OP_DST) + VM_DEFINE_OP (51, unused_51, NULL, NOP) + VM_DEFINE_OP (52, unused_52, NULL, NOP) + VM_DEFINE_OP (53, unused_53, NULL, NOP) { - scm_t_uint16 dst, src; - UNPACK_12_12 (op, dst, src); - SYNC_IP (); - SP_SET (dst, scm_inline_cell (thread, scm_tc7_variable, - SCM_UNPACK (SP_REF (src)))); - NEXT (1); - } - - /* box-ref dst:12 src:12 - * - * Unpack the variable at SRC into DST, asserting that the variable is - * actually bound. - */ - VM_DEFINE_OP (52, box_ref, "box-ref", OP1 (X8_S12_S12) | OP_DST) - { - scm_t_uint16 dst, src; - SCM var; - UNPACK_12_12 (op, dst, src); - var = SP_REF (src); - VM_VALIDATE_VARIABLE (var, "variable-ref"); - VM_ASSERT (VARIABLE_BOUNDP (var), vm_error_unbound (var)); - SP_SET (dst, VARIABLE_REF (var)); - NEXT (1); - } - - /* box-set! dst:12 src:12 - * - * Set the contents of the variable at DST to SET. - */ - VM_DEFINE_OP (53, box_set, "box-set!", OP1 (X8_S12_S12)) - { - scm_t_uint16 dst, src; - SCM var; - UNPACK_12_12 (op, dst, src); - var = SP_REF (dst); - VM_VALIDATE_VARIABLE (var, "variable-set!"); - VARIABLE_SET (var, SP_REF (src)); - NEXT (1); + vm_error_bad_instruction (op); + abort (); /* never reached */ } /* make-closure dst:24 offset:32 _:8 nfree:24 diff --git a/libguile/vm.c b/libguile/vm.c index 529205576..2f9969240 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -429,7 +429,6 @@ static void vm_throw_with_value_and_data (SCM val, SCM key_subr_and_message) SCM static void vm_error (const char *msg, SCM arg) SCM_NORETURN; static void vm_error_bad_instruction (scm_t_uint32 inst) SCM_NORETURN SCM_NOINLINE; static void vm_error_unbound (SCM sym) SCM_NORETURN SCM_NOINLINE; -static void vm_error_not_a_variable (const char *func_name, SCM x) SCM_NORETURN SCM_NOINLINE; static void vm_error_apply_to_non_list (SCM x) SCM_NORETURN SCM_NOINLINE; static void vm_error_kwargs_missing_value (SCM proc, SCM kw) SCM_NORETURN SCM_NOINLINE; static void vm_error_kwargs_invalid_keyword (SCM proc, SCM obj) SCM_NORETURN SCM_NOINLINE; @@ -508,13 +507,6 @@ vm_error_unbound (SCM sym) scm_list_1 (sym), SCM_BOOL_F); } -static void -vm_error_not_a_variable (const char *func_name, SCM x) -{ - scm_error (scm_arg_type_key, func_name, "Not a variable: ~S", - scm_list_1 (x), scm_list_1 (x)); -} - static void vm_error_apply_to_non_list (SCM x) { diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index 66555febf..77b2e51cb 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -173,9 +173,6 @@ emit-assert-nargs-ee/locals emit-bind-kwargs emit-bind-rest - emit-box - emit-box-ref - emit-box-set! emit-make-closure emit-free-ref emit-free-set!