Merge from subtype branch.
[cacao.git] / src / vm / jit / show.hpp
1 /* src/vm/jit/show.hpp - showing the intermediate representation
2
3    Copyright (C) 1996-2005, 2006, 2008
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 _SHOW_HPP
27 #define _SHOW_HPP
28
29 #include "config.h"
30 #include "vm/types.h"
31
32 #include "vm/jit/jit.hpp"
33
34
35 /* compiler stage defines *****************************************************/
36
37 #define SHOW_INSTRUCTIONS  0
38 #define SHOW_PARSE         1
39 #define SHOW_STACK         2
40 #define SHOW_CFG           3
41 #define SHOW_REGS          4
42 #define SHOW_CODE          5
43
44
45 /* function prototypes ********************************************************/
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
51 #if !defined(NDEBUG)
52 extern const char *show_jit_type_names[];
53 extern const char show_jit_type_letters[];
54
55 bool show_init(void);
56
57 void show_method(jitdata *jd, int stage);
58 void show_basicblock(jitdata *jd, basicblock *bptr, int stage);
59 void show_icmd(jitdata *jd, instruction *iptr, bool deadcode, int stage);
60 void show_variable(jitdata *jd, s4 index, int stage);
61 void show_variable_array(jitdata *jd, s4 *vars, int n, int stage);
62 void show_javalocals_array(jitdata *jd, s4 *vars, int n, int stage);
63 void show_allocation(s4 type, s4 flags, s4 regoff);
64 #endif /* !defined(NDEBUG) */
65
66 /* Debug output filtering */
67
68 #if defined(ENABLE_DEBUG_FILTER)
69 void show_filters_init(void);
70 #define SHOW_FILTER_FLAG_VERBOSECALL_INCLUDE 0x01
71 #define SHOW_FILTER_FLAG_VERBOSECALL_EXCLUDE 0x02
72 #define SHOW_FILTER_FLAG_SHOW_METHOD 0x04
73 void show_filters_apply(methodinfo *m);
74 int show_filters_test_verbosecall_enter(methodinfo *m);
75 int show_filters_test_verbosecall_exit(methodinfo *m);
76 #endif
77
78 #ifdef __cplusplus
79 } // extern "C"
80 #endif
81
82 #endif // _SHOW_HPP
83
84
85 /*
86  * These are local overrides for various environment variables in Emacs.
87  * Please do not remove this and leave it at the end of the file, where
88  * Emacs will automagically detect them.
89  * ---------------------------------------------------------------------
90  * Local variables:
91  * mode: c++
92  * indent-tabs-mode: t
93  * c-basic-offset: 4
94  * tab-width: 4
95  * End:
96  * vim:noexpandtab:sw=4:ts=4:
97  */