diff options
Diffstat (limited to 'mixguile')
-rw-r--r-- | mixguile/mixguile-vm-stat.scm | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/mixguile/mixguile-vm-stat.scm b/mixguile/mixguile-vm-stat.scm index 9b401ee..71dfe46 100644 --- a/mixguile/mixguile-vm-stat.scm +++ b/mixguile/mixguile-vm-stat.scm @@ -1,7 +1,7 @@ -;; -*-scheme-*- -------------- mixguile-commands.scm : +;; -*-scheme-*- -------------- mixguile-vm-stat.scm : ; mixvm status functions ; ------------------------------------------------------------------ -; $Id: mixguile-vm-stat.scm,v 1.2 2001/09/04 02:36:37 jao Exp $ +; $Id: mixguile-vm-stat.scm,v 1.3 2001/09/16 22:42:16 jao Exp $ ; ------------------------------------------------------------------ ; Copyright (C) 2001 Free Software Foundation, Inc. ; @@ -37,12 +37,35 @@ (lambda (status) (eq? status (mix-vm-status)))) ;; predicates for each possible status -(define mix-vm-status-error? (lambda () (mix-vm-status? 'MIX_ERROR))) -(define mix-vm-status-break? (lambda () (mix-vm-status? 'MIX_BREAK))) -(define mix-vm-status-cond-break? (lambda () (mix-vm-status? 'MIX_COND_BREAK))) -(define mix-vm-status-halted? (lambda () (mix-vm-status? 'MIX_HALTED))) -(define mix-vm-status-running? (lambda () (mix-vm-status? 'MIX_RUNNING))) -(define mix-vm-status-loaded? (lambda () (mix-vm-status? 'MIX_LOADED))) -(define mix-vm-status-empty? (lambda () (mix-vm-status? 'MIX_EMPTY))) +(define mix-vm-error? (lambda () (mix-vm-status? 'MIX_ERROR))) +(define mix-vm-break? (lambda () (mix-vm-status? 'MIX_BREAK))) +(define mix-vm-cond-break? (lambda () (mix-vm-status? 'MIX_COND_BREAK))) +(define mix-vm-halted? (lambda () (mix-vm-status? 'MIX_HALTED))) +(define mix-vm-running? (lambda () (mix-vm-status? 'MIX_RUNNING))) +(define mix-vm-loaded? (lambda () (mix-vm-status? 'MIX_LOADED))) +(define mix-vm-empty? (lambda () (mix-vm-status? 'MIX_EMPTY))) +;; define hooks on break conditions + +(define mix-make-conditional-hook + (lambda (test hook) + (lambda (arglist) + (if (test) (hook (mix-src-line-no) (mix-loc)))))) + +(define mix-add-run-next-hook + (lambda (hook) + (mix-add-post-hook 'run hook) + (mix-add-post-hook 'next hook))) + + +(define mix-add-break-hook + (lambda (hook) + (mix-add-run-next-hook (mix-make-conditional-hook mix-vm-break? hook)))) + +(define mix-add-cond-break-hook + (lambda (hook) + (mix-add-run-next-hook (mix-make-conditional-hook + mix-vm-cond-break? hook)))) + + |