1 /* src/vmcore/stackmap.h - class attribute StackMapTable
3 Copyright (C) 2006, 2007 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4 R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5 C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6 Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 $Id: utf8.h 5920 2006-11-05 21:23:09Z twisti $
33 /* forward typedefs ***********************************************************/
35 typedef struct stack_map_t stack_map_t;
36 typedef union stack_map_frame_t stack_map_frame_t;
37 typedef struct same_locals_1_stack_item_frame_t same_locals_1_stack_item_frame_t;
38 typedef struct same_locals_1_stack_item_frame_extended_t same_locals_1_stack_item_frame_extended_t;
39 typedef struct chop_frame_t chop_frame_t;
40 typedef struct same_frame_extended_t same_frame_extended_t;
41 typedef struct append_frame_t append_frame_t;
42 typedef struct full_frame_t full_frame_t;
44 typedef union verification_type_info_t verification_type_info_t;
45 typedef struct Top_variable_info_t Top_variable_info_t;
46 typedef struct Integer_variable_info_t Integer_variable_info_t;
47 typedef struct Float_variable_info_t Float_variable_info_t;
48 typedef struct Long_variable_info_t Long_variable_info_t;
49 typedef struct Double_variable_info_t Double_variable_info_t;
50 typedef struct Null_variable_info_t Null_variable_info_t;
51 typedef struct UninitializedThis_variable_info_t UninitializedThis_variable_info_t;
52 typedef struct Object_variable_info_t Object_variable_info_t;
53 typedef struct Uninitialized_variable_info_t Uninitialized_variable_info_t;
59 #include "vm/global.h"
61 #include "vmcore/loader.h"
62 #include "vmcore/method.h"
65 /* verification_type_info *****************************************************/
68 #define ITEM_Integer 1
73 #define ITEM_UninitializedThis 6
75 #define ITEM_Uninitialized 8
77 struct Top_variable_info_t {
81 struct Integer_variable_info_t {
85 struct Float_variable_info_t {
89 struct Long_variable_info_t {
93 struct Double_variable_info_t {
97 struct Null_variable_info_t {
101 struct UninitializedThis_variable_info_t {
105 struct Object_variable_info_t {
110 struct Uninitialized_variable_info_t {
115 union verification_type_info_t {
117 Top_variable_info_t Top_variable_info;
118 Integer_variable_info_t Integer_variable_info;
119 Float_variable_info_t Float_variable_info;
120 Long_variable_info_t Long_variable_info;
121 Double_variable_info_t Double_variable_info;
122 Null_variable_info_t Null_variable_info;
123 UninitializedThis_variable_info_t UninitializedThis_variable_info;
124 Object_variable_info_t Object_variable_info;
125 Uninitialized_variable_info_t Uninitialized_variable_info;
129 /* stack_map_t ****************************************************************/
132 u2 attribute_name_index;
134 u2 number_of_entries;
135 stack_map_frame_t *entries;
139 /* same_locals_1_stack_item_frame_t *******************************************/
141 struct same_locals_1_stack_item_frame_t {
143 verification_type_info_t stack[1];
147 /* same_locals_1_stack_item_frame_extended_t **********************************/
149 struct same_locals_1_stack_item_frame_extended_t {
152 verification_type_info_t stack[1];
156 /* chop_frame_t ***************************************************************/
158 struct chop_frame_t {
164 /* same_frame_extended_t ******************************************************/
166 struct same_frame_extended_t {
172 /* append_frame_t *************************************************************/
174 struct append_frame_t {
177 verification_type_info_t *locals;
181 /* full_frame_t ***************************************************************/
183 struct full_frame_t {
187 verification_type_info_t *locals;
188 u2 number_of_stack_items;
189 verification_type_info_t *stack;
193 /* stack_map_frame_t **********************************************************/
195 #define FRAME_TYPE_SAME 63 /* 0-63 */
196 #define FRAME_TYPE_SAME_LOCALS_1_STACK_ITEM 127 /* 0-127 */
197 #define FRAME_TYPE_RESERVED 246 /* 128-246 */
198 #define FRAME_TYPE_SAME_LOCALS_1_STACK_ITEM_EXTENDED 247 /* 247 */
199 #define FRAME_TYPE_CHOP 250 /* 248-250 */
200 #define FRAME_TYPE_SAME_FRAME_EXTENDED 251 /* 251 */
201 #define FRAME_TYPE_APPEND 254 /* 252-254 */
202 #define FRAME_TYPE_FULL_FRAME 255 /* 255 */
204 union stack_map_frame_t {
206 same_locals_1_stack_item_frame_t same_locals_1_stack_item_frame;
207 same_locals_1_stack_item_frame_extended_t same_locals_1_stack_item_frame_extended;
208 chop_frame_t chop_frame;
209 same_frame_extended_t same_frame_extended;
210 append_frame_t append_frame;
211 full_frame_t full_frame;
215 /* function prototypes ********************************************************/
217 bool stackmap_load_attribute_stackmaptable(classbuffer *cb, methodinfo *m);
219 #endif /* _STACKMAP_H */
223 * These are local overrides for various environment variables in Emacs.
224 * Please do not remove this and leave it at the end of the file, where
225 * Emacs will automagically detect them.
226 * ---------------------------------------------------------------------
229 * indent-tabs-mode: t
233 * vim:noexpandtab:sw=4:ts=4: