Lines Matching refs:Instruction
172 class Instruction {
201 static inline Instruction OpNoArgs(Op opcode) { in OpNoArgs()
202 return Instruction{opcode, /*index_argument*/ 0, /*dest*/ {}}; in OpNoArgs()
206 static inline Instruction OpWithArgs(Op opcode, std::optional<const Value> dest, in OpWithArgs()
208 return Instruction{opcode, /*index_argument=*/0, /*result_is_object=*/false, dest, args...}; in OpWithArgs()
212 static inline Instruction Cast(Value val, Value type) { in Cast()
219 static inline Instruction InvokeVirtual(size_t index_argument, std::optional<const Value> dest, in InvokeVirtual()
221 return Instruction{ in InvokeVirtual()
226 static inline Instruction InvokeVirtualObject(size_t index_argument, in InvokeVirtualObject()
229 return Instruction{ in InvokeVirtualObject()
234 static inline Instruction InvokeDirect(size_t index_argument, std::optional<const Value> dest, in InvokeDirect()
236 return Instruction{ in InvokeDirect()
241 static inline Instruction InvokeDirectObject(size_t index_argument, in InvokeDirectObject()
244 return Instruction{ in InvokeDirectObject()
249 static inline Instruction InvokeStatic(size_t index_argument, std::optional<const Value> dest, in InvokeStatic()
251 return Instruction{ in InvokeStatic()
256 static inline Instruction InvokeStaticObject(size_t index_argument, in InvokeStaticObject()
258 return Instruction{Op::kInvokeStatic, index_argument, /*result_is_object=*/true, dest, args...}; in InvokeStaticObject()
262 static inline Instruction InvokeInterface(size_t index_argument, std::optional<const Value> dest, in InvokeInterface()
264 return Instruction{ in InvokeInterface()
268 static inline Instruction GetStaticField(size_t field_id, Value dest) { in GetStaticField()
269 return Instruction{Op::kGetStaticField, field_id, dest}; in GetStaticField()
272 static inline Instruction SetStaticField(size_t field_id, Value value) { in SetStaticField()
273 return Instruction{ in SetStaticField()
277 static inline Instruction GetField(size_t field_id, Value dest, Value object) { in GetField()
278 return Instruction{Op::kGetInstanceField, field_id, /*result_is_object=*/false, dest, object}; in GetField()
281 static inline Instruction SetField(size_t field_id, Value object, Value value) { in SetField()
282 return Instruction{ in SetField()
297 inline Instruction(Op opcode, size_t index_argument, std::optional<const Value> dest) in Instruction() function
305 inline Instruction(Op opcode, size_t index_argument, bool result_is_object, in Instruction() function
322 std::ostream& operator<<(std::ostream& out, const Instruction::Op& opcode);
347 void AddInstruction(Instruction instruction);
364 void EncodeInstruction(const Instruction& instruction);
369 void EncodeReturn(const Instruction& instruction, ::dex::Opcode opcode);
371 void EncodeMove(const Instruction& instruction);
372 void EncodeInvoke(const Instruction& instruction, ::dex::Opcode opcode);
373 void EncodeBranch(::dex::Opcode op, const Instruction& instruction);
374 void EncodeNew(const Instruction& instruction);
375 void EncodeCast(const Instruction& instruction);
376 void EncodeFieldOp(const Instruction& instruction);
481 std::vector<Instruction> instructions_;
618 Instruction::OpWithArgs(Instruction::Op::kNew, target, Value::Type(type_def->orig_index))); in BuildNew()
620 AddInstruction(Instruction::InvokeDirect(constructor_data.id, /*dest=*/{}, target, args...)); in BuildNew()