std::string showShort(SrcKey sk) { if (!sk.valid()) return "<invalid SrcKey>"; return folly::sformat( "{}(id {:#x})@{}{}{}{}", sk.func()->fullName(), sk.funcID(), sk.offset(), sk.resumed() ? "r" : "", sk.hasThis() ? "t" : "", sk.prologue() ? "p" : "" ); }
std::string show(SrcKey sk) { auto func = sk.func(); auto unit = sk.unit(); const char *filepath = "*anonFile*"; if (unit->filepath()->data() && unit->filepath()->size()) { filepath = unit->filepath()->data(); } return folly::sformat("{}:{} in {}(id 0x{:#x})@{: >6}{}{}", filepath, unit->getLineNumber(sk.offset()), func->isPseudoMain() ? "pseudoMain" : func->fullName()->data(), (uint32_t)sk.funcID(), sk.offset(), sk.resumed() ? "r" : "", sk.hasThis() ? "t" : "", sk.prologue() ? "p" : ""); }