diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-04-14 23:46:41 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-05-07 13:47:52 +0200 |
commit | 0a935b2ab59a73c802283692c868a8315434839e (patch) | |
tree | db28dd12098e78d222fb0c155a522a30582f1811 /libguile/vm.c | |
parent | d9b1c71ac61b9e510ff0e2ce819e4002348eceb6 (diff) | |
download | guile-0a935b2ab59a73c802283692c868a8315434839e.tar.gz |
When printing a VM, show the type of engine being used.
* libguile/vm.c (scm_i_vm_print): Print the engine type.
Diffstat (limited to 'libguile/vm.c')
-rw-r--r-- | libguile/vm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libguile/vm.c b/libguile/vm.c index 54a143eaf..ca074056a 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -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); } |