本文整理汇总了C++中DexInstruction::set_dest方法的典型用法代码示例。如果您正苦于以下问题:C++ DexInstruction::set_dest方法的具体用法?C++ DexInstruction::set_dest怎么用?C++ DexInstruction::set_dest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DexInstruction
的用法示例。
在下文中一共展示了DexInstruction::set_dest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load_const
void MethodBlock::load_const(Location& loc, DexType* value) {
always_assert(!loc.is_wide());
DexInstruction* load = new DexOpcodeType(OPCODE_CONST_CLASS, value);
load->set_dest(reg_num(loc));
loc.type = get_class_type();
push_instruction(load);
}
示例2: load_null
void MethodBlock::load_null(Location& loc) {
always_assert(!loc.is_wide());
DexInstruction* load = new DexInstruction(OPCODE_CONST_4);
load->set_dest(reg_num(loc));
load->set_literal(0);
loc.type = get_object_type();
push_instruction(load);
}
示例3: move
void MethodBlock::move(Location src, Location& dst) {
always_assert(src.is_compatible(dst.type));
auto ch = type_shorty(dst.type);
assert(ch != 'V');
DexOpcode opcode;
if (ch == 'L')
opcode = OPCODE_MOVE_OBJECT;
else if (ch == 'J' || ch == 'D')
opcode = OPCODE_MOVE_WIDE;
else
opcode = OPCODE_MOVE;
DexInstruction* move = new DexInstruction(opcode);
move->set_dest(reg_num(dst));
move->set_src(0, reg_num(src));
dst.type = src.type;
push_instruction(move);
}
示例4: code
std::unique_ptr<DexCode>& MethodCreator::to_code() {
std::unique_ptr<DexCode> code(new DexCode());
code->set_registers_size(top_reg);
code->set_ins_size(ins_count());
code->set_outs_size(out_count);
method->set_code(std::move(code));
for (auto& mi : *meth_code->m_fmethod) {
if (mi.type == MFLOW_OPCODE) {
DexInstruction* insn = mi.insn;
if (insn->dests_size()) {
insn->set_dest(get_real_reg_num(insn->dest()));
}
for (int i = 0; i < static_cast<int>(insn->srcs_size()); i++) {
insn->set_src(i, get_real_reg_num(insn->src(i)));
}
}
}
while (!meth_code->try_sync())
;
return method->get_code();
}