1 /* src/vm/jit/linenumbertable.h - linenumber table
4 CACAOVM - Verein zu Foerderung der freien virtuellen Machine CACAO
6 This file is part of CACAO.
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.
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.
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
26 #ifndef _LINENUMBERTABLE_H
27 #define _LINENUMBERTABLE_H
29 /* forward typedefs ***********************************************************/
31 typedef struct linenumbertable_t linenumbertable_t;
32 typedef struct linenumbertable_entry_t linenumbertable_entry_t;
33 typedef struct linenumbertable_list_entry_t linenumbertable_list_entry_t;
40 #include "toolbox/list.h"
42 #include "vm/jit/jit.h"
43 #include "vm/jit/code.h"
44 #include "vm/jit/codegen-common.h"
46 #include "vmcore/method.h"
49 /* linenumbertable_t **********************************************************/
51 struct linenumbertable_t {
52 int32_t length; /* length of the entries array */
53 linenumbertable_entry_t *entries; /* actual linenumber entries */
57 /* linenumbertable_entry_t *****************************************************
59 NOTE: See doc/inlining_stacktrace.txt for special meanings of line
62 *******************************************************************************/
64 struct linenumbertable_entry_t {
65 int32_t linenumber; /* linenumber of this entry */
66 void *pc; /* PC where this linenumber starts */
70 /* linenumbertable_list_entry_t ***********************************************/
72 struct linenumbertable_list_entry_t {
73 int32_t linenumber; /* line number, used for inserting into the */
74 /* table and for validity checking */
75 /* -1......start of inlined body */
76 /* -2......end of inlined body */
77 /* <= -3...special entry with methodinfo * */
78 /* (see doc/inlining_stacktrace.txt) */
79 ptrint mpc; /* machine code program counter of first */
80 /* instruction for given line */
81 /* NOTE: for linenumber <= -3 this is a the */
82 /* (methodinfo *) of the inlined method */
87 /* function prototypes ********************************************************/
89 void linenumbertable_create(jitdata *jd);
91 void linenumbertable_list_entry_add(codegendata *cd, int32_t linenumber);
92 void linenumbertable_list_entry_add_inline_start(codegendata *cd, instruction *iptr);
93 void linenumbertable_list_entry_add_inline_end(codegendata *cd, instruction *iptr);
95 int32_t linenumbertable_linenumber_for_pc(methodinfo **pm, codeinfo *code, void *pc);
97 #endif /* _LINENUMBERTABLE_H */
101 * These are local overrides for various environment variables in Emacs.
102 * Please do not remove this and leave it at the end of the file, where
103 * Emacs will automagically detect them.
104 * ---------------------------------------------------------------------
107 * indent-tabs-mode: t
111 * vim:noexpandtab:sw=4:ts=4: