summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2014-01-27 11:15:17 +0000
committerVladimir Marko <vmarko@google.com>2014-01-28 11:22:42 +0000
commit2730db03beee4d6687ddfb5000c33c0370fbc6eb (patch)
treea85706c800c67deda5c7b612c8010059aa7b365c /compiler/dex/quick/codegen_util.cc
parentc7f832061fea59fd6abd125f26c8ca1faec695a5 (diff)
downloadart-2730db03beee4d6687ddfb5000c33c0370fbc6eb.tar.gz
art-2730db03beee4d6687ddfb5000c33c0370fbc6eb.tar.bz2
art-2730db03beee4d6687ddfb5000c33c0370fbc6eb.zip
Add VerfiedMethod to DexCompilationUnit.
Avoid some mutex locking and map lookups. Change-Id: I8e0486af77e38dcd065569572a6b985eb57f4f63
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc9
1 files changed, 5 insertions, 4 deletions
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<uint8_t>* 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<uint8_t>& 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(),