comparison src/share/vm/graal/graalJavaAccess.hpp @ 15264:29e3ba750c9e

graalCodeInstaller translate BytecodeFrame::BEFORE_BCI into SynchronizationEntryBCI
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 22 Apr 2014 15:12:38 +0200
parents 7a9531f50cd8
children a20be10ad437
comparison
equal deleted inserted replaced
15263:0b25b81414c9 15264:29e3ba750c9e
45 * static void set_index(jobject obj, jint x); 45 * static void set_index(jobject obj, jint x);
46 * }; 46 * };
47 * 47 *
48 */ 48 */
49 49
50 #define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, boolean_field, long_field, float_field, oop_field, static_oop_field) \ 50 #define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, boolean_field, long_field, float_field, oop_field, static_oop_field, static_int_field) \
51 start_class(HotSpotResolvedObjectType) \ 51 start_class(HotSpotResolvedObjectType) \
52 oop_field(HotSpotResolvedObjectType, javaClass, "Ljava/lang/Class;") \ 52 oop_field(HotSpotResolvedObjectType, javaClass, "Ljava/lang/Class;") \
53 end_class \ 53 end_class \
54 start_class(HotSpotResolvedJavaMethod) \ 54 start_class(HotSpotResolvedJavaMethod) \
55 oop_field(HotSpotResolvedJavaMethod, name, "Ljava/lang/String;") \ 55 oop_field(HotSpotResolvedJavaMethod, name, "Ljava/lang/String;") \
194 int_field(BytecodeFrame, numLocals) \ 194 int_field(BytecodeFrame, numLocals) \
195 int_field(BytecodeFrame, numStack) \ 195 int_field(BytecodeFrame, numStack) \
196 int_field(BytecodeFrame, numLocks) \ 196 int_field(BytecodeFrame, numLocks) \
197 boolean_field(BytecodeFrame, rethrowException) \ 197 boolean_field(BytecodeFrame, rethrowException) \
198 boolean_field(BytecodeFrame, duringCall) \ 198 boolean_field(BytecodeFrame, duringCall) \
199 static_int_field(BytecodeFrame, BEFORE_BCI) \
199 end_class \ 200 end_class \
200 start_class(BytecodePosition) \ 201 start_class(BytecodePosition) \
201 oop_field(BytecodePosition, caller, "Lcom/oracle/graal/api/code/BytecodePosition;") \ 202 oop_field(BytecodePosition, caller, "Lcom/oracle/graal/api/code/BytecodePosition;") \
202 oop_field(BytecodePosition, method, "Lcom/oracle/graal/api/meta/ResolvedJavaMethod;") \ 203 oop_field(BytecodePosition, method, "Lcom/oracle/graal/api/meta/ResolvedJavaMethod;") \
203 int_field(BytecodePosition, bci) \ 204 int_field(BytecodePosition, bci) \
311 oop_store((narrowOop *)addr, x); \ 312 oop_store((narrowOop *)addr, x); \
312 } else { \ 313 } else { \
313 oop_store((oop*)addr, x); \ 314 oop_store((oop*)addr, x); \
314 } \ 315 } \
315 } 316 }
316 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, STATIC_OOP_FIELD) 317 #define STATIC_INT_FIELD(klassName, name) \
318 static int _##name##_offset; \
319 static int name() { \
320 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \
321 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
322 return *((jint *)addr); \
323 } \
324 static void set_##name(int x) { \
325 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \
326 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
327 *((jint *)addr) = x; \
328 }
329 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, STATIC_OOP_FIELD, STATIC_INT_FIELD)
317 #undef START_CLASS 330 #undef START_CLASS
318 #undef END_CLASS 331 #undef END_CLASS
319 #undef FIELD 332 #undef FIELD
320 #undef CHAR_FIELD 333 #undef CHAR_FIELD
321 #undef INT_FIELD 334 #undef INT_FIELD
322 #undef BOOLEAN_FIELD 335 #undef BOOLEAN_FIELD
323 #undef LONG_FIELD 336 #undef LONG_FIELD
324 #undef FLOAT_FIELD 337 #undef FLOAT_FIELD
325 #undef OOP_FIELD 338 #undef OOP_FIELD
326 #undef STATIC_OOP_FIELD 339 #undef STATIC_OOP_FIELD
340 #undef STATIC_INT_FIELD
327 341
328 void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field); 342 void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field);
329 343
330 #endif // SHARE_VM_GRAAL_GRAAL_JAVA_ACCESS_HPP 344 #endif // SHARE_VM_GRAAL_GRAAL_JAVA_ACCESS_HPP