From 2730db03beee4d6687ddfb5000c33c0370fbc6eb Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 27 Jan 2014 11:15:17 +0000 Subject: Add VerfiedMethod to DexCompilationUnit. Avoid some mutex locking and map lookups. Change-Id: I8e0486af77e38dcd065569572a6b985eb57f4f63 --- compiler/dex/quick/codegen_util.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'compiler/dex/quick/codegen_util.cc') diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc index cb3681395c..7f19ea1eb9 100644 --- a/compiler/dex/quick/codegen_util.cc +++ b/compiler/dex/quick/codegen_util.cc @@ -22,6 +22,7 @@ #include "dex/quick/dex_file_method_inliner.h" #include "dex/quick/dex_file_to_method_inliner_map.h" #include "dex/verification_results.h" +#include "dex/verified_method.h" #include "verifier/dex_gc_map.h" #include "verifier/method_verifier.h" @@ -763,10 +764,10 @@ void Mir2Lir::CreateNativeGcMap() { } } MethodReference method_ref(cu_->dex_file, cu_->method_idx); - const std::vector* gc_map_raw = - cu_->compiler_driver->GetVerificationResults()->GetDexGcMap(method_ref); - verifier::DexPcToReferenceMap dex_gc_map(&(*gc_map_raw)[0]); - DCHECK_EQ(gc_map_raw->size(), dex_gc_map.RawSize()); + const std::vector& gc_map_raw = + mir_graph_->GetCurrentDexCompilationUnit()->GetVerifiedMethod()->GetDexGcMap(); + verifier::DexPcToReferenceMap dex_gc_map(&(gc_map_raw)[0]); + DCHECK_EQ(gc_map_raw.size(), dex_gc_map.RawSize()); // Compute native offset to references size. NativePcToReferenceMapBuilder native_gc_map_builder(&native_gc_map_, mapping_table.PcToDexSize(), -- cgit v1.2.3