X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/f76cf73a49e0219f81a2fa0fc8431a0b83280822..d8d9a8da05ec876acba81a559798eb5eeceb5a17:/libguile/vm.h diff --git a/libguile/vm.h b/libguile/vm.h index 6a257328e..8f88d0cd4 100644 --- a/libguile/vm.h +++ b/libguile/vm.h @@ -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);