1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

When printing a VM, show the type of engine being used.

* libguile/vm.c (scm_i_vm_print): Print the engine type.
This commit is contained in:
Ludovic Courtès 2010-04-14 23:46:41 +02:00
parent d9b1c71ac6
commit 0a935b2ab5

View file

@ -315,7 +315,24 @@ static SCM sym_vm_run, sym_vm_error, sym_keyword_argument_error, sym_debug;
void
scm_i_vm_print (SCM x, SCM port, scm_print_state *pstate)
{
const struct scm_vm *vm;
vm = SCM_VM_DATA (x);
scm_puts ("#<vm ", port);
switch (vm->engine)
{
case SCM_VM_REGULAR_ENGINE:
scm_puts ("regular-engine ", port);
break;
case SCM_VM_DEBUG_ENGINE:
scm_puts ("debug-engine ", port);
break;
default:
scm_puts ("unknown-engine ", port);
}
scm_uintprint (SCM_UNPACK (x), 16, port);
scm_puts (">", port);
}