1 /* src/vm/field.hpp - field functions header
3 Copyright (C) 1996-2005, 2006, 2007, 2008
4 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine 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
29 /* forward typedefs ***********************************************************/
31 typedef struct fieldinfo fieldinfo;
37 #include "vm/descriptor.hpp"
38 #include "vm/class.hpp"
39 #include "vm/global.h"
40 #include "vm/loader.hpp"
41 #include "vm/references.h"
45 /* fieldinfo ******************************************************************/
47 struct fieldinfo { /* field of a class */
49 /* CAUTION: The first field must be a pointer that is never the same */
50 /* value as CLASSREF_PSEUDO_VFTBL! This is used to check whether */
51 /* a constant_FMIref has been resolved. */
53 classinfo *clazz; /* needed by typechecker. Could be optimized */
54 /* away by using constant_FMIref instead of */
55 /* fieldinfo throughout the compiler. */
57 s4 flags; /* ACC flags */
58 s4 type; /* basic data type */
59 utf *name; /* name of field */
60 utf *descriptor;/* JavaVM descriptor string of field */
61 utf *signature; /* Signature attribute string */
62 typedesc *parseddesc;/* parsed descriptor */
64 int32_t offset; /* offset from start of object (instance variables) */
65 imm_union *value; /* storage for static values (class variables) */
69 /* function prototypes ********************************************************/
75 bool field_load(classbuffer *cb, fieldinfo *f, descriptor_pool *descpool);
76 classinfo *field_get_type(fieldinfo *f);
77 void field_free(fieldinfo *f);
79 java_handle_bytearray_t *field_get_annotations(fieldinfo *f);
82 void field_printflags(fieldinfo *f);
83 void field_print(fieldinfo *f);
84 void field_println(fieldinfo *f);
85 void field_fieldref_print(constant_FMIref *fr);
86 void field_fieldref_println(constant_FMIref *fr);
93 #endif /* _FIELD_HPP */
97 * These are local overrides for various environment variables in Emacs.
98 * Please do not remove this and leave it at the end of the file, where
99 * Emacs will automagically detect them.
100 * ---------------------------------------------------------------------
103 * indent-tabs-mode: t