All instruction pointers are now scm_t_uint32*
[bpt/guile.git] / libguile / vm.h
index 2479ee4..c678e42 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -41,7 +41,7 @@ typedef SCM (*scm_t_vm_engine) (SCM vm, SCM program, SCM *argv, int nargs);
 #define SCM_VM_NUM_ENGINES 2
 
 struct scm_vm {
-  scm_t_uint8 *ip;             /* instruction pointer */
+  scm_t_uint32 *ip;            /* instruction pointer */
   SCM *sp;                     /* stack pointer */
   SCM *fp;                     /* frame pointer */
   size_t stack_size;           /* stack size */
@@ -50,7 +50,6 @@ struct scm_vm {
   int engine;                   /* which vm engine we're using */
   SCM hooks[SCM_VM_NUM_HOOKS]; /* hooks */
   int trace_level;              /* traces enabled if trace_level > 0 */
-  scm_t_int64 cookie;           /* used to detect unrewindable continuations */
 };
 
 SCM_API SCM scm_the_vm_fluid;
@@ -89,10 +88,11 @@ SCM_API void scm_c_set_default_vm_engine_x (int engine);
 struct scm_vm_cont {
   SCM *sp;
   SCM *fp;
-  scm_t_uint8 *ra, *mvra;
+  scm_t_uint32 *ra;
   scm_t_ptrdiff stack_size;
   SCM *stack_base;
   scm_t_ptrdiff reloc;
+  scm_t_dynstack *dynstack;
   scm_t_uint32 flags;
 };
 
@@ -107,9 +107,11 @@ SCM_INTERNAL SCM scm_c_vm_run (SCM vm, SCM program, SCM *argv, int nargs);
 
 SCM_INTERNAL void scm_i_vm_print (SCM x, SCM port,
                                   scm_print_state *pstate);
-SCM_INTERNAL SCM scm_i_vm_capture_continuation (SCM vm);
+SCM_INTERNAL SCM scm_i_call_with_current_continuation (SCM proc);
+SCM_INTERNAL SCM scm_i_capture_current_stack (void);
 SCM_INTERNAL SCM scm_i_vm_capture_stack (SCM *stack_base, SCM *fp, SCM *sp,
-                                         scm_t_uint8 *ra, scm_t_uint8 *mvra,
+                                         scm_t_uint32 *ra,
+                                         scm_t_dynstack *dynstack,
                                          scm_t_uint32 flags);
 SCM_INTERNAL void scm_i_vm_cont_print (SCM x, SCM port,
                                        scm_print_state *pstate);