summaryrefslogtreecommitdiff
path: root/test/497-inlining-and-class-loader
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-07-26 09:02:02 -0700
committer Andreas Gampe <agampe@google.com> 2016-08-01 18:54:48 -0700
commit542451cc546779f5c67840e105c51205a1b0a8fd (patch)
tree11e09bb5abaee12dddffefbe7e425291076dfa7a /test/497-inlining-and-class-loader
parent85c4a4b8c9eabfe16e4e49f9b4aa78c1bf4be023 (diff)
ART: Convert pointer size to enum
Move away from size_t to dedicated enum (class). Bug: 30373134 Bug: 30419309 Test: m test-art-host Change-Id: Id453c330f1065012e7d4f9fc24ac477cc9bb9269
Diffstat (limited to 'test/497-inlining-and-class-loader')
-rw-r--r--test/497-inlining-and-class-loader/clear_dex_cache.cc9
1 files changed, 5 insertions, 4 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 50d1a6361d..1597c4a65d 100644
--- a/test/497-inlining-and-class-loader/clear_dex_cache.cc
+++ b/test/497-inlining-and-class-loader/clear_dex_cache.cc
@@ -15,6 +15,7 @@
*/
#include "art_method-inl.h"
+#include "base/enums.h"
#include "jni.h"
#include "scoped_thread_state_change.h"
#include "stack.h"
@@ -44,8 +45,8 @@ extern "C" JNIEXPORT jobject JNICALL Java_Main_cloneResolvedMethods(JNIEnv* env,
CHECK(array != nullptr);
mirror::PointerArray* pointer_array = soa.Decode<mirror::PointerArray*>(array);
for (size_t i = 0; i != num_methods; ++i) {
- ArtMethod* method = mirror::DexCache::GetElementPtrSize(methods, i, sizeof(void*));
- pointer_array->SetElementPtrSize(i, method, sizeof(void*));
+ ArtMethod* method = mirror::DexCache::GetElementPtrSize(methods, i, kRuntimePointerSize);
+ pointer_array->SetElementPtrSize(i, method, kRuntimePointerSize);
}
return array;
}
@@ -61,8 +62,8 @@ extern "C" JNIEXPORT void JNICALL Java_Main_restoreResolvedMethods(
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) {
- ArtMethod* method = old->GetElementPtrSize<ArtMethod*>(i, sizeof(void*));
- mirror::DexCache::SetElementPtrSize(methods, i, method, sizeof(void*));
+ ArtMethod* method = old->GetElementPtrSize<ArtMethod*>(i, kRuntimePointerSize);
+ mirror::DexCache::SetElementPtrSize(methods, i, method, kRuntimePointerSize);
}
}