Export <slot> from GOOPS
[bpt/guile.git] / libguile / vm.h
index 6a25732..8f88d0c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014 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
@@ -39,11 +39,12 @@ struct scm_vm {
   scm_t_uint32 *ip;            /* instruction pointer */
   SCM *sp;                     /* stack pointer */
   SCM *fp;                     /* frame pointer */
-  size_t stack_size;           /* stack size */
-  SCM *stack_base;             /* stack base address */
   SCM *stack_limit;            /* stack limit address */
   int trace_level;              /* traces enabled if trace_level > 0 */
-  size_t max_stack_size;
+  SCM *sp_max_since_gc;         /* highest sp since last gc */
+  size_t stack_size;           /* stack size */
+  SCM *stack_base;             /* stack base address */
+  SCM overflow_handler_stack;   /* alist of max-stack-size -> thunk */
   SCM hooks[SCM_VM_NUM_HOOKS]; /* hooks */
   int engine;                   /* which vm engine we're using */
 };
@@ -51,6 +52,9 @@ struct scm_vm {
 SCM_INTERNAL struct scm_vm *scm_the_vm (void);
 SCM_API SCM scm_call_with_vm (SCM proc, SCM args);
 
+SCM_API SCM scm_call_with_stack_overflow_handler (SCM limit, SCM thunk,
+                                                  SCM handler);
+
 SCM_API SCM scm_vm_apply_hook (void);
 SCM_API SCM scm_vm_push_continuation_hook (void);
 SCM_API SCM scm_vm_pop_continuation_hook (void);
@@ -97,6 +101,7 @@ SCM_INTERNAL SCM scm_i_vm_capture_stack (SCM *stack_base, SCM *fp, SCM *sp,
                                          scm_t_uint32 *ra,
                                          scm_t_dynstack *dynstack,
                                          scm_t_uint32 flags);
+SCM_INTERNAL int scm_i_vm_cont_to_frame (SCM cont, struct scm_frame *frame);
 SCM_INTERNAL void scm_i_vm_cont_print (SCM x, SCM port,
                                        scm_print_state *pstate);
 SCM_INTERNAL void scm_bootstrap_vm (void);