903b250f26125de9c673263c0243cab151b384d9
[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.h"
40 #include "vm/jit/jit.h"
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 void exceptiontable_create(jitdata *jd);
64 void exceptiontable_free(codeinfo *code);
65
66 #if !defined(NDEBUG)
67 void exceptiontable_print(codeinfo *code);
68 #endif
69
70 #endif /* _EXCEPTIONTABLE_H */
71
72
73 /*
74  * These are local overrides for various environment variables in Emacs.
75  * Please do not remove this and leave it at the end of the file, where
76  * Emacs will automagically detect them.
77  * ---------------------------------------------------------------------
78  * Local variables:
79  * mode: c
80  * indent-tabs-mode: t
81  * c-basic-offset: 4
82  * tab-width: 4
83  * End:
84  * vim:noexpandtab:sw=4:ts=4:
85  */