Mercurial > hg > truffle
diff src/share/vm/prims/unsafe.cpp @ 12873:4e7f99b70d9d
Merge
author | adlertz |
---|---|
date | Wed, 09 Oct 2013 05:03:34 -0700 |
parents | 190899198332 |
children | cefad50507d8 4f6bf7dd3f52 c6d7e7406136 |
line wrap: on
line diff
--- a/src/share/vm/prims/unsafe.cpp Wed Oct 09 13:00:20 2013 +0200 +++ b/src/share/vm/prims/unsafe.cpp Wed Oct 09 05:03:34 2013 -0700 @@ -292,9 +292,9 @@ volatile oop v; if (UseCompressedOops) { volatile narrowOop n = *(volatile narrowOop*) addr; - v = oopDesc::decode_heap_oop(n); + (void)const_cast<oop&>(v = oopDesc::decode_heap_oop(n)); } else { - v = *(volatile oop*) addr; + (void)const_cast<oop&>(v = *(volatile oop*) addr); } OrderAccess::acquire(); return JNIHandles::make_local(env, v); @@ -1222,9 +1222,9 @@ #endif /* USDT2 */ if (event.should_commit()) { oop obj = thread->current_park_blocker(); - event.set_klass(obj ? obj->klass() : NULL); + event.set_klass((obj != NULL) ? obj->klass() : NULL); event.set_timeout(time); - event.set_address(obj ? (TYPE_ADDRESS) (uintptr_t) obj : 0); + event.set_address((obj != NULL) ? (TYPE_ADDRESS) cast_from_oop<uintptr_t>(obj) : 0); event.commit(); } UNSAFE_END