Mercurial > hg > graal-jvmci-8
comparison src/share/vm/jvmci/jvmciJavaClasses.hpp @ 22728:eb2091fcd682
Pass Handle per value.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Mon, 09 Nov 2015 14:34:33 +0100 |
parents | ea58bbafd5b9 |
children | ab84ba890aa4 |
comparison
equal
deleted
inserted
replaced
22727:9860aa60385f | 22728:eb2091fcd682 |
---|---|
293 #define END_CLASS }; | 293 #define END_CLASS }; |
294 | 294 |
295 #define FIELD(name, type, accessor, cast) \ | 295 #define FIELD(name, type, accessor, cast) \ |
296 static int _##name##_offset; \ | 296 static int _##name##_offset; \ |
297 static type name(oop obj) { check(obj, #name, _##name##_offset); return cast obj->accessor(_##name##_offset); } \ | 297 static type name(oop obj) { check(obj, #name, _##name##_offset); return cast obj->accessor(_##name##_offset); } \ |
298 static type name(Handle& obj) { check(obj(), #name, _##name##_offset); return cast obj->accessor(_##name##_offset); } \ | 298 static type name(Handle obj) { check(obj(), #name, _##name##_offset); return cast obj->accessor(_##name##_offset); } \ |
299 static type name(jobject obj) { check(JNIHandles::resolve(obj), #name, _##name##_offset); return cast JNIHandles::resolve(obj)->accessor(_##name##_offset); } \ | 299 static type name(jobject obj) { check(JNIHandles::resolve(obj), #name, _##name##_offset); return cast JNIHandles::resolve(obj)->accessor(_##name##_offset); } \ |
300 static void set_##name(oop obj, type x) { check(obj, #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); } \ | 300 static void set_##name(oop obj, type x) { check(obj, #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); } \ |
301 static void set_##name(Handle& obj, type x) { check(obj(), #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); } \ | 301 static void set_##name(Handle obj, type x) { check(obj(), #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); } \ |
302 static void set_##name(jobject obj, type x) { check(JNIHandles::resolve(obj), #name, _##name##_offset); JNIHandles::resolve(obj)->accessor##_put(_##name##_offset, x); } | 302 static void set_##name(jobject obj, type x) { check(JNIHandles::resolve(obj), #name, _##name##_offset); JNIHandles::resolve(obj)->accessor##_put(_##name##_offset, x); } |
303 | 303 |
304 #define EMPTY_CAST | 304 #define EMPTY_CAST |
305 #define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field, EMPTY_CAST) | 305 #define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field, EMPTY_CAST) |
306 #define INT_FIELD(klass, name) FIELD(name, jint, int_field, EMPTY_CAST) | 306 #define INT_FIELD(klass, name) FIELD(name, jint, int_field, EMPTY_CAST) |