Various improvements to interpreter.
- Created separate Next_xxx methods to get the next instruction to
avoid having to look up the size based on the opcode.
- Moved exception handling to after throwing instructions only.
- Added a test of all thread flags before checking for suspend during
the interpreter execute loop.
- Made it unlikely that instrumentation has dex pc listeners for
DexPcMovedEvent.
Change-Id: I88afc98cf42f2e36c747582df8e74669d24ef864
diff --git a/src/dex_instruction-inl.h b/src/dex_instruction-inl.h
index 66fbd29..99dab12 100644
--- a/src/dex_instruction-inl.h
+++ b/src/dex_instruction-inl.h
@@ -21,6 +21,13 @@
namespace art {
+inline const Instruction* Instruction::Next_51l() const {
+ DCHECK_EQ(FormatOf(Opcode()), k51l);
+ size_t current_size_in_bytes = 5 * sizeof(uint16_t);
+ const uint8_t* ptr = reinterpret_cast<const uint8_t*>(this);
+ return reinterpret_cast<const Instruction*>(ptr + current_size_in_bytes);
+}
+
//------------------------------------------------------------------------------
// VRegA
//------------------------------------------------------------------------------