2879 Commits

Author SHA1 Message Date
Philippe Canal
1f0659d9b0 Remove warning message (intentional const cast) 2015-09-29 23:52:04 +02:00
Philippe Canal
9c88696445 Implement TCling::ResetGlobals to fix ROOT-7673.
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)
2015-09-29 22:49:05 +02:00
Philippe Canal
70c402f585 Event quickFindType can lead to deserialization 2015-09-29 21:50:04 +02:00
Philippe Canal
50e1fe55cd Don't add spurrious const to a ref type 2015-09-29 19:18:04 +02:00
Philippe Canal
4ba468335e Adapt output to tweaked behavior 2015-09-29 19:18:04 +02:00
Philippe Canal
63f19daf03 Documentation justification for hand coded shortcut.
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.
2015-09-29 08:38:05 +02:00
Philippe Canal
cc7cfa6332 Extract routine quickFindType 2015-09-29 00:54:06 +02:00
Philippe Canal
2555f2e6e8 Remove debug statements 2015-09-29 00:54:06 +02:00
Philippe Canal
5ec73f0aa2 Extent and complete findType's use of quickFindDecl.
Requires to add code specific for builtins types (somehow not found by cling::utils::Lookup::Named).
White spaces fixes
2015-09-29 00:54:06 +02:00
Philippe Canal
426a1c4f4f Add more characters 'illegal' on quickFindDecl 2015-09-29 00:54:05 +02:00
Philippe Canal
795b215716 Use quickFindDecl in findType (need more adaptations) 2015-09-29 00:54:05 +02:00
Philippe Canal
2f40299656 Move findType below quickFindDecl 2015-09-29 00:54:05 +02:00
Philippe Canal
2aff147565 quickFindDecl: use more generic parameter name 2015-09-29 00:54:05 +02:00
Philippe Canal
c9b19691af Document quickFindDecl 2015-09-29 00:54:05 +02:00
Philippe Canal
5ecfd9525f fix scope. 2015-09-29 00:54:05 +02:00
Philippe Canal
b202613de5 Extract 'quick decl find' out of findScope 2015-09-29 00:54:05 +02:00
Philippe Canal
040bad9a53 Revert "In TypeName::GetFullyQualifiedType, strip SubstTemplateTypeParmType."
This reverts commit 5190ebeb2eb0ac527881ab1c91401b20f4e54b39.

It fails on roottest/root/meta/dictSelection:execAtlasTest2
2015-09-24 15:14:01 +02:00
Philippe Canal
f1fd8d0fd0 In TypeName::GetFullyQualifiedType, strip SubstTemplateTypeParmType.
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'.
2015-09-24 11:15:18 +02:00
Philippe Canal
df44a9d01d Use canonical type when making type based decision 2015-09-24 11:15:18 +02:00
Philippe Canal
569ef839cb Implement DeclCollector::HandleInvalidTagDeclDefinition.
This allow the transaction from noticing and removing invalid decl (appear during template instantiation)
2015-09-23 09:43:03 +02:00
Mattias Ellert
13218860da Fix file permissions 2015-08-28 09:11:04 +02:00
Axel Naumann
b7ceb3550e Keep pending instants upon unload. Fixes CMS missing symbol. 2015-08-26 08:46:03 +02:00
Axel Naumann
dec5717d4c Fix printing of false! (And add a test.) 2015-08-21 12:23:04 +02:00
Boris Perovic
f268b40976 Dtors.c cling test changed in order to avoid infinite loop when unloading "RuntimePrintValue.h". Should be looked into in the future. 2015-08-20 17:06:02 +02:00
Boris Perovic
39f64ab7b7 Catch-all printValue implementation changed to enable correct invocation if only parent type overload exists (ex. if there is no overload for TF1*, compiler invokes the overload to its best parent overload match, in the worst case void*). Argument changed from reference to pointer to support this. isEnumType Coverity bug changed from if to assert (coding, not runtime error) Changed the way printValue is invoked in order to correctly cast Value to the needed value (e.g. LL -> short). Extracted value stays in scope while we execute printValue, because we use the address. 2015-08-20 17:06:02 +02:00
Boris Perovic
fc447d5fd5 Small improvements. nullptr -> nullptr_t for isNullPtrType 2015-08-18 18:08:20 +02:00
Boris Perovic
800c644352 Removed "VALID" after address output, fixes roottest. Various fixes based on comments after second round. 2015-08-18 18:08:20 +02:00
Boris Perovic
2d317b983d Fixes based on cling test suite ("make test"). 2015-08-18 18:08:20 +02:00
Boris Perovic
34b8b73a30 Fixed potential bug found by Coverity (https://coverity.cern.ch/reports.htm#v13142/p10001). 2015-08-18 18:08:19 +02:00
Boris Perovic
63bc59dde6 Fixed the bug (missing internal::) from commit 279fc73896036900366fa1596ec4d624b9db1c05. 2015-08-18 18:08:19 +02:00
Boris Perovic
f7cf46ab31 Removed old Stream functions from ValuePrinter.cpp. 2015-08-18 18:08:19 +02:00
Boris Perovic
1aa5329d74 Simplified printValue(const char *const val). 2015-08-18 18:08:18 +02:00
Boris Perovic
e7d605bccc Changed using of QualifiedType.getAsString() to cling::utils::TypeName::GetFullyQualifiedName(QualifiedType, ASTCtx). 2015-08-18 18:08:18 +02:00
Boris Perovic
127f226acd Extracted printing of unpacked Values. Minor comment fixes. 2015-08-18 18:08:18 +02:00
Boris Perovic
a9825d50dc Removed unused function hasViableCandidateToCall (overload resolution and general fallback deals with this now). Moved isAddressValid function from Value.cpp to ValuePrinter.cpp and implemented the check for void*. 2015-08-18 18:08:18 +02:00
Boris Perovic
517eab8df1 Removed old printValue_Default and printType_Default methods. Using fully qualified name in new printType_New method. 2015-08-18 18:08:18 +02:00
Boris Perovic
688ad34b3f Minor fixes around printValue, based on comments after the integration. 2015-08-18 18:08:17 +02:00
Boris Perovic
62c71df1fa Minor fix: print type + " " + value, rather than type" " + value. 2015-08-17 18:45:03 +02:00
Boris Perovic
c44940b223 New printValue() integration (printing unified through overloading of printValue() function and template resolution). Modified tests to conform to the new prints. 2015-08-17 18:45:03 +02:00
Boris Perovic
187cbaf257 Do not randomly add to lookup results during EvaluateT(). 2015-08-17 18:45:03 +02:00
Philippe Canal
1330bd1fe4 Fix ROOT-7462 (extend fix for ROOT-6070)
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).
2015-08-17 18:45:03 +02:00
Axel Naumann
e2f9cf80cd Assert to error: cannot autoload that, its declaring header cannot be found at runtime! 2015-08-17 18:45:03 +02:00
Elisavet Sakellari
d2953ff9a6 Handling of multiple Redirection RAII's 2015-08-17 18:45:02 +02:00
Pere Mato
768254099f Enable C++14 in Cling when compiling with C++14 enabled 2015-08-17 18:45:02 +02:00
Pere Mato
5e5af173cf Forward the c++14 flag to building LLVM/CLING. Enable c++14 in the interpreter if compiled with -std=c++1y or -std=c++14. 2015-08-17 18:45:02 +02:00
Axel Naumann
2a73fc3b9e Grab lang, PP, target opts from PCH if it exists. 2015-08-17 18:45:02 +02:00
Axel Naumann
a0618d59f4 whitespace. 2015-08-17 18:45:02 +02:00
Axel Naumann
7217f8099b Silence *calling* unresolved symbols. Handing it out already complains. 2015-08-17 18:45:02 +02:00
Axel Naumann
4b08f20793 Fix runtime / PCH incompatibility. 2015-06-26 14:44:19 +02:00
Axel Naumann
714df9c374 Revert "Annotate fwd decls with the header containing the decl, not the top-most include."
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"...
2015-06-23 21:30:17 +02:00