@@ -15395,6 +15395,26 @@ intptr_t Bytecode::GetTryIndexAtPc(uword return_address) const {
1539515395#endif
1539615396}
1539715397
15398+ uword Bytecode::GetDebugCheckedOpcodePc(uword from_offset,
15399+ uword to_offset) const {
15400+ #if defined(DART_PRECOMPILED_RUNTIME)
15401+ UNREACHABLE();
15402+ #else
15403+ uword pc = PayloadStart() + from_offset;
15404+ uword end_pc = pc + (to_offset - from_offset);
15405+ while (pc < end_pc) {
15406+ uword next_pc = KernelBytecode::Next(pc);
15407+ if (KernelBytecode::IsDebugCheckedOpcode(
15408+ reinterpret_cast<const KBCInstr*>(pc))) {
15409+ // Return the pc after the opcode, i.e. its 'return address'.
15410+ return next_pc;
15411+ }
15412+ pc = next_pc;
15413+ }
15414+ return 0;
15415+ #endif
15416+ }
15417+
1539815418const char* Bytecode::ToCString() const {
1539915419 return Thread::Current()->zone()->PrintToString("Bytecode(%s)",
1540015420 QualifiedName());
@@ -15440,6 +15460,16 @@ const char* Bytecode::QualifiedName() const {
1544015460 return zone->PrintToString("[Bytecode] %s", function_name);
1544115461}
1544215462
15463+ const char* Bytecode::FullyQualifiedName() const {
15464+ Zone* zone = Thread::Current()->zone();
15465+ const Function& fun = Function::Handle(zone, function());
15466+ if (fun.IsNull()) {
15467+ return BytecodeStubName(*this);
15468+ }
15469+ const char* function_name = fun.ToFullyQualifiedCString();
15470+ return zone->PrintToString("[Bytecode] %s", function_name);
15471+ }
15472+
1544315473bool Bytecode::SlowFindRawBytecodeVisitor::FindObject(
1544415474 RawObject* raw_obj) const {
1544515475 return RawBytecode::ContainsPC(raw_obj, pc_);
0 commit comments