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_System.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'runtime/native/java_lang_System.cc') diff --git a/runtime/native/java_lang_System.cc b/runtime/native/java_lang_System.cc index 1b399aa251..8b9d0c7578 100644 --- a/runtime/native/java_lang_System.cc +++ b/runtime/native/java_lang_System.cc @@ -24,7 +24,7 @@ #include "mirror/class-inl.h" #include "mirror/object-inl.h" #include "mirror/object_array-inl.h" -#include "scoped_fast_native_object_access.h" +#include "scoped_fast_native_object_access-inl.h" namespace art { @@ -60,14 +60,14 @@ static void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, } // Make sure source and destination are both arrays. - mirror::Object* srcObject = soa.Decode(javaSrc); + ObjPtr srcObject = soa.Decode(javaSrc); if (UNLIKELY(!srcObject->IsArrayInstance())) { - ThrowArrayStoreException_NotAnArray("source", srcObject); + ThrowArrayStoreException_NotAnArray("source", srcObject.Decode()); return; } - mirror::Object* dstObject = soa.Decode(javaDst); + ObjPtr dstObject = soa.Decode(javaDst); if (UNLIKELY(!dstObject->IsArrayInstance())) { - ThrowArrayStoreException_NotAnArray("destination", dstObject); + ThrowArrayStoreException_NotAnArray("destination", dstObject.Decode()); return; } mirror::Array* srcArray = srcObject->AsArray(); @@ -164,8 +164,8 @@ template inline void System_arraycopyTUnchecked(JNIEnv* env, jobject javaSrc, jint srcPos, jobject javaDst, jint dstPos, jint count) { ScopedFastNativeObjectAccess soa(env); - mirror::Object* srcObject = soa.Decode(javaSrc); - mirror::Object* dstObject = soa.Decode(javaDst); + ObjPtr srcObject = soa.Decode(javaSrc); + ObjPtr dstObject = soa.Decode(javaDst); DCHECK(dstObject != nullptr); mirror::Array* srcArray = srcObject->AsArray(); mirror::Array* dstArray = dstObject->AsArray(); @@ -228,7 +228,7 @@ static jint System_identityHashCode(JNIEnv* env, jclass, jobject javaObject) { return 0; } ScopedFastNativeObjectAccess soa(env); - mirror::Object* o = soa.Decode(javaObject); + ObjPtr o = soa.Decode(javaObject); return static_cast(o->IdentityHashCode()); } -- cgit v1.2.3-59-g8ed1b