* src/vm/jit/code.c: Moved to .cpp.
[cacao.git] / src / vm / jit / exceptiontable.h
1 /* src/vm/jit/exceptiontable.h - method exception table
2
3    Copyright (C) 2007
4    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23 */
24
25
26 #ifndef _EXCEPTIONTABLE_H
27 #define _EXCEPTIONTABLE_H
28
29 /* forward typedefs ***********************************************************/
30
31 typedef struct exceptiontable_t       exceptiontable_t;
32 typedef struct exceptiontable_entry_t exceptiontable_entry_t;
33
34
35 #include "config.h"
36
37 #include <stdint.h>
38
39 #include "vm/jit/code.hpp"
40 #include "vm/jit/jit.hpp"
41
42
43 /* exceptiontable_t ***********************************************************/
44
45 struct exceptiontable_t {
46         int32_t                 length;
47         exceptiontable_entry_t *entries;
48 };
49
50
51 /* exceptiontable_entry_t *****************************************************/
52
53 struct exceptiontable_entry_t {
54         void                  *endpc;
55         void                  *startpc;
56         void                  *handlerpc;
57         classref_or_classinfo  catchtype;
58 };
59
60
61 /* function prototypes ********************************************************/
62
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66
67 void exceptiontable_create(jitdata *jd);
68 void exceptiontable_free(codeinfo *code);
69
70 #if !defined(NDEBUG)
71 void exceptiontable_print(codeinfo *code);
72 #endif
73
74 #ifdef __cplusplus
75 } // extern "C"
76 #endif
77
78 #endif /* _EXCEPTIONTABLE_H */
79
80
81 /*
82  * These are local overrides for various environment variables in Emacs.
83  * Please do not remove this and leave it at the end of the file, where
84  * Emacs will automagically detect them.
85  * ---------------------------------------------------------------------
86  * Local variables:
87  * mode: c
88  * indent-tabs-mode: t
89  * c-basic-offset: 4
90  * tab-width: 4
91  * End:
92  * vim:noexpandtab:sw=4:ts=4:
93  */