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:
parent
d9b1c71ac6
commit
0a935b2ab5
1 changed files with 17 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue