diff options
Diffstat (limited to 'test/497-inlining-and-class-loader/clear_dex_cache.cc')
-rw-r--r-- | test/497-inlining-and-class-loader/clear_dex_cache.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/497-inlining-and-class-loader/clear_dex_cache.cc b/test/497-inlining-and-class-loader/clear_dex_cache.cc index 1597c4a65d..3f2df29472 100644 --- a/test/497-inlining-and-class-loader/clear_dex_cache.cc +++ b/test/497-inlining-and-class-loader/clear_dex_cache.cc @@ -17,7 +17,7 @@ #include "art_method-inl.h" #include "base/enums.h" #include "jni.h" -#include "scoped_thread_state_change.h" +#include "scoped_thread_state_change-inl.h" #include "stack.h" #include "thread.h" @@ -29,7 +29,7 @@ extern "C" JNIEXPORT jobject JNICALL Java_Main_cloneResolvedMethods(JNIEnv* env, jclass, jclass cls) { ScopedObjectAccess soa(Thread::Current()); - mirror::DexCache* dex_cache = soa.Decode<mirror::Class*>(cls)->GetDexCache(); + mirror::DexCache* dex_cache = soa.Decode<mirror::Class>(cls)->GetDexCache(); size_t num_methods = dex_cache->NumResolvedMethods(); ArtMethod** methods = dex_cache->GetResolvedMethods(); CHECK_EQ(num_methods != 0u, methods != nullptr); @@ -43,7 +43,7 @@ extern "C" JNIEXPORT jobject JNICALL Java_Main_cloneResolvedMethods(JNIEnv* env, array = env->NewLongArray(num_methods); } CHECK(array != nullptr); - mirror::PointerArray* pointer_array = soa.Decode<mirror::PointerArray*>(array); + mirror::PointerArray* pointer_array = soa.Decode<mirror::PointerArray>(array).Decode(); for (size_t i = 0; i != num_methods; ++i) { ArtMethod* method = mirror::DexCache::GetElementPtrSize(methods, i, kRuntimePointerSize); pointer_array->SetElementPtrSize(i, method, kRuntimePointerSize); @@ -54,11 +54,11 @@ extern "C" JNIEXPORT jobject JNICALL Java_Main_cloneResolvedMethods(JNIEnv* env, extern "C" JNIEXPORT void JNICALL Java_Main_restoreResolvedMethods( JNIEnv*, jclass, jclass cls, jobject old_cache) { ScopedObjectAccess soa(Thread::Current()); - mirror::DexCache* dex_cache = soa.Decode<mirror::Class*>(cls)->GetDexCache(); + mirror::DexCache* dex_cache = soa.Decode<mirror::Class>(cls)->GetDexCache(); size_t num_methods = dex_cache->NumResolvedMethods(); - ArtMethod** methods = soa.Decode<mirror::Class*>(cls)->GetDexCache()->GetResolvedMethods(); + ArtMethod** methods = soa.Decode<mirror::Class>(cls)->GetDexCache()->GetResolvedMethods(); CHECK_EQ(num_methods != 0u, methods != nullptr); - mirror::PointerArray* old = soa.Decode<mirror::PointerArray*>(old_cache); + ObjPtr<mirror::PointerArray> old = soa.Decode<mirror::PointerArray>(old_cache); CHECK_EQ(methods != nullptr, old != nullptr); CHECK_EQ(num_methods, static_cast<size_t>(old->GetLength())); for (size_t i = 0; i != num_methods; ++i) { |