Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalJavaAccess.hpp @ 19788:b3f566135b56
Fix broken windows build.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 11 Mar 2015 15:44:32 +0100 |
parents | 29916dcee0b8 |
children | 00c4aa355659 |
comparison
equal
deleted
inserted
replaced
19787:b249bdba508b | 19788:b3f566135b56 |
---|---|
315 oop_store((narrowOop *)addr, x); \ | 315 oop_store((narrowOop *)addr, x); \ |
316 } else { \ | 316 } else { \ |
317 oop_store((oop*)addr, x); \ | 317 oop_store((oop*)addr, x); \ |
318 } \ | 318 } \ |
319 } | 319 } |
320 #define STATIC_PRIMITIVE_FIELD(klassName, name, typename, jtypename) \ | 320 #define STATIC_PRIMITIVE_FIELD(klassName, name, typename, jtypename, boolCompare) \ |
321 static int _##name##_offset; \ | 321 static int _##name##_offset; \ |
322 static typename name() { \ | 322 static typename name() { \ |
323 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \ | 323 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \ |
324 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \ | 324 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \ |
325 return *((jtypename *)addr); \ | 325 return *((jtypename *)addr) boolCompare; \ |
326 } \ | 326 } \ |
327 static void set_##name(typename x) { \ | 327 static void set_##name(typename x) { \ |
328 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \ | 328 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \ |
329 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \ | 329 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \ |
330 *((jtypename *)addr) = x; \ | 330 *((jtypename *)addr) = x; \ |
331 } | 331 } |
332 #define STATIC_INT_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, int, jint) | 332 |
333 #define STATIC_BOOLEAN_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, bool, jboolean) | 333 #define STATIC_INT_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, int, jint,) |
334 #define STATIC_BOOLEAN_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, bool, jboolean, != 0) | |
334 | 335 |
335 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, TYPEARRAYOOP_FIELD, OBJARRAYOOP_FIELD, STATIC_OOP_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD) | 336 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, TYPEARRAYOOP_FIELD, OBJARRAYOOP_FIELD, STATIC_OOP_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD) |
336 #undef START_CLASS | 337 #undef START_CLASS |
337 #undef END_CLASS | 338 #undef END_CLASS |
338 #undef FIELD | 339 #undef FIELD |