Lines Matching refs:desc
180 void InsertKeyAndDesc(const PGOHandler &handler, PropertyDesc &desc);
191 RootHClassLayoutDesc(const RootHClassLayoutDesc &desc)
192 : HClassLayoutDesc(desc.type_, desc.childs_), objType_(desc.objType_), objSize_(desc.objSize_),
193 layoutDesc_(desc.layoutDesc_) {}
194 RootHClassLayoutDesc& operator=(const RootHClassLayoutDesc &desc)
196 this->type_ = desc.type_;
197 this->childs_ = desc.childs_;
198 this->objType_ = desc.objType_;
199 this->objSize_ = desc.objSize_;
200 this->layoutDesc_ = desc.layoutDesc_;
250 ChildHClassLayoutDesc(const ChildHClassLayoutDesc &desc)
251 : HClassLayoutDesc(desc.type_, desc.childs_), propertyDesc_(desc.propertyDesc_) {}
252 ChildHClassLayoutDesc& operator=(const ChildHClassLayoutDesc &desc)
254 this->type_ = desc.type_;
255 this->childs_ = desc.childs_;
256 this->propertyDesc_ = desc.propertyDesc_;
314 IterateAll([&callback] (HClassLayoutDesc *desc) {
315 if (desc->GetProfileType().IsRootType()) {
318 callback(reinterpret_cast<ChildHClassLayoutDesc *>(desc));
396 static size_t CaculateSize(const RootHClassLayoutDesc &desc)
399 size += desc.GetChildSize() * sizeof(ProfileType);
400 desc.IterateProps([&size] (const PropertyDesc &propDesc) {
407 void Merge(const RootHClassLayoutDesc &desc)
409 size_ = static_cast<int32_t>(RootHClassLayoutDescInner::CaculateSize(desc));
410 type_ = desc.GetProfileType();
412 desc.IterateChilds([this] (const ProfileType &childType) -> bool {
419 desc.IterateProps([this, ¤t] (const PropertyDesc &propDesc) {
428 void Convert(PGOContext& context, RootHClassLayoutDesc *desc) const
432 desc->InsertKeyAndDesc(descInfo->GetKey(), descInfo->GetHandler());
437 desc->AddChildHClassLayoutDesc(profileType.Remap(context));
486 static size_t CaculateSize(const ChildHClassLayoutDesc &desc)
489 size += desc.GetChildSize() * sizeof(ProfileType);
490 auto key = desc.GetPropertyDesc().first;
495 void Merge(const ChildHClassLayoutDesc &desc)
497 size_ = static_cast<int32_t>(ChildHClassLayoutDescInner::CaculateSize(desc));
498 type_ = desc.GetProfileType();
500 desc.IterateChilds([this] (const ProfileType &childType) -> bool {
507 auto propDesc = desc.GetPropertyDesc();
513 void Convert(PGOContext& context, ChildHClassLayoutDesc *desc) const
516 desc->InsertKeyAndDesc(descInfo->GetKey(), descInfo->GetHandler());
519 desc->AddChildHClassLayoutDesc(profileType.Remap(context));
544 static size_t CaculateSize(const PGOHClassTreeDesc &desc)
546 auto rootLayout = desc.GetHClassLayoutDesc(desc.GetProfileType());
553 desc.IterateChilds([&size](ChildHClassLayoutDesc *desc) {
554 size += ChildHClassLayoutDescInner::CaculateSize(*desc);
559 static std::string GetTypeString(const PGOHClassTreeDesc &desc)
562 text += desc.GetProfileType().GetTypeString();
564 auto layoutDesc = desc.GetHClassLayoutDesc(desc.GetProfileType());
585 void Merge(const PGOHClassTreeDesc &desc)
588 auto layoutDesc = desc.GetHClassLayoutDesc(desc.GetProfileType());
599 desc.IterateChilds([this, &last](ChildHClassLayoutDesc *desc) {
602 current->Merge(*desc);
610 PGOHClassTreeDesc desc(ProfileType(context, GetType().GetProfileType()));
611 desc.SetProtoPt(ProfileType(context, GetProtoSt().GetProfileType()));
614 return desc;
616 auto layoutDesc = desc.GetOrInsertHClassLayoutDesc(root->GetProfileType().Remap(context), true);
625 auto childLayoutDesc = desc.GetOrInsertHClassLayoutDesc(current->GetProfileType().Remap(context), false);
629 return desc;