summaryrefslogtreecommitdiff
path: root/compiler/dex/verified_method.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-11-06 20:02:24 -0800
committer Mathieu Chartier <mathieuc@google.com> 2017-11-13 09:18:38 -0800
commit3da1d0f0881e130ebab95e2d06abe7d2beff57f0 (patch)
tree00b655e97955b317e995e4884ac726a1146b489d /compiler/dex/verified_method.cc
parent5552e535951f2feb10bfd492b8abb54bd41a9f4b (diff)
Use CodeItemAccessor helpers for method verifier
Create a code_item_accessor_ in the verifier and replace the existing code_item field. Added some handling in DexFile to deal with try/catch items. Bug: 63756964 Test: test-art-host Change-Id: I4e073c9cb29f94518f0016fccbe1628185884df4
Diffstat (limited to 'compiler/dex/verified_method.cc')
-rw-r--r--compiler/dex/verified_method.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/dex/verified_method.cc b/compiler/dex/verified_method.cc
index df75e07c3f..524b0a6911 100644
--- a/compiler/dex/verified_method.cc
+++ b/compiler/dex/verified_method.cc
@@ -20,6 +20,7 @@
#include <memory>
#include "base/logging.h"
+#include "code_item_accessors-inl.h"
#include "dex_file.h"
#include "dex_instruction-inl.h"
#include "runtime.h"
@@ -64,7 +65,7 @@ void VerifiedMethod::GenerateSafeCastSet(verifier::MethodVerifier* method_verifi
if (method_verifier->HasFailures()) {
return;
}
- for (const DexInstructionPcPair& pair : method_verifier->CodeItem()->Instructions()) {
+ for (const DexInstructionPcPair& pair : method_verifier->CodeItem()) {
const Instruction& inst = pair.Inst();
const Instruction::Code code = inst.Opcode();
if (code == Instruction::CHECK_CAST) {