Lines Matching refs:item
23 std::string ProfileOptimizer::GetNameInfo(const std::unique_ptr<BaseItem> &item)
26 if (item->GetName() == CLASS_ITEM) {
27 identity = static_cast<ClassItem *>(item.get())->GetNameItem()->GetData();
34 } else if (item->GetName() == STRING_ITEM) {
35 identity = static_cast<StringItem *>(item.get())->GetData();
44 void ProfileOptimizer::MarkProfileItem(std::unique_ptr<BaseItem> &item, bool set_pgo) const
47 if (item->GetName() == CLASS_ITEM) {
48 item->SetPGORank(PGO_CLASS_DEFAULT_COUNT + inc);
49 } else if (item->GetName() == STRING_ITEM) {
50 item->SetPGORank(PGO_STRING_DEFAULT_COUNT + inc);
51 } else if (item->GetName() == CODE_ITEM) {
52 item->SetPGORank(PGO_CODE_DEFAULT_COUNT + inc);
98 // code items will depends on the layout of string and literal item, so put it on the end
106 for (auto &item : items) {
107 item->SetOriginalRank(original_rank++);
108 if (!item->NeedsEmit()) {
111 auto type_name = item->GetName();
116 MarkProfileItem(item, false);
118 auto finder = [&item](const std::pair<std::string, std::string> &p) {
119 if (p.first != item->GetName()) {
122 if (item->GetName() != CODE_ITEM) {
123 return p.second == GetNameInfo(item);
126 auto method_names = static_cast<CodeItem *>(item.get())->GetMethodNames();
130 MarkProfileItem(item, true);