Engine takes struct scm_vm* as argument
authorAndy Wingo <wingo@pobox.com>
Thu, 21 Nov 2013 16:52:00 +0000 (17:52 +0100)
committerAndy Wingo <wingo@pobox.com>
Thu, 21 Nov 2013 16:52:00 +0000 (17:52 +0100)
* libguile/vm-engine.c:
* libguile/vm.c (scm_c_vm_run): VM engine now takes struct scm_vm* as
  argument, not SCM vm.

libguile/vm-engine.c
libguile/vm.c

index 2461b14..b507511 100644 (file)
   ((scm_t_uintptr) (ptr) % alignof_type (type) == 0)
 
 static SCM
-VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_)
+VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, size_t nargs_)
 {
   /* Instruction pointer: A pointer to the opcode that is currently
      running.  */
@@ -439,7 +439,6 @@ VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_)
   register scm_t_uint32 op;
 
   /* Cached variables. */
-  struct scm_vm *vp = SCM_VM_DATA (vm);
   scm_i_thread *current_thread = SCM_I_CURRENT_THREAD;
   scm_i_jmp_buf registers;              /* used for prompts */
 
index 27990f9..c761872 100644 (file)
@@ -737,7 +737,8 @@ initialize_default_stack_size (void)
 #undef VM_USE_HOOKS
 #undef VM_NAME
 
-typedef SCM (*scm_t_vm_engine) (SCM vm, SCM program, SCM *argv, size_t nargs);
+typedef SCM (*scm_t_vm_engine) (struct scm_vm *vp,
+                                SCM program, SCM *argv, size_t nargs);
 
 static const scm_t_vm_engine vm_engines[SCM_VM_NUM_ENGINES] =
   { vm_regular_engine, vm_debug_engine };
@@ -822,7 +823,7 @@ scm_c_vm_run (SCM vm, SCM program, SCM *argv, int nargs)
 {
   struct scm_vm *vp = SCM_VM_DATA (vm);
   SCM_CHECK_STACK;
-  return vm_engines[vp->engine](vm, program, argv, nargs);
+  return vm_engines[vp->engine](vp, program, argv, nargs);
 }
 
 SCM