Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalJavaAccess.hpp @ 3685:5c8fc9f05960
Merge
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 18 Nov 2011 13:34:10 +0100 |
parents | 6c04a4f268e5 e0bbc6b1c4a1 |
children | 342a54994e05 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalJavaAccess.hpp Fri Nov 18 11:55:00 2011 +0100 +++ b/src/share/vm/graal/graalJavaAccess.hpp Fri Nov 18 13:34:10 2011 +0100 @@ -240,10 +240,10 @@ #define FIELD(name, type, accessor) \ static int _##name##_offset; \ static type name(oop obj) { check(obj); return obj->accessor(_##name##_offset); } \ - static type name(Handle obj) { check(obj()); return obj->accessor(_##name##_offset); } \ + static type name(Handle& obj) { check(obj()); return obj->accessor(_##name##_offset); } \ static type name(jobject obj) { check(JNIHandles::resolve(obj)); return JNIHandles::resolve(obj)->accessor(_##name##_offset); } \ static void set_##name(oop obj, type x) { check(obj); obj->accessor##_put(_##name##_offset, x); } \ - static void set_##name(Handle obj, type x) { check(obj()); obj->accessor##_put(_##name##_offset, x); } \ + static void set_##name(Handle& obj, type x) { check(obj()); obj->accessor##_put(_##name##_offset, x); } \ static void set_##name(jobject obj, type x) { check(JNIHandles::resolve(obj)); JNIHandles::resolve(obj)->accessor##_put(_##name##_offset, x); } #define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field) @@ -267,9 +267,9 @@ instanceKlass* ik = instanceKlass::cast(klassName::klass()); \ address addr = ik->static_field_addr(_##name##_offset - instanceMirrorKlass::offset_of_static_fields()); \ if (UseCompressedOops) { \ - oopDesc::encode_store_heap_oop((narrowOop *)addr, x); \ + oop_store((narrowOop *)addr, x); \ } else { \ - oopDesc::encode_store_heap_oop((oop*)addr, x); \ + oop_store((oop*)addr, x); \ } \ } COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, STATIC_OOP_FIELD)