1 /* src/vm/linker.hpp - class linker header
3 Copyright (C) 1996, 2011
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 arraydescriptor arraydescriptor;
32 typedef struct primitivetypeinfo primitivetypeinfo;
38 #include "threads/mutex.hpp"
40 #include "vm/class.hpp"
41 #include "vm/references.h"
42 #include "vm/vftbl.hpp"
45 /* arraydescriptor *************************************************************
47 For every array class an arraydescriptor is allocated which
48 describes the array class. The arraydescriptor is referenced from
49 the vftbl of the array class.
51 *******************************************************************************/
53 struct arraydescriptor {
54 vftbl_t *componentvftbl; /* vftbl of the component type, NULL for primit. */
55 vftbl_t *elementvftbl; /* vftbl of the element type, NULL for primitive */
56 s2 arraytype; /* ARRAYTYPE_* constant */
57 s2 dimension; /* dimension of the array (always >= 1) */
58 s4 dataoffset; /* offset of the array data from object pointer */
59 s4 componentsize; /* size of a component in bytes */
60 s2 elementtype; /* ARRAYTYPE_* constant */
64 /* global variables ***********************************************************/
66 /* This lock must be taken while renumbering classes or while atomically */
67 /* accessing classes. */
71 #define LOCK_CLASSRENUMBER_LOCK /* nothing */
72 #define UNLOCK_CLASSRENUMBER_LOCK /* nothing */
75 extern Mutex *linker_classrenumber_lock;
77 #define LOCK_CLASSRENUMBER_LOCK linker_classrenumber_lock->lock()
78 #define UNLOCK_CLASSRENUMBER_LOCK linker_classrenumber_lock->unlock()
83 /* function prototypes ********************************************************/
89 void linker_preinit(void);
90 void linker_init(void);
91 classinfo *link_class(classinfo *c);
93 void linker_create_string_later(java_object_t **a, utf *u);
94 void linker_initialize_deferred_strings();
100 #endif /* _LINKER_H */
104 * These are local overrides for various environment variables in Emacs.
105 * Please do not remove this and leave it at the end of the file, where
106 * Emacs will automagically detect them.
107 * ---------------------------------------------------------------------
110 * indent-tabs-mode: t
114 * vim:noexpandtab:sw=4:ts=4: