MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / DexSwitchTable

Method DexSwitchTable

Bcore/src/main/cpp/dex/bytecode_utils.h:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27class DexSwitchTable : public ValueObject {
28 public:
29 DexSwitchTable(const Instruction& instruction, uint32_t dex_pc)
30 : instruction_(instruction),
31 dex_pc_(dex_pc),
32 sparse_(instruction.Opcode() == Instruction::SPARSE_SWITCH) {
33 int32_t table_offset = instruction.VRegB_31t();
34 const uint16_t* table = reinterpret_cast<const uint16_t*>(&instruction) + table_offset;
35 DCHECK_EQ(table[0], sparse_ ? static_cast<uint16_t>(Instruction::kSparseSwitchSignature)
36 : static_cast<uint16_t>(Instruction::kPackedSwitchSignature));
37 num_entries_ = table[1];
38 values_ = reinterpret_cast<const int32_t*>(&table[2]);
39 }
40
41 uint16_t GetNumEntries() const {
42 return num_entries_;

Callers

nothing calls this directly

Calls 2

OpcodeMethod · 0.80
VRegB_31tMethod · 0.80

Tested by

no test coverage detected