Lines Matching full:method
33 bool operator()(const Method &m, const panda_file::File::StringData &name) const in operator()
51 using MethodNameComp = NameComp<Method>;
52 using MethodIdComp = EntityIdComp<Method>;
259 inline Span<Method> Class::GetMethods() const in GetMethods()
276 inline Method *Class::FindDirectMethod(Key key, const Pred &... preds) const in FindDirectMethod()
281 auto *method = BinSearch<KeyComp>(methods, key, preds...); in FindDirectMethod() local
282 if (method != nullptr) { in FindDirectMethod()
283 return method; in FindDirectMethod()
290 auto *method = BinSearch<KeyComp>(methods, key, preds...); in FindDirectMethod() local
291 if (method != nullptr) { in FindDirectMethod()
292 return method; in FindDirectMethod()
297 // they can't be sorted by both id and name, so just visit method one by one now in FindDirectMethod()
301 for (auto &method : methods) { in FindDirectMethod()
302 if (KeyComp().equal(method, key) && PredComp(method, preds...)) { in FindDirectMethod()
303 return &method; in FindDirectMethod()
312 inline Method *Class::FindClassMethod(Key key, const Pred &... preds) const in FindClassMethod()
316 auto *method = cls->FindDirectMethod<filter, KeyComp>(key, preds...); in FindClassMethod() local
317 if (method != nullptr) { in FindClassMethod()
318 return method; in FindClassMethod()
331 inline Method *Class::FindInterfaceMethod(Key key, const Pred &... preds) const in FindInterfaceMethod()
336 auto *method = FindDirectMethod<filter, KeyComp>(key, preds...); in FindInterfaceMethod() local
337 if (method != nullptr) { in FindInterfaceMethod()
338 return method; in FindInterfaceMethod()
348 auto *method = iface->FindDirectMethod<FindFilter::INSTANCE, KeyComp>(key, preds...); in FindInterfaceMethod() local
349 if (method != nullptr) { in FindInterfaceMethod()
350 return method; in FindInterfaceMethod()
356 … key, [&](const Method &method) { return method.IsPublic() && PredComp(method, preds...); }); in FindInterfaceMethod()
362 inline Method *Class::GetVirtualInterfaceMethod(panda_file::File::EntityId id) const in GetVirtualInterfaceMethod()
367 inline Method *Class::GetStaticInterfaceMethod(panda_file::File::EntityId id) const in GetStaticInterfaceMethod()
429 inline Method *Class::GetVirtualClassMethod(panda_file::File::EntityId id) const in GetVirtualClassMethod()
434 inline Method *Class::GetStaticClassMethod(panda_file::File::EntityId id) const in GetStaticClassMethod()
439 inline Method *Class::GetDirectMethod(const uint8_t *mutf8_name, const Method::Proto &proto) const in GetDirectMethod()
443 sd, [&proto](const Method &method) { return method.GetProtoId() == proto; }); in GetDirectMethod()
446 inline Method *Class::GetClassMethod(const uint8_t *mutf8_name, const Method::Proto &proto) const in GetClassMethod()
452 inline Method *Class::GetClassMethod(const panda_file::File::StringData &sd, const Method::Proto &p… in GetClassMethod()
455 sd, [&proto](const Method &method) { return method.GetProtoId() == proto; }); in GetClassMethod()
458 inline Method *Class::GetStaticClassMethodByName(const panda_file::File::StringData &sd, in GetStaticClassMethodByName()
459 const Method::Proto &proto) const in GetStaticClassMethodByName()
462 sd, [&proto](const Method &method) { return method.GetProtoId() == proto; }); in GetStaticClassMethodByName()
465 inline Method *Class::GetVirtualClassMethodByName(const panda_file::File::StringData &sd, in GetVirtualClassMethodByName()
466 const Method::Proto &proto) const in GetVirtualClassMethodByName()
469 sd, [&proto](const Method &method) { return method.GetProtoId() == proto; }); in GetVirtualClassMethodByName()
472 inline Method *Class::GetInterfaceMethod(const uint8_t *mutf8_name, const Method::Proto &proto) con… in GetInterfaceMethod()
478 inline Method *Class::GetInterfaceMethod(const panda_file::File::StringData &sd, const Method::Prot… in GetInterfaceMethod()
481 sd, [&proto](const Method &method) { return method.GetProtoId() == proto; }); in GetInterfaceMethod()
484 inline Method *Class::GetStaticInterfaceMethodByName(const panda_file::File::StringData &sd, in GetStaticInterfaceMethodByName()
485 const Method::Proto &proto) const in GetStaticInterfaceMethodByName()
488 sd, [&proto](const Method &method) { return method.GetProtoId() == proto; }); in GetStaticInterfaceMethodByName()
491 inline Method *Class::GetVirtualInterfaceMethodByName(const panda_file::File::StringData &sd, in GetVirtualInterfaceMethodByName()
492 const Method::Proto &proto) const in GetVirtualInterfaceMethodByName()
495 sd, [&proto](const Method &method) { return method.GetProtoId() == proto; }); in GetVirtualInterfaceMethodByName()
498 inline Method *Class::GetDirectMethod(const uint8_t *mutf8_name) const in GetDirectMethod()
504 inline Method *Class::GetClassMethod(const uint8_t *mutf8_name) const in GetClassMethod()
510 inline Method *Class::ResolveVirtualMethod(const Method *method) const in ResolveVirtualMethod() argument
512 Method *resolved = nullptr; in ResolveVirtualMethod()
516 if (method->GetClass()->IsInterface() && !method->IsDefaultInterfaceMethod()) { in ResolveVirtualMethod()
517 // find method in imtable in ResolveVirtualMethod()
521 auto method_id = GetIMTableIndex(method->GetFileId().GetOffset()); in ResolveVirtualMethod()
528 // find method in itable in ResolveVirtualMethod()
529 auto *iface = method->GetClass(); in ResolveVirtualMethod()
537 resolved = entry.GetMethods()[method->GetVTableIndex()]; in ResolveVirtualMethod()
540 // find method in vtable in ResolveVirtualMethod()
542 ASSERT(method->GetVTableIndex() < vtable.size()); in ResolveVirtualMethod()
543 resolved = vtable[method->GetVTableIndex()]; in ResolveVirtualMethod()
610 inline Span<Method *> Class::GetVTable() in GetVTable()
612 return GetClassSpan().SubSpan<Method *>(GetVTableOffset(), vtable_size_); in GetVTable()
615 inline Span<Method *const> Class::GetVTable() const in GetVTable()
617 return GetClassSpan().SubSpan<Method *const>(GetVTableOffset(), vtable_size_); in GetVTable()