00001 /* 00002 FALCON - The Falcon Programming Language. 00003 FILE: stackframe.h 00004 00005 Short description 00006 ------------------------------------------------------------------- 00007 Author: Giancarlo Niccolai 00008 Begin: sab mar 18 2006 00009 00010 ------------------------------------------------------------------- 00011 (C) Copyright 2004: the FALCON developers (see list in AUTHORS file) 00012 00013 See LICENSE file for licensing details. 00014 */ 00015 00020 #ifndef flc_stackframe_H 00021 #define flc_stackframe_H 00022 00023 #include <falcon/setup.h> 00024 #include <falcon/types.h> 00025 #include <falcon/item.h> 00026 #include <falcon/genericlist.h> 00027 #include <falcon/basealloc.h> 00028 #include <falcon/stackframe.h> 00029 00030 namespace Falcon { 00031 00032 class Module; 00033 00034 typedef struct tag_StackFrame 00035 { 00036 Item header; 00037 00038 uint32 m_ret_pc; 00039 uint32 m_call_pc; 00040 uint32 m_param_count; 00041 uint32 m_stack_base; 00042 uint32 m_try_base; 00043 00044 const Symbol *m_symbol; 00045 LiveModule *m_module; 00046 00047 Item m_self; 00048 Item m_binding; 00049 00050 bool m_break; 00051 00052 ext_func_frame_t m_endFrameFunc; 00053 } StackFrame; 00054 00055 void StackFrame_deletor( void *data ); 00056 00057 class StackFrameList: public List 00058 { 00059 friend void StackFrame_deletor( void *data ); 00060 00061 public: 00062 00063 StackFrameList(): 00064 List( StackFrame_deletor ) 00065 {} 00066 }; 00067 00068 00069 #define VM_FRAME_SPACE (sizeof(StackFrame) / sizeof(Item) + 1) 00070 00071 } 00072 00073 #endif 00074 00075 /* end of stackframe.h */