From 0795f23920ee9aabf28e45c63cd592dcccf00216 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 27 Sep 2016 18:43:30 -0700 Subject: Clean up ScopedThreadStateChange to use ObjPtr Also fixed inclusion of -inl.h files in .h files by adding scoped_object_access-inl.h and scoped_fast_natvie_object_access-inl.h Changed AddLocalReference / Decode to use ObjPtr. Changed libartbenchmark to be debug to avoid linkage errors. Bug: 31113334 Test: test-art-host Change-Id: I4d2e160483a29d21e1e0e440585ed328b9811483 --- runtime/native/java_lang_Object.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'runtime/native/java_lang_Object.cc') diff --git a/runtime/native/java_lang_Object.cc b/runtime/native/java_lang_Object.cc index 2a36059a17..6493865c99 100644 --- a/runtime/native/java_lang_Object.cc +++ b/runtime/native/java_lang_Object.cc @@ -18,39 +18,35 @@ #include "jni_internal.h" #include "mirror/object-inl.h" -#include "scoped_fast_native_object_access.h" +#include "scoped_fast_native_object_access-inl.h" namespace art { static jobject Object_internalClone(JNIEnv* env, jobject java_this) { ScopedFastNativeObjectAccess soa(env); - mirror::Object* o = soa.Decode(java_this); + ObjPtr o = soa.Decode(java_this); return soa.AddLocalReference(o->Clone(soa.Self())); } static void Object_notify(JNIEnv* env, jobject java_this) { ScopedFastNativeObjectAccess soa(env); - mirror::Object* o = soa.Decode(java_this); - o->Notify(soa.Self()); + soa.Decode(java_this)->Notify(soa.Self()); } static void Object_notifyAll(JNIEnv* env, jobject java_this) { ScopedFastNativeObjectAccess soa(env); - mirror::Object* o = soa.Decode(java_this); - o->NotifyAll(soa.Self()); + soa.Decode(java_this)->NotifyAll(soa.Self()); } static void Object_wait(JNIEnv* env, jobject java_this) { ScopedFastNativeObjectAccess soa(env); - mirror::Object* o = soa.Decode(java_this); - o->Wait(soa.Self()); + soa.Decode(java_this)->Wait(soa.Self()); } static void Object_waitJI(JNIEnv* env, jobject java_this, jlong ms, jint ns) { ScopedFastNativeObjectAccess soa(env); - mirror::Object* o = soa.Decode(java_this); - o->Wait(soa.Self(), ms, ns); + soa.Decode(java_this)->Wait(soa.Self(), ms, ns); } static JNINativeMethod gMethods[] = { -- cgit v1.2.3-59-g8ed1b