IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The class NodeContext was removed since collecting individual Stmts
is not necessary, due to the change of how the visiting of one
single Stmt is done, which now recurses on the children of the Stmt.
Thus, the AST is changed directly by the VisitX methods.
VisitCompoundStmt is not necessary since the CompoundStmt derives from
Stmt and the collection of Stmt of the CompounStmt is visited
through the children visitation.
VisitCXXMemberCallExpr is now covered by the recursive visiting in the
VisitCallExpr method.
The previous version of the Null deref visitor was defaulting to
VisitStmt when the Stmt type was unknown, thus allowing for some
types of Stmt X for which a VisitX was not implemented to default
to VisitStmt and not check the content of it. In order to check
any type of Stmt for possible subexpressions which contain s Stmt
that derefrences a Null, the VisitStmt was extended to check its
children.
Only the Stmt types, X, which directly containing a null deref expression
have an explicit VisitX with the exception of CXXMemberCallExpr,
because this type would otherwise default to VisitCallExpr which has
a different check for its structure.
Initially the NullDerefProtectionTransformer was prepending a
If statement before the possible Null derefrencing. This was
chenged by a runtime function call which included the check
for Null and invalid address memory, but was replacing the
whole AST node so the parent node of the Expr type would disappear,
resulting in a wrong AST. The correct solution was to replace the
SubExpr of the Expr that contained a possible Null derefrencing.
This was done by using the specific setters for each Expr type
that is detailed in the NullDeref Visiting.
Fix cases (seen in roottest/cling/typedef/assertTypedefIter.C) where
a template parameter is an expression that is actually part of a
template parameter pack. In this case we need to peek into the pack.
The previous invalid refrence transformer injected if stmt for checking the argument derefrenced.
Now we return a runtime call that checks for validiting for derefrencing and injects the call
into the AST replacing the node where the deref happens with a call to the runtime function.
This fixes a PyROOT performance regression between 6.02 and 6.04, seen by ATLAS.
(cherry picked from commit ba4b0df02a91be4102e62fc76038711d188f07f3)
Conflicts:
interpreter/cling/lib/Interpreter/Value.cpp
Note we don't want to unload transaction so soon as this might remove the header files still needed
(they need to be removed by the library .... which is still a to-be-done feature)
To handle 'Float_t*', quickFindType uses no memory (instead of 183B for findType) and is much faster
(6 times in this case), the cost is the additional ('unnecessary') checks in the cases not handled by
quickFindType.
When the type comes (directly or indirectly) from being used as a template paramater, it is decorated
by SubstTemplateTypeParmType which gets in the way of properly getting the name correct (leads to
'std::const string'.
Original problem:
set atlas shell environment
root.exe
TFile *_file0 = TFile::Open("atlasfile.root");
bunch of Warning about missing dictionary
c = TClass::GetClass("GaudiCommon<Algorithm>")
Error in <TProtoClass::FindDataMember>: data member with index 0 is not found in class GaudiUtils::Map<string,SmartIF<IService>,__gnu_cxx::hash_map<string,SmartIF<IService>,GaudiUtils::Hash<string>,equal_to<s
tring>,allocator<SmartIF<IService> > > >
Error in <CreateRealData>: Cannot find data member # 0 of class GaudiUtils::Map<string,SmartIF<IService>,__gnu_cxx::hash_map<string,SmartIF<IService>,GaudiUtils::Hash<string>,equal_to<string>,allocator<SmartI
F<IService> > > > for parent GaudiCommon<Algorithm>!
c->GetListOfRealData()->ls();
...
OBJ: TRealData m_services Description of persistent data members : 0 at: 0x9d46d70
OBJ: TRealData m_errors Description of persistent data members : 0 at: 0x9d47cb0
...
Tweak of the problem:
c = TClass::GetClass("GaudiCommon<Algorithm>");
c->GetListOfRealData()->ls();
...
OBJ: TRealData m_services Description of persistent data members : 0 at: 0x300ce10
OBJ: TRealData m_services. Description of persistent data members : 0 at: 0x300e9c0
OBJ: TRealData m_errors Description of persistent data members : 0 at: 0x300eaa0
...
Note: no error or warning but the ListOfRealData is 'wrong'.
Correct behavior:
TClass::GetClass("SmartIF<IService>");
TFile *_file0 = TFile::Open("atlasfile.root");
TClass::GetClass("GaudiUtils::Map<string,SmartIF<IService>,__gnu_cxx::hash_map<string,SmartIF<IService>,GaudiUtils::Hash<string>,equal_to<string>,allocator<SmartIF<IService> > > >");
c = TClass::GetClass("GaudiCommon<Algorithm>");
c->GetListOfRealData()->ls();
...
OBJ: TRealData m_services Description of persistent data members : 0 at: 0xc81c820
OBJ: TRealData m_services.m_map Description of persistent data members : 0 at: 0xc81dd00
OBJ: TRealData m_errors Description of persistent data members : 0 at: 0xc81ddb0
...
See autoparse for
unary_function<pair<const string,SmartIF<IService> >,const string>
SmartIF<IService>
Analysis:
1) Opening the file triggering the autoloading of a lots of libraries and the autoparsing of many files.
This includes the declaration of Gaudi::Map but *not* of SmartIF nor SmartIF<IService>.
[Side note: this autoloading is due to DataVector<xAOD::Jet_v1> not having a dictionary]
2) During TClass::GetClass("GaudiCommon<Algorithm>"), the TProtoClass::FillTClass is called and
disable autoloading and autoparsing and then request the GaudiUtils::Map
3) Since there is no dictionary for GaudiUtils::Map, findScope is invoked.
4) During findScope, the instantiation of GaudiUtils::Map fails with an error similar to:
error: field has incomplete type 'SmartIF<IService>'
5) The error handling code path in this case in findScope did *not* revert the transaction
and unload the 'invalid' decl for the GaudiUtils::Map
6) TClingClassInfo assume all decl are valid but finds and use the invalid decl
7) In this case, the invalidity of the decl leads to a lack of data members
8) Thus TProtoClass::FindDataMember complains about the discrepency between the TProtoClass
information and the information from the decl.
Requesting the TClass for the GaudiUtils::Map when autoloading and autoparsing are leads
to the proper instantiation and thus success.
Requesting the TClass for GaudiCommon<Algorithm> before loading the file means that
when the request for the TClass for GaudiUtils::Map is done, the declaration for
GaudiUtils::Map has not yet been parsed and thus findScope use a different error
handling code path (one where the instantiation is not even attempted).
In normal circunstances (all dictionary properly generated and loaded/loadable),
the missing name part in the list of real data member is not fatal (it would be
if it was the case during the initial gathering of information but as it is, all
the necessary information is already in the rootpcm files).
This reverts commit 125a93e0e3562dac5d5a0429ce49a2b625025c26.
It fails in the following case (roottest/root/io/evolution/pragma_read):
dictionary for a/b.h which includes a/c.h as #include "c.h"
This will add a fwd decl with annotation "c.h", but this header cannot
be found. Instead we'd need "a/c.h"...
When looking up in the list of type to be replaced by a typedef (basic_string -> string), use
the canonical type to make sure we have the right search (any sugar will make the search fail).
When calling a macro with arguments like: " \" " or " \\" etc.
Macros without arguments are now passing "()"; checking of
argument count is now done by Sema.
Now that we can easily revert Transactions' IR (by unloading their
module) we do not need to queue the Decls before emitting them.
This enables EndOfTU actions to be emitted seeminglessly, without
extra transactions, or explicit post-EndOfTU-emission: each
Transaction will have its TU finalized exactly once.
This in turn allows us to turn on Debug emission - which relies on
being invoked exactly once per Module.
Transformers must be invoked before emitting Decls. They are now
invoked for each Decl; WrapperTransformers are invoked when seeing
a wrapper decl. They do not see the "full transaction AST" anymore
- luckily none of our transformers requires this and actually become
simpler because of this change.
This also fixes a bug where the relative sequencing of parsed and
deserialized Decls was lost (parsed was emitted before deserialized).
Remove unused IRTransactions; they should really be llvm::Pass-es.
We don't have them anyway.
Disable a few transformations if the Decl isFromASTFile.
When reverting a Transaction, also revert its nested ones.
In the ValueExtractionSynthesizer, pass the ValuePrinter option as
int, instead of the transaction pointer - that might have changed
(at least its options) by the time we invoke the wrapper.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i or -o; assuming --only paths...
# rebase in progress; onto b3d9f92
# You are currently splitting a commit while rebasing branch 'declcollector-emits-v2' on 'b3d9f92'.
#
# Changes to be committed:
# modified: interpreter/cling/include/cling/Interpreter/RuntimeUniverse.h
# modified: interpreter/cling/lib/Interpreter/AutoSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/AutoSynthesizer.h
# modified: interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.h
# modified: interpreter/cling/lib/Interpreter/DeclCollector.cpp
# modified: interpreter/cling/lib/Interpreter/DeclCollector.h
# modified: interpreter/cling/lib/Interpreter/DeclExtractor.cpp
# modified: interpreter/cling/lib/Interpreter/DeclExtractor.h
# modified: interpreter/cling/lib/Interpreter/DynamicLookup.cpp
# modified: interpreter/cling/lib/Interpreter/DynamicLookup.h
# modified: interpreter/cling/lib/Interpreter/IncrementalParser.cpp
# modified: interpreter/cling/lib/Interpreter/IncrementalParser.h
# modified: interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.h
# modified: interpreter/cling/lib/Interpreter/TransactionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/TransactionTransformer.h
# modified: interpreter/cling/lib/Interpreter/TransactionUnloader.cpp
# modified: interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.h
# modified: interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.h
#
# Untracked files:
# .idea/
# 0001-Fix-llvm-merge-issue.patch
# 0002-Fix-warnings.patch
# 0003-Keep-weak-symbols-around-subsequent-transactions-mig.patch
# T.cxx
# T.cxx~
# TMVA.root
# a.out
# boost.root
# config/Makefile.depend~
# core/textinput/src/textinput/TerminalDisplayWin.cpp.orig
# ct.root
# data.root
# interpreter/cling/76fc2055249da7b03148a7d4197a279e9943f012.patch
# interpreter/cling/lib/Interpreter/CIFactory.cpp~
# interpreter/cling/lib/Interpreter/DeclCollector.h~
# interpreter/cling/lib/Interpreter/DynamicLibraryManager.cpp~
# modulemap-one-header-per-file.txt
# osrm-routed
# tiles.tar.bz2
# tmva_class_example.root
# tutorials/v3.root
# weights/
#
This prevents:
==4150== Possible data race during write of size 8 at 0xCC136F0 by thread #3
==4150== Locks held: none
==4150== at 0x146EC214: llvm::SmallVectorTemplateBase<cling::IncrementalExecutor::CXAAtExitElement, false>::grow(unsigned long) (in /afs/cern.ch/cms/sw/ReleaseCandidates/volB/slc6_amd64_gcc491/lcg/root/6.02.00-lnjiaj2/lib/libCling.so)
==4150== by 0x146E9DE3: cling::IncrementalExecutor::AddAtExitFunc(void (*)(void*), void*, cling::Transaction const*) (in /afs/cern.ch/cms/sw/ReleaseCandidates/volB/slc6_amd64_gcc491/lcg/root/6.02.00-lnjiaj2/lib/libCling.so)
==4150== by 0x160A5044: ???
==4150== by 0x160A67D6: ???
==4150== by 0x160A6783: ???
==4150== by 0x145E76D3: TCling::ExecuteWithArgsAndReturn(TMethod*, void*, void const**, int, void*) const (in /afs/cern.ch/cms/sw/ReleaseCandidates/volB/slc6_amd64_gcc491/lcg/root/6.02.00-lnjiaj2/lib/libCling.so)
Conflicts:
interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp
Use PROJECT_SOURCE_DIR (full path to the root of the project source directory) instead of CMAKE_SOURCE_DIR (the directory from which cmake was started) in order to properly find AsmParser/CMakeLists.txt and call llvm::InitializeNativeTargetAsmParser();