scm_rtl_op_* -> scm_op_*
authorAndy Wingo <wingo@pobox.com>
Tue, 19 Nov 2013 19:31:21 +0000 (20:31 +0100)
committerAndy Wingo <wingo@pobox.com>
Tue, 19 Nov 2013 19:46:10 +0000 (20:46 +0100)
* libguile/instructions.h (scm_opcode): Rename from scm_rtl_opcode.
  Rename opcodes from scm_rtl_op_* to scm_op_*.

* libguile/continuations.c:
* libguile/control.c:
* libguile/foreign.c:
* libguile/gsubr.c:
* libguile/instructions.c:
* libguile/vm.c: Adapt.

libguile/continuations.c
libguile/control.c
libguile/foreign.c
libguile/gsubr.c
libguile/instructions.c
libguile/instructions.h
libguile/vm.c

index 90c9ccf..8d85994 100644 (file)
@@ -65,7 +65,7 @@ static scm_t_bits tc16_continuation;
 
 static const scm_t_uint32 continuation_stub_code[] =
   {
-    SCM_PACK_RTL_24 (scm_rtl_op_continuation_call, 0)
+    SCM_PACK_RTL_24 (scm_op_continuation_call, 0)
   };
 
 static SCM
index dbd6522..a57300a 100644 (file)
@@ -59,7 +59,7 @@ scm_i_prompt_pop_abort_args_x (SCM vm)
 
 static const scm_t_uint32 compose_continuation_code[] =
   {
-    SCM_PACK_RTL_24 (scm_rtl_op_compose_continuation, 0)
+    SCM_PACK_RTL_24 (scm_op_compose_continuation, 0)
   };
 
 
index 2ec0a1e..11c0f36 100644 (file)
@@ -766,10 +766,10 @@ SCM_DEFINE (scm_pointer_to_procedure, "pointer->procedure", 3, 0, 0,
 /* We support calling foreign functions with up to 100 arguments. */
 
 #define CODE(nreq)                                                  \
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ee, nreq + 1),           \
-  SCM_PACK_RTL_12_12 (scm_rtl_op_foreign_call, 0, 1)
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ee, nreq + 1),               \
+  SCM_PACK_RTL_12_12 (scm_op_foreign_call, 0, 1)
 
-#define CODE_10(n)                                               \
+#define CODE_10(n)                                                      \
   CODE (n + 0), CODE (n + 1), CODE (n + 2), CODE (n + 3), CODE (n + 4), \
   CODE (n + 5), CODE (n + 6), CODE (n + 7), CODE (n + 8), CODE (n + 9)
 
index f089a41..1969dbf 100644 (file)
 
 /* A: req; B: opt; C: rest */
 #define A(nreq)                                                         \
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ee, nreq + 1),               \
-  SCM_PACK_RTL_24 (scm_rtl_op_subr_call, 0),                            \
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ee, nreq + 1),                   \
+  SCM_PACK_RTL_24 (scm_op_subr_call, 0),                                \
   0,                                                                    \
   0
 
 #define B(nopt)                                                         \
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_le, nopt + 1),               \
-  SCM_PACK_RTL_24 (scm_rtl_op_alloc_frame, nopt + 1),                   \
-  SCM_PACK_RTL_24 (scm_rtl_op_subr_call, 0),                            \
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_le, nopt + 1),                   \
+  SCM_PACK_RTL_24 (scm_op_alloc_frame, nopt + 1),                       \
+  SCM_PACK_RTL_24 (scm_op_subr_call, 0),                                \
   0
 
 #define C()                                                             \
-  SCM_PACK_RTL_24 (scm_rtl_op_bind_rest, 1),                            \
-  SCM_PACK_RTL_24 (scm_rtl_op_subr_call, 0),                            \
+  SCM_PACK_RTL_24 (scm_op_bind_rest, 1),                                \
+  SCM_PACK_RTL_24 (scm_op_subr_call, 0),                                \
   0,                                                                    \
   0
 
 #define AB(nreq, nopt)                                                  \
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ge, nreq + 1),               \
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_le, nreq + nopt + 1),        \
-  SCM_PACK_RTL_24 (scm_rtl_op_alloc_frame, nreq + nopt + 1),            \
-  SCM_PACK_RTL_24 (scm_rtl_op_subr_call, 0)
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ge, nreq + 1),                   \
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_le, nreq + nopt + 1),            \
+  SCM_PACK_RTL_24 (scm_op_alloc_frame, nreq + nopt + 1),                \
+  SCM_PACK_RTL_24 (scm_op_subr_call, 0)
 
 #define AC(nreq)                                                        \
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ge, nreq + 1),               \
-  SCM_PACK_RTL_24 (scm_rtl_op_bind_rest, nreq + 1),                     \
-  SCM_PACK_RTL_24 (scm_rtl_op_subr_call, 0),                            \
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ge, nreq + 1),                   \
+  SCM_PACK_RTL_24 (scm_op_bind_rest, nreq + 1),                         \
+  SCM_PACK_RTL_24 (scm_op_subr_call, 0),                                \
   0
 
 #define BC(nopt)                                                        \
-  SCM_PACK_RTL_24 (scm_rtl_op_bind_rest, nopt + 1),                     \
-  SCM_PACK_RTL_24 (scm_rtl_op_subr_call, 0),                            \
+  SCM_PACK_RTL_24 (scm_op_bind_rest, nopt + 1),                         \
+  SCM_PACK_RTL_24 (scm_op_subr_call, 0),                                \
   0,                                                                    \
   0
 
 #define ABC(nreq, nopt)                                                 \
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ge, nreq + 1),               \
-  SCM_PACK_RTL_24 (scm_rtl_op_bind_rest, nreq + nopt + 1),              \
-  SCM_PACK_RTL_24 (scm_rtl_op_subr_call, 0),                            \
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ge, nreq + 1),                   \
+  SCM_PACK_RTL_24 (scm_op_bind_rest, nreq + nopt + 1),                  \
+  SCM_PACK_RTL_24 (scm_op_subr_call, 0),                                \
   0
 
 
index eb2a685..8e90f28 100644 (file)
@@ -102,7 +102,7 @@ static SCM word_type_symbols[] =
   (((word) >> ((n) * TYPE_WIDTH)) & ((1 << TYPE_WIDTH) - 1))
 
 struct scm_instruction {
-  enum scm_rtl_opcode opcode;  /* opcode */
+  enum scm_opcode opcode;      /* opcode */
   const char *name;            /* instruction name */
   scm_t_uint32 meta;
   SCM symname;                  /* filled in later */
index 214a946..7575e6f 100644 (file)
@@ -22,9 +22,9 @@
 #include <libguile.h>
 #include <libguile/vm-operations.h>
 
-enum scm_rtl_opcode
+enum scm_opcode
   {
-#define ENUM(opcode, tag, name, meta) scm_rtl_op_##tag = opcode,
+#define ENUM(opcode, tag, name, meta) scm_op_##tag = opcode,
     FOR_EACH_VM_OPERATION(ENUM)
 #undef ENUM
   };
index 9b0e080..12bf032 100644 (file)
@@ -600,37 +600,37 @@ static SCM vm_builtin_call_with_values;
 static SCM vm_builtin_call_with_current_continuation;
 
 static const scm_t_uint32 vm_boot_continuation_code[] = {
-  SCM_PACK_RTL_24 (scm_rtl_op_halt, 0)
+  SCM_PACK_RTL_24 (scm_op_halt, 0)
 };
 
 static const scm_t_uint32 vm_builtin_apply_code[] = {
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ge, 3),
-  SCM_PACK_RTL_24 (scm_rtl_op_tail_apply, 0), /* proc in r1, args from r2 */
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ge, 3),
+  SCM_PACK_RTL_24 (scm_op_tail_apply, 0), /* proc in r1, args from r2 */
 };
 
 static const scm_t_uint32 vm_builtin_values_code[] = {
-  SCM_PACK_RTL_24 (scm_rtl_op_return_values, 0) /* vals from r1 */
+  SCM_PACK_RTL_24 (scm_op_return_values, 0) /* vals from r1 */
 };
 
 static const scm_t_uint32 vm_builtin_abort_to_prompt_code[] = {
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ge, 2),
-  SCM_PACK_RTL_24 (scm_rtl_op_abort, 0), /* tag in r1, vals from r2 */
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ge, 2),
+  SCM_PACK_RTL_24 (scm_op_abort, 0), /* tag in r1, vals from r2 */
   /* FIXME: Partial continuation should capture caller regs.  */
-  SCM_PACK_RTL_24 (scm_rtl_op_return_values, 0) /* vals from r1 */
+  SCM_PACK_RTL_24 (scm_op_return_values, 0) /* vals from r1 */
 };
 
 static const scm_t_uint32 vm_builtin_call_with_values_code[] = {
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ee, 3),
-  SCM_PACK_RTL_24 (scm_rtl_op_alloc_frame, 7),
-  SCM_PACK_RTL_12_12 (scm_rtl_op_mov, 6, 1),
-  SCM_PACK_RTL_24 (scm_rtl_op_call, 6), SCM_PACK_RTL_24 (0, 1),
-  SCM_PACK_RTL_12_12 (scm_rtl_op_mov, 0, 2),
-  SCM_PACK_RTL_24 (scm_rtl_op_tail_call_shuffle, 7)
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ee, 3),
+  SCM_PACK_RTL_24 (scm_op_alloc_frame, 7),
+  SCM_PACK_RTL_12_12 (scm_op_mov, 6, 1),
+  SCM_PACK_RTL_24 (scm_op_call, 6), SCM_PACK_RTL_24 (0, 1),
+  SCM_PACK_RTL_12_12 (scm_op_mov, 0, 2),
+  SCM_PACK_RTL_24 (scm_op_tail_call_shuffle, 7)
 };
 
 static const scm_t_uint32 vm_builtin_call_with_current_continuation_code[] = {
-  SCM_PACK_RTL_24 (scm_rtl_op_assert_nargs_ee, 2),
-  SCM_PACK_RTL_24 (scm_rtl_op_call_cc, 0)
+  SCM_PACK_RTL_24 (scm_op_assert_nargs_ee, 2),
+  SCM_PACK_RTL_24 (scm_op_call_cc, 0)
 };