From 321b987ef037c44c0ed4e0e82661c88959a6239f Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 24 Nov 2014 16:33:51 +0000 Subject: Further cleanup using dex_instruction_utils.h. Change-Id: I85aa9e7d744b37ee3d2531c50470cd3fa87dc864 --- compiler/utils/dex_instruction_utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/utils/dex_instruction_utils.h') diff --git a/compiler/utils/dex_instruction_utils.h b/compiler/utils/dex_instruction_utils.h index ad7d750dea..2c6e525e1d 100644 --- a/compiler/utils/dex_instruction_utils.h +++ b/compiler/utils/dex_instruction_utils.h @@ -49,6 +49,10 @@ std::ostream& operator<<(std::ostream& os, const DexMemAccessType& type); // NOTE: The following functions disregard quickened instructions. +constexpr bool IsInstructionReturn(Instruction::Code opcode) { + return Instruction::RETURN_VOID <= opcode && opcode <= Instruction::RETURN_OBJECT; +} + constexpr bool IsInstructionInvoke(Instruction::Code opcode) { return Instruction::INVOKE_VIRTUAL <= opcode && opcode <= Instruction::INVOKE_INTERFACE_RANGE && opcode != Instruction::RETURN_VOID_BARRIER; -- cgit v1.2.3-59-g8ed1b