Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rely on TProtoClass::FillTClass now setting fHasRootPcmInfo
  • Loading branch information
pcanal committed Oct 21, 2020
commit b4262b2dc82a6e5edf1d481a341f72ddee9e08d1
27 changes: 7 additions & 20 deletions core/meta/src/TClass.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1473,9 +1473,8 @@ void TClass::Init(const char *name, Version_t cversion,
fCanLoadClassInfo = kTRUE;
// Here we check and grab the info from the rootpcm.
TProtoClass *proto = TClassTable::GetProtoNorm(GetName());
if (proto && proto->FillTClass(this)) {
fHasRootPcmInfo = kTRUE;
}
if (proto)
proto->FillTClass(this);
}
if (!fHasRootPcmInfo && gInterpreter->CheckClassInfo(fName, /* autoload = */ kTRUE)) {
gInterpreter->SetClassInfo(this); // sets fClassInfo pointer
Expand Down Expand Up @@ -3591,16 +3590,11 @@ TList *TClass::GetListOfBases()
if (fState == kHasTClassInit) {

R__LOCKGUARD(gInterpreterMutex);
// NOTE: Add test to prevent redo if another thread has already done the work.
// if (!fHasRootPcmInfo) {

// The bases are in our ProtoClass; we don't need the class info.
TProtoClass *proto = TClassTable::GetProtoNorm(GetName());
if (proto && proto->FillTClass(this)) {
// Not sure this code is still needed
// R__ASSERT(kFALSE);

fHasRootPcmInfo = kTRUE;
if (!fHasRootPcmInfo) {
// The bases are in our ProtoClass; we don't need the class info.
TProtoClass *proto = TClassTable::GetProtoNorm(GetName());
if (proto)
proto->FillTClass(this);
}
}
// We test again on fCanLoadClassInfo has another thread may have executed it.
Expand Down Expand Up @@ -3699,16 +3693,9 @@ TList *TClass::CreateListOfDataMembers(std::atomic<TListOfDataMembers*> &data, T

if (!data) {
if (fCanLoadClassInfo && fState == kHasTClassInit) {
// NOTE: Add test to prevent redo if another thread has already done the work.
// if (!fHasRootPcmInfo) {

// The members are in our ProtoClass; we don't need the class info.
TProtoClass *proto = TClassTable::GetProtoNorm(GetName());
if (proto && proto->FillTClass(this)) {
// Not sure this code is still needed
// R__ASSERT(kFALSE);

fHasRootPcmInfo = kTRUE;
return data;
}
}
Expand Down