summaryrefslogtreecommitdiff
path: root/libguile/vm-engine.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-04-10 13:50:28 +0200
committerAndy Wingo <wingo@pobox.com>2018-04-10 13:50:28 +0200
commit644875cf0e11b3ddd50501b189c17516a63d2ee2 (patch)
tree535f557c2100f58e77c431cabd1878b3e2c403aa /libguile/vm-engine.c
parent21d5897b4c232b83f8bb35496001804a9148e881 (diff)
downloadguile-644875cf0e11b3ddd50501b189c17516a63d2ee2.tar.gz
Remove char->integer from VM
* libguile/vm-engine.c (VM_VALIDATE_CHAR, VM_VALIDATE_STRING) (VM_VALIDATE_INDEX): Remove now-unused helpers. (vm_engine): Fix position of intrinsics declaration. (char->integer): Remove unused opcode. * libguile/vm.c (vm_error_not_a_char, vm_error_not_a_string) (vm_error_out_of_range_uint64): Remove unused decls.
Diffstat (limited to 'libguile/vm-engine.c')
-rw-r--r--libguile/vm-engine.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index 0a0df20e2..05d88aa31 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -318,13 +318,6 @@
#define VM_VALIDATE_ATOMIC_BOX(x, proc) \
VM_VALIDATE (x, scm_is_atomic_box, proc, atomic_box)
-#define VM_VALIDATE_CHAR(x, proc) \
- VM_VALIDATE (x, SCM_CHARP, proc, char)
-#define VM_VALIDATE_STRING(obj, proc) \
- VM_VALIDATE (obj, scm_is_string, proc, string)
-
-#define VM_VALIDATE_INDEX(u64, size, proc) \
- VM_ASSERT (u64 < size, vm_error_out_of_range_uint64 (proc, u64))
/* Return true (non-zero) if PTR has suitable alignment for TYPE. */
#define ALIGNED_P(ptr, type) \
@@ -346,6 +339,8 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
/* Current opcode: A cache of *ip. */
register scm_t_uint32 op;
+ void **intrinsics = (void**) &scm_vm_intrinsics;
+
#ifdef HAVE_LABELS_AS_VALUES
static const void *jump_table_[256] = {
#define LABEL_ADDR(opcode, tag, name, meta) &&op_##tag,
@@ -358,8 +353,6 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
jump_table = jump_table_;
#endif
- void **intrinsics = (void**) &scm_vm_intrinsics;
-
/* Load VM registers. */
CACHE_REGISTER ();
@@ -2838,29 +2831,12 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
VM_DEFINE_OP (173, unused_173, NULL, NOP)
VM_DEFINE_OP (174, unused_174, NULL, NOP)
VM_DEFINE_OP (175, unused_175, NULL, NOP)
+ VM_DEFINE_OP (176, unused_176, NULL, NOP)
{
vm_error_bad_instruction (op);
abort (); /* never reached */
}
- /* char->integer a:12 b:12
- *
- * Untag the character in B to U64, and return it in A.
- */
- VM_DEFINE_OP (176, char_to_integer, "char->integer", OP1 (X8_S12_S12) | OP_DST)
- {
- scm_t_uint16 dst, src;
- SCM x;
-
- UNPACK_12_12 (op, dst, src);
- x = SP_REF (src);
-
- VM_VALIDATE_CHAR (x, "char->integer");
- SP_SET_U64 (dst, SCM_CHAR (x));
-
- NEXT (1);
- }
-
/* ulogxor dst:8 a:8 b:8
*
* Place the bitwise exclusive OR of the u64 values in A and B into