From 05792b98980741111b4d0a24d68cff2a8e070a3a Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 3 Aug 2015 11:56:49 +0100 Subject: ART: Move DexCache arrays to native. This CL has a companion CL in libcore/ https://android-review.googlesource.com/162985 Change-Id: Icbc9e20ad1b565e603195b12714762bb446515fa --- compiler/driver/compiler_driver.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 6d3a960048..950f8249cd 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -836,16 +836,17 @@ class ResolveCatchBlockExceptionsClassVisitor : public ClassVisitor { virtual bool Visit(mirror::Class* c) OVERRIDE SHARED_REQUIRES(Locks::mutator_lock_) { const auto pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize(); for (auto& m : c->GetVirtualMethods(pointer_size)) { - ResolveExceptionsForMethod(&m); + ResolveExceptionsForMethod(&m, pointer_size); } for (auto& m : c->GetDirectMethods(pointer_size)) { - ResolveExceptionsForMethod(&m); + ResolveExceptionsForMethod(&m, pointer_size); } return true; } private: - void ResolveExceptionsForMethod(ArtMethod* method_handle) SHARED_REQUIRES(Locks::mutator_lock_) { + void ResolveExceptionsForMethod(ArtMethod* method_handle, size_t pointer_size) + SHARED_REQUIRES(Locks::mutator_lock_) { const DexFile::CodeItem* code_item = method_handle->GetCodeItem(); if (code_item == nullptr) { return; // native or abstract method @@ -866,7 +867,8 @@ class ResolveCatchBlockExceptionsClassVisitor : public ClassVisitor { uint16_t encoded_catch_handler_handlers_type_idx = DecodeUnsignedLeb128(&encoded_catch_handler_list); // Add to set of types to resolve if not already in the dex cache resolved types - if (!method_handle->IsResolvedTypeIdx(encoded_catch_handler_handlers_type_idx)) { + if (!method_handle->IsResolvedTypeIdx(encoded_catch_handler_handlers_type_idx, + pointer_size)) { exceptions_to_resolve_.emplace(encoded_catch_handler_handlers_type_idx, method_handle->GetDexFile()); } -- cgit v1.2.3-59-g8ed1b