Mercurial > hg > truffle
comparison src/share/vm/c1x/c1x_Compiler.hpp @ 1425:98fffb304868
tlab-allocated "new instance", invokespecial, support for static fields in COMPILER_CLASSES_DO
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Tue, 17 Aug 2010 17:34:25 -0700 |
parents | 760213a60e8b |
children | 149b1d2316de |
comparison
equal
deleted
inserted
replaced
1424:1ea65e9d943c | 1425:98fffb304868 |
---|---|
186 | 186 |
187 | 187 |
188 // defines the structure of the CiTargetMethod - classes | 188 // defines the structure of the CiTargetMethod - classes |
189 // this will generate classes with accessors similar to javaClasses.hpp | 189 // this will generate classes with accessors similar to javaClasses.hpp |
190 | 190 |
191 #define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, long_field, oop_field) \ | 191 #define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, long_field, oop_field, static_oop_field) \ |
192 start_class(HotSpotTypeResolved) \ | 192 start_class(HotSpotTypeResolved) \ |
193 long_field(HotSpotTypeResolved, vmId) \ | 193 long_field(HotSpotTypeResolved, vmId) \ |
194 end_class \ | 194 end_class \ |
195 start_class(HotSpotMethod) \ | 195 start_class(HotSpotMethod) \ |
196 long_field(HotSpotMethod, vmId) \ | 196 long_field(HotSpotMethod, vmId) \ |
259 end_class \ | 259 end_class \ |
260 start_class(CiKind) \ | 260 start_class(CiKind) \ |
261 char_field(CiKind, typeChar) \ | 261 char_field(CiKind, typeChar) \ |
262 end_class \ | 262 end_class \ |
263 start_class(CiRuntimeCall) \ | 263 start_class(CiRuntimeCall) \ |
264 static_oop_field(CiRuntimeCall, Debug, "Lcom/sun/cri/ci/CiRuntimeCall;"); \ | |
264 end_class \ | 265 end_class \ |
265 start_class(RiMethod) \ | 266 start_class(RiMethod) \ |
266 end_class \ | 267 end_class \ |
267 start_class(CiRegisterValue) \ | 268 start_class(CiRegisterValue) \ |
268 end_class \ | 269 end_class \ |
290 | 291 |
291 #define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field) | 292 #define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field) |
292 #define INT_FIELD(klass, name) FIELD(name, jint, int_field) | 293 #define INT_FIELD(klass, name) FIELD(name, jint, int_field) |
293 #define LONG_FIELD(klass, name) FIELD(name, jlong, long_field) | 294 #define LONG_FIELD(klass, name) FIELD(name, jlong, long_field) |
294 #define OOP_FIELD(klass, name, signature) FIELD(name, oop, obj_field) | 295 #define OOP_FIELD(klass, name, signature) FIELD(name, oop, obj_field) |
295 | 296 #define STATIC_OOP_FIELD(klassName, name, signature) \ |
296 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, LONG_FIELD, OOP_FIELD) | 297 static int _##name##_offset; \ |
298 static oop name() { return klassName::klass()->obj_field(_##name##_offset); } \ | |
299 static void set_##name(oop x) { klassName::klass()->obj_field_put(_##name##_offset, x); } | |
300 | |
301 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, LONG_FIELD, OOP_FIELD, STATIC_OOP_FIELD) | |
297 #undef START_CLASS | 302 #undef START_CLASS |
298 #undef END_CLASS | 303 #undef END_CLASS |
299 #undef FIELD | 304 #undef FIELD |
300 #undef CHAR_FIELD | 305 #undef CHAR_FIELD |
301 #undef INT_FIELD | 306 #undef INT_FIELD |
302 #undef LONG_FIELD | 307 #undef LONG_FIELD |
303 #undef OOP_FIELD | 308 #undef OOP_FIELD |
304 | 309 #undef STATIC_OOP_FIELD |
305 | 310 |
311 |