summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeisuke Nishida <kxn30@po.cwru.edu>2001-05-02 15:05:05 +0000
committerKeisuke Nishida <kxn30@po.cwru.edu>2001-05-02 15:05:05 +0000
commit7a0d0cee1f3f830f7b356457c39e3768f7d24d57 (patch)
treee25727ef7013f85de6794dc06e717c62761e632c /src
parentabaca96059b1421461933617c78fbd77a466c712 (diff)
downloadguile-7a0d0cee1f3f830f7b356457c39e3768f7d24d57.tar.gz
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/vm.c9
-rw-r--r--src/vm.h15
-rw-r--r--src/vm_engine.h1
-rw-r--r--src/vm_system.c6
4 files changed, 24 insertions, 7 deletions
diff --git a/src/vm.c b/src/vm.c
index 50ec84a14..01fafeb6a 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -395,6 +395,15 @@ SCM_DEFINE (scm_vm_next_hook, "vm-next-hook", 1, 0, 0,
}
#undef FUNC_NAME
+SCM_DEFINE (scm_vm_break_hook, "vm-break-hook", 1, 0, 0,
+ (SCM vm),
+ "")
+#define FUNC_NAME s_scm_vm_break_hook
+{
+ VM_DEFINE_HOOK (SCM_VM_BREAK_HOOK);
+}
+#undef FUNC_NAME
+
SCM_DEFINE (scm_vm_enter_hook, "vm-enter-hook", 1, 0, 0,
(SCM vm),
"")
diff --git a/src/vm.h b/src/vm.h
index ecabc4ea6..917c553b6 100644
--- a/src/vm.h
+++ b/src/vm.h
@@ -4,12 +4,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
@@ -48,11 +48,12 @@
#define SCM_VM_BOOT_HOOK 0
#define SCM_VM_HALT_HOOK 1
#define SCM_VM_NEXT_HOOK 2
-#define SCM_VM_ENTER_HOOK 3
-#define SCM_VM_APPLY_HOOK 4
-#define SCM_VM_EXIT_HOOK 5
-#define SCM_VM_RETURN_HOOK 6
-#define SCM_VM_NUM_HOOKS 7
+#define SCM_VM_BREAK_HOOK 3
+#define SCM_VM_ENTER_HOOK 4
+#define SCM_VM_APPLY_HOOK 5
+#define SCM_VM_EXIT_HOOK 6
+#define SCM_VM_RETURN_HOOK 7
+#define SCM_VM_NUM_HOOKS 8
struct scm_vm {
scm_byte_t *ip; /* instruction pointer */
diff --git a/src/vm_engine.h b/src/vm_engine.h
index 095fb4217..c4ce6b40f 100644
--- a/src/vm_engine.h
+++ b/src/vm_engine.h
@@ -183,6 +183,7 @@
#define BOOT_HOOK() RUN_HOOK (SCM_VM_BOOT_HOOK)
#define HALT_HOOK() RUN_HOOK (SCM_VM_HALT_HOOK)
#define NEXT_HOOK() RUN_HOOK (SCM_VM_NEXT_HOOK)
+#define BREAK_HOOK() RUN_HOOK (SCM_VM_BREAK_HOOK)
#define ENTER_HOOK() RUN_HOOK (SCM_VM_ENTER_HOOK)
#define APPLY_HOOK() RUN_HOOK (SCM_VM_APPLY_HOOK)
#define EXIT_HOOK() RUN_HOOK (SCM_VM_EXIT_HOOK)
diff --git a/src/vm_system.c b/src/vm_system.c
index 70df6fa64..894c74643 100644
--- a/src/vm_system.c
+++ b/src/vm_system.c
@@ -63,6 +63,12 @@ VM_DEFINE_INSTRUCTION (halt, "halt", 0, 0, 0)
return ret;
}
+VM_DEFINE_INSTRUCTION (break, "break", 0, 0, 0)
+{
+ BREAK_HOOK ();
+ NEXT;
+}
+
VM_DEFINE_INSTRUCTION (drop, "drop", 0, 0, 0)
{
DROP ();