Mercurial > hg > truffle
comparison src/share/vm/classfile/javaClasses.hpp @ 2376:c7f3d0b4570f
7017732: move static fields into Class to prepare for perm gen removal
Reviewed-by: kvn, coleenp, twisti, stefank
author | never |
---|---|
date | Fri, 18 Mar 2011 16:00:34 -0700 |
parents | 8033953d67ff |
children | 352622fd140a |
comparison
equal
deleted
inserted
replaced
2375:d673ef06fe96 | 2376:c7f3d0b4570f |
---|---|
136 friend class VMStructs; | 136 friend class VMStructs; |
137 private: | 137 private: |
138 // The fake offsets are added by the class loader when java.lang.Class is loaded | 138 // The fake offsets are added by the class loader when java.lang.Class is loaded |
139 | 139 |
140 enum { | 140 enum { |
141 hc_klass_offset = 0, | 141 hc_number_of_fake_oop_fields = 3, |
142 hc_array_klass_offset = 1, | 142 hc_number_of_fake_int_fields = 2 |
143 hc_resolved_constructor_offset = 2, | |
144 hc_number_of_fake_oop_fields = 3 | |
145 }; | 143 }; |
146 | 144 |
147 static int klass_offset; | 145 static int klass_offset; |
148 static int resolved_constructor_offset; | 146 static int resolved_constructor_offset; |
149 static int array_klass_offset; | 147 static int array_klass_offset; |
150 static int number_of_fake_oop_fields; | 148 static int number_of_fake_oop_fields; |
151 | 149 |
150 static int oop_size_offset; | |
151 static int static_oop_field_count_offset; | |
152 | |
152 static void compute_offsets(); | 153 static void compute_offsets(); |
153 static bool offsets_computed; | 154 static bool offsets_computed; |
154 static int classRedefinedCount_offset; | 155 static int classRedefinedCount_offset; |
155 static int parallelCapable_offset; | 156 static int parallelCapable_offset; |
156 | 157 |
157 public: | 158 public: |
158 // Instance creation | 159 // Instance creation |
159 static oop create_mirror(KlassHandle k, TRAPS); | 160 static oop create_mirror(KlassHandle k, TRAPS); |
161 static void fixup_mirror(KlassHandle k, TRAPS); | |
160 static oop create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS); | 162 static oop create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS); |
161 // Conversion | 163 // Conversion |
162 static klassOop as_klassOop(oop java_class); | 164 static klassOop as_klassOop(oop java_class); |
163 static BasicType as_BasicType(oop java_class, klassOop* reference_klass = NULL); | 165 static BasicType as_BasicType(oop java_class, klassOop* reference_klass = NULL); |
164 static BasicType as_BasicType(oop java_class, KlassHandle* reference_klass) { | 166 static BasicType as_BasicType(oop java_class, KlassHandle* reference_klass) { |
189 // Support for classRedefinedCount field | 191 // Support for classRedefinedCount field |
190 static int classRedefinedCount(oop the_class_mirror); | 192 static int classRedefinedCount(oop the_class_mirror); |
191 static void set_classRedefinedCount(oop the_class_mirror, int value); | 193 static void set_classRedefinedCount(oop the_class_mirror, int value); |
192 // Support for parallelCapable field | 194 // Support for parallelCapable field |
193 static bool parallelCapable(oop the_class_mirror); | 195 static bool parallelCapable(oop the_class_mirror); |
196 | |
197 static int oop_size(oop java_class); | |
198 static void set_oop_size(oop java_class, int size); | |
199 static int static_oop_field_count(oop java_class); | |
200 static void set_static_oop_field_count(oop java_class, int size); | |
201 | |
194 // Debugging | 202 // Debugging |
195 friend class JavaClasses; | 203 friend class JavaClasses; |
196 friend class instanceKlass; // verification code accesses offsets | 204 friend class instanceKlass; // verification code accesses offsets |
197 friend class ClassFileParser; // access to number_of_fake_fields | 205 friend class ClassFileParser; // access to number_of_fake_fields |
198 }; | 206 }; |
1163 hc_static_in_offset = 0, | 1171 hc_static_in_offset = 0, |
1164 hc_static_out_offset = 1, | 1172 hc_static_out_offset = 1, |
1165 hc_static_err_offset = 2 | 1173 hc_static_err_offset = 2 |
1166 }; | 1174 }; |
1167 | 1175 |
1168 static int offset_of_static_fields; | |
1169 static int static_in_offset; | 1176 static int static_in_offset; |
1170 static int static_out_offset; | 1177 static int static_out_offset; |
1171 static int static_err_offset; | 1178 static int static_err_offset; |
1172 | |
1173 static void compute_offsets(); | |
1174 | 1179 |
1175 public: | 1180 public: |
1176 static int in_offset_in_bytes(); | 1181 static int in_offset_in_bytes(); |
1177 static int out_offset_in_bytes(); | 1182 static int out_offset_in_bytes(); |
1178 static int err_offset_in_bytes(); | 1183 static int err_offset_in_bytes(); |