Home
last modified time | relevance | path

Searched refs:BytecodeInstruction (Results 1 – 25 of 40) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/compiler/
Dbytecode_info_collector.cpp390 void BytecodeInfoCollector::CollectMethodInfoFromBC(const BytecodeInstruction &bcIns, in CollectMethodInfoFromBC()
394 if (!(bcIns.HasFlag(BytecodeInstruction::Flags::STRING_ID) && in CollectMethodInfoFromBC()
395 BytecodeInstruction::HasId(BytecodeInstruction::GetFormat(bcIns.GetOpcode()), 0))) { in CollectMethodInfoFromBC()
396BytecodeInstruction::Opcode opcode = static_cast<BytecodeInstruction::Opcode>(bcIns.GetOpcode()); in CollectMethodInfoFromBC()
399 case BytecodeInstruction::Opcode::DEFINEFUNC_IMM8_ID16_IMM8: in CollectMethodInfoFromBC()
400 case BytecodeInstruction::Opcode::DEFINEFUNC_IMM16_ID16_IMM8: { in CollectMethodInfoFromBC()
407 case BytecodeInstruction::Opcode::DEFINEMETHOD_IMM8_ID16_IMM8: in CollectMethodInfoFromBC()
408 case BytecodeInstruction::Opcode::DEFINEMETHOD_IMM16_ID16_IMM8: { in CollectMethodInfoFromBC()
414 case BytecodeInstruction::Opcode::DEFINECLASSWITHBUFFER_IMM8_ID16_ID16_IMM16_V8:{ in CollectMethodInfoFromBC()
416 … (bcIns.GetId <BytecodeInstruction::Format::IMM8_ID16_ID16_IMM16_V8, 0>()).AsRawValue()); in CollectMethodInfoFromBC()
[all …]
Dpgo_bc_info.cpp62 void PGOBCInfo::Record(const BytecodeInstruction &bcIns, int32_t bcIndex, in Record()
65BytecodeInstruction::Opcode opcode = static_cast<BytecodeInstruction::Opcode>(bcIns.GetOpcode()); in Record()
Dtype_recorder.cpp104 case BytecodeInstruction::Opcode::DEFINECLASSWITHBUFFER_IMM16_ID16_ID16_IMM16_V8: in CollectLiteralGT()
105 case BytecodeInstruction::Opcode::DEFINECLASSWITHBUFFER_IMM8_ID16_ID16_IMM16_V8: { in CollectLiteralGT()
111 case BytecodeInstruction::Opcode::CREATEOBJECTWITHBUFFER_IMM8_ID16: in CollectLiteralGT()
112 case BytecodeInstruction::Opcode::CREATEOBJECTWITHBUFFER_IMM16_ID16: { in CollectLiteralGT()
Dpgo_bc_info.h76 void Record(const BytecodeInstruction &bcIns, int32_t bcIndex,
/arkcompiler/runtime_core/libpandafile/tests/
Dbytecode_instruction_tests.cpp27 TEST(BytecodeInstruction, Parse) in TEST() argument
32 BytecodeInstruction inst(bytecode); in TEST()
34 EXPECT_EQ((inst.GetVReg<BytecodeInstruction::Format::V4_IMM4, 0>()), 1); in TEST()
35 EXPECT_EQ((inst.GetImm<BytecodeInstruction::Format::V4_IMM4, 0>()), -6); in TEST()
40 BytecodeInstruction inst(bytecode); in TEST()
42 EXPECT_EQ((inst.GetVReg<BytecodeInstruction::Format::V4_IMM4, 0>()), 0xf); in TEST()
43 EXPECT_EQ((inst.GetImm<BytecodeInstruction::Format::V4_IMM4, 0>()), 0x2); in TEST()
49 BytecodeInstruction inst(bytecode); in TEST()
51 EXPECT_EQ((inst.GetImm<BytecodeInstruction::Format::IMM8, 0>()), static_cast<int8_t>(0xf2)); in TEST()
56 BytecodeInstruction inst(bytecode); in TEST()
[all …]
/arkcompiler/runtime_core/libpandafile/
Dbytecode_emitter.h101 …ErrorCode DoReserveSpaceForOffset(const BytecodeInstruction &insn, uint32_t insn_pc, BitImmSize ex…
108 static size_t GetSizeByOpcode(BytecodeInstruction::Opcode opcode);
109 static BytecodeInstruction::Opcode RevertConditionCode(BytecodeInstruction::Opcode opcode);
111 static BitImmSize GetBitImmSizeByOpcode(BytecodeInstruction::Opcode opcode);
112 static BytecodeInstruction::Opcode GetLongestJump(BytecodeInstruction::Opcode opcode);
113BytecodeInstruction::Opcode GetSuitableJump(BytecodeInstruction::Opcode opcode, BytecodeEmitter::B…
Dbytecode_emitter.cpp24 using Opcode = BytecodeInstruction::Opcode;
25 using Format = BytecodeInstruction::Format;
165 BytecodeInstruction insn(&bytecode_[insn_pc]); in ReserveSpaceForOffsets()
191 BytecodeEmitter::ErrorCode BytecodeEmitter::DoReserveSpaceForOffset(const BytecodeInstruction &insn… in DoReserveSpaceForOffset()
215 if (BytecodeInstruction(reinterpret_cast<uint8_t *>(&upd_op)).IsPrefixed()) { in DoReserveSpaceForOffset()
216 Emit<BytecodeInstruction::Format::PREF_NONE>(bytecode_.begin() + insn_pc, upd_op); in DoReserveSpaceForOffset()
218 Emit<BytecodeInstruction::Format::NONE>(bytecode_.begin() + insn_pc, upd_op); in DoReserveSpaceForOffset()
269 auto insn = BytecodeInstruction(&bytecode_[it->first + bias]); in EstimateMaxDistance()
/arkcompiler/ets_runtime/ecmascript/debugger/
Ddropframe_manager.cpp25 bool DropframeManager::IsNewlexenvOpcode(BytecodeInstruction::Opcode op) in IsNewlexenvOpcode()
28 case BytecodeInstruction::Opcode::NEWLEXENV_IMM8: in IsNewlexenvOpcode()
29 case BytecodeInstruction::Opcode::NEWLEXENVWITHNAME_IMM8_ID16: in IsNewlexenvOpcode()
30 case BytecodeInstruction::Opcode::WIDE_NEWLEXENV_PREF_IMM16: in IsNewlexenvOpcode()
31 case BytecodeInstruction::Opcode::WIDE_NEWLEXENVWITHNAME_PREF_IMM16_ID16: in IsNewlexenvOpcode()
39 bool DropframeManager::IsStlexvarOpcode(BytecodeInstruction::Opcode op) in IsStlexvarOpcode()
42 case BytecodeInstruction::Opcode::STLEXVAR_IMM4_IMM4: in IsStlexvarOpcode()
43 case BytecodeInstruction::Opcode::STLEXVAR_IMM8_IMM8: in IsStlexvarOpcode()
44 case BytecodeInstruction::Opcode::WIDE_STLEXVAR_PREF_IMM16_IMM16: in IsStlexvarOpcode()
52 …, uint16_t> DropframeManager::ReadStlexvarParams(const uint8_t *pc, BytecodeInstruction::Opcode op) in ReadStlexvarParams()
[all …]
Ddropframe_manager.h35 bool IsNewlexenvOpcode(BytecodeInstruction::Opcode op);
36 bool IsStlexvarOpcode(BytecodeInstruction::Opcode op);
37 …std::pair<uint16_t, uint16_t> ReadStlexvarParams(const uint8_t *pc, BytecodeInstruction::Opcode op…
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/
Dpbc_iterator.h24 explicit BytecodeIterator(BytecodeInstruction inst) : inst_(inst) {} in BytecodeIterator()
33 BytecodeInstruction operator*()
43 BytecodeInstruction inst_;
60 size_t GetPc(const BytecodeInstruction INST) const in GetPc()
Dinst_builder.h79 void BuildInstruction(const BytecodeInstruction *instruction);
89 static int64_t GetInstructionJumpOffset(const BytecodeInstruction *inst);
225 void BuildEcma([[maybe_unused]] const BytecodeInstruction *bc_inst);
227 void BuildEcmaAsIntrinsics([[maybe_unused]] const BytecodeInstruction *bc_inst);
230 void BuildLoadFromPool(const BytecodeInstruction *bc_inst);
231 void BuildCastToAnyString(const BytecodeInstruction *bc_inst);
232 void BuildCastToAnyNumber(const BytecodeInstruction *bc_inst);
Dinst_builder-inl.h25 void InstBuilder::BuildLoadFromPool(const BytecodeInstruction *bc_inst) in BuildLoadFromPool()
47 void InstBuilder::BuildCastToAnyString(const BytecodeInstruction *bc_inst) in BuildCastToAnyString()
64 void InstBuilder::BuildCastToAnyNumber(const BytecodeInstruction *bc_inst) in BuildCastToAnyNumber()
Dir_builder.cpp192 static inline bool InstNotJump(BytecodeInstruction *inst) in InstNotJump()
195 !inst->HasFlag(BytecodeInstruction::RETURN); in InstNotJump()
216 if (inst.HasFlag(BytecodeInstruction::CONDITIONAL)) { in BuildBasicBlocks()
299 BytecodeInstruction prev_inst {nullptr};
333 info.fallthrough = inst.HasFlag(BytecodeInstruction::CONDITIONAL); in ConnectBasicBlocks()
349 void IrBuilder::TrackTryBoundaries(size_t pc, const BytecodeInstruction &inst) in TrackTryBoundaries()
383 BasicBlock *IrBuilder::GetBlockToJump(BytecodeInstruction *inst, size_t pc) in GetBlockToJump()
385 …if ((inst->HasFlag(BytecodeInstruction::RETURN) && !inst->HasFlag(BytecodeInstruction::SUSPEND)) || in GetBlockToJump()
386 inst->IsThrow(BytecodeInstruction::Exceptions::X_THROW)) { in GetBlockToJump()
391 if (inst->GetOpcode() == BytecodeInstruction::Opcode::RETURNUNDEFINED) { in GetBlockToJump()
Dir_builder.h132 void TrackTryBoundaries(size_t pc, const BytecodeInstruction &inst);
133 BasicBlock *GetBlockToJump(BytecodeInstruction *inst, size_t pc);
/arkcompiler/runtime_core/disassembler/
Ddisassembler.h91 bool LocateTryBlock(const BytecodeInstruction &bc_ins, const BytecodeInstruction &bc_ins_last,
94 bool LocateCatchBlock(const BytecodeInstruction &bc_ins, const BytecodeInstruction &bc_ins_last,
149 pandasm::Opcode BytecodeOpcodeToPandasmOpcode(BytecodeInstruction::Opcode o) const;
152 pandasm::Ins BytecodeInstructionToPandasmInstruction(BytecodeInstruction bc_ins,
155 …std::string IDToString(BytecodeInstruction bc_ins, panda_file::File::EntityId method_id, size_t id…
Ddisassembler.cpp478 const auto bc_ins = BytecodeInstruction(code_accessor.GetInstructions()); in GetExceptions()
517 static size_t getBytecodeInstructionNumber(BytecodeInstruction bc_ins_first, BytecodeInstruction bc… in getBytecodeInstructionNumber()
532 bool Disassembler::LocateTryBlock(const BytecodeInstruction &bc_ins, const BytecodeInstruction &bc_… in LocateTryBlock()
585 bool Disassembler::LocateCatchBlock(const BytecodeInstruction &bc_ins, const BytecodeInstruction &b… in LocateCatchBlock()
1543 return BytecodeOpcodeToPandasmOpcode(BytecodeInstruction::Opcode(o)); in BytecodeOpcodeToPandasmOpcode()
1546 std::string Disassembler::IDToString(BytecodeInstruction bc_ins, panda_file::File::EntityId method_… in IDToString()
1552 if (bc_ins.IsIdMatchFlag(idx, BytecodeInstruction::Flags::METHOD_ID)) { in IDToString()
1554 } else if (bc_ins.IsIdMatchFlag(idx, BytecodeInstruction::Flags::STRING_ID)) { in IDToString()
1559 ASSERT(bc_ins.IsIdMatchFlag(idx, BytecodeInstruction::Flags::LITERALARRAY_ID)); in IDToString()
1579 BytecodeInstruction bc_ins, BytecodeInstruction bc_ins_last, in translateImmToLabel()
[all …]
/arkcompiler/runtime_core/disassembler/templates/
Dget_ins_info.cpp.erb32 auto bc_ins = BytecodeInstruction(ins_arr);
39 << code_id.GetOffset() + bc_ins.GetAddress() - BytecodeInstruction(ins_arr).GetAddress();
42 BytecodeInstruction::Format format = bc_ins.GetFormat();
46 case BytecodeInstruction::Format::<%= fmt.pretty.upcase %>:
Dbc_ins_to_pandasm_ins.cpp.erb20 pandasm::Ins Disassembler::BytecodeInstructionToPandasmInstruction(BytecodeInstruction bc_ins,
26 const BytecodeInstruction::Format format = bc_ins.GetFormat();
33 case BytecodeInstruction::Format::<%=i.format.pretty.upcase%>:
38 …ins.imms.push_back(static_cast<int64_t>(bc_ins.GetImm<BytecodeInstruction::Format::<%=i.format.pre…
40 …ins.imms.push_back(bc_ins.GetImm<BytecodeInstruction::Format::<%=i.format.pretty.upcase%>, <%=imm_…
Dopcode_translator.cpp.erb20 pandasm::Opcode Disassembler::BytecodeOpcodeToPandasmOpcode(BytecodeInstruction::Opcode o) const {
23 case BytecodeInstruction::Opcode::<%= i.opcode.upcase %>:
/arkcompiler/runtime_core/compiler/optimizer/templates/
Dinst_builder_gen.cpp.erb48 return "BytecodeInstruction::Format::#{format.pretty.upcase}"
168 void InstBuilder::BuildInstruction(const BytecodeInstruction* instruction) {
173 case BytecodeInstruction::Opcode::<%= inst.opcode.upcase %>: {
187 int64_t InstBuilder::GetInstructionJumpOffset(const BytecodeInstruction* inst) {
191 case BytecodeInstruction::Opcode::<%= inst.opcode.upcase %>:
193 return inst->GetImm<BytecodeInstruction::Format::<%= inst.format.pretty.upcase %>, 0>();
213 void InstBuilder::BuildEcma([[maybe_unused]] const BytecodeInstruction* bc_inst)
218 case BytecodeInstruction::Opcode::<%= inst.opcode.upcase %>: {
251 void InstBuilder::BuildEcmaAsIntrinsics(const BytecodeInstruction* bc_inst) // NOLINT(readability-f…
263 case BytecodeInstruction::Opcode::<%= opc %>: {
[all …]
/arkcompiler/runtime_core/libpandafile/templates/tests/
Dbytecode_emitter_tests_gen.h.erb33 template <BytecodeInstruction::Format format, typename It, typename... Types>
45 if constexpr (format == BytecodeInstruction::Format::<%= fmt.pretty.upcase %>) {
92 template <BytecodeInstruction::Format format, typename It, typename... Types>
112 if constexpr (format == BytecodeInstruction::Format::<%= fmt.pretty.upcase %>) {
141 if constexpr (format == BytecodeInstruction::Format::<%= fmt.pretty.upcase %>) {
159 % OPCODE_TYPE = 'BytecodeInstruction::Opcode'
160 % FORMAT_TYPE = 'BytecodeInstruction::Format'
/arkcompiler/ets_runtime/ecmascript/interpreter/
Dinterpreter.h33 using EcmaOpcode = BytecodeInstruction::Opcode;
/arkcompiler/ets_runtime/ecmascript/deoptimizer/
Ddeoptimizer.cpp422 BytecodeInstruction inst(pc); in Dump()
546 auto op = BytecodeInstruction(resumePc).GetOpcode(); in GetCallSize()
547 size_t jumpSize = BytecodeInstruction::Size(op); in GetCallSize()
/arkcompiler/runtime_core/libpandafile/templates/
Dbytecode_emitter_gen.h.erb47 % OPCODE_TYPE = 'BytecodeInstruction::Opcode'
48 % FORMAT_TYPE = 'BytecodeInstruction::Format'
150 auto opcode = BytecodeInstruction(insn).GetOpcode();
/arkcompiler/ets_runtime/ecmascript/jspandafile/
Dpanda_file_translator.cpp303 int newLen = static_cast<int>(BytecodeInstruction::Size(newOpcode)); \
1001 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
1011 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
1026 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
1036 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
1051 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
1061 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
1164 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
1174 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
1184 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode()
[all …]

12