1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 16:50:21 +02:00

Lingering RTL excision in vm.c

* libguile/vm-engine.c:
* libguile/vm.c: Rework VM inclusion so that we don't define VM_ENGINE
  and expect vm-engine.c to understand that -- since there is only
  VM_USE_HOOKS, define that in vm.c directly.  Rename rtl_vm_foo to
  vm_foo.

* libguile/vm.h: Remove scm_t_vm_engine typedef.
This commit is contained in:
Andy Wingo 2013-11-19 21:26:26 +01:00
parent 20b1b91394
commit f42cfbf0b7
3 changed files with 13 additions and 23 deletions

View file

@ -755,26 +755,26 @@ initialize_default_stack_size (void)
vm_stack_size = size;
}
#define RTL_VM_NAME rtl_vm_regular_engine
#define VM_NAME vm_regular_engine
#define VM_USE_HOOKS 0
#define FUNC_NAME "vm-regular-engine"
#define VM_ENGINE SCM_VM_REGULAR_ENGINE
#include "vm-engine.c"
#undef RTL_VM_NAME
#undef FUNC_NAME
#undef VM_ENGINE
#undef VM_USE_HOOKS
#undef VM_NAME
#define RTL_VM_NAME rtl_vm_debug_engine
#define VM_NAME vm_debug_engine
#define VM_USE_HOOKS 1
#define FUNC_NAME "vm-debug-engine"
#define VM_ENGINE SCM_VM_DEBUG_ENGINE
#include "vm-engine.c"
#undef RTL_VM_NAME
#undef FUNC_NAME
#undef VM_ENGINE
#undef VM_USE_HOOKS
#undef VM_NAME
typedef SCM (*scm_t_rtl_vm_engine) (SCM vm, SCM program, SCM *argv, size_t nargs);
typedef SCM (*scm_t_vm_engine) (SCM vm, SCM program, SCM *argv, size_t nargs);
static const scm_t_rtl_vm_engine rtl_vm_engines[] =
{ rtl_vm_regular_engine, rtl_vm_debug_engine };
static const scm_t_vm_engine vm_engines[SCM_VM_NUM_ENGINES] =
{ vm_regular_engine, vm_debug_engine };
#ifdef VM_ENABLE_PRECISE_STACK_GC_SCAN
@ -859,7 +859,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 rtl_vm_engines[vp->engine](vm, program, argv, nargs);
return vm_engines[vp->engine](vm, program, argv, nargs);
}
/* Scheme interface */