Logo ROOT  
Reference Guide
TCling.h
Go to the documentation of this file.
1// @(#)root/meta:$Id$
2// Author: Axel Naumann, 2011-10-19
3
4/*************************************************************************
5 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12
13#ifndef ROOT_TCling
14#define ROOT_TCling
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TCling //
19// //
20// This class defines an interface to the cling C++ interpreter. //
21// //
22// Cling is a full ANSI compliant C++ interpreter based on //
23// clang/LLVM technology. //
24// //
25//////////////////////////////////////////////////////////////////////////
26
27#include "TInterpreter.h"
28
29#include <map>
30#include <memory>
31#include <set>
32#include <tuple>
33#include <unordered_map>
34#include <unordered_set>
35#include <vector>
36#include <string>
37#include <utility>
38
39#ifndef WIN32
40#define TWin32SendClass char
41#endif
42
43namespace llvm {
44 class GlobalValue;
45 class StringRef;
46}
47
48namespace clang {
49 class CXXRecordDecl;
50 class Decl;
51 class DeclContext;
52 class EnumDecl;
53 class FunctionDecl;
54 class IdentifierIterator;
55 class NamedDecl;
56 class NamespaceDecl;
57 class TagDecl;
58 class Type;
59 class QualType;
60}
61namespace cling {
62 class Interpreter;
63 class MetaProcessor;
64 class Transaction;
65 class Value;
66}
67
68class TClingCallbacks;
69class TEnv;
70class TFile;
71class THashTable;
73class TMethod;
74class TObjArray;
78class TListOfEnums;
79
80namespace ROOT {
81 namespace TMetaUtils {
82 class TNormalizedCtxt;
83 class TClingLookupHelper;
84 }
85}
86
87extern "C" {
88 void TCling__UpdateListsOnCommitted(const cling::Transaction&,
89 cling::Interpreter*);
90 void TCling__UpdateListsOnUnloaded(const cling::Transaction&);
91 void TCling__InvalidateGlobal(const clang::Decl*);
92 void TCling__TransactionRollback(const cling::Transaction&);
93 TObject* TCling__GetObjectAddress(const char *Name, void *&LookupCtx);
94 const clang::Decl* TCling__GetObjectDecl(TObject *obj);
95 void TCling__LibraryLoaded(const void* dyLibHandle,
96 const char* canonicalName);
97 void TCling__LibraryUnloaded(const void* dyLibHandle,
98 const char* canonicalName);
99 void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
100}
101
102class TCling final : public TInterpreter {
103private: // Static Data Members
104
105 static void* fgSetOfSpecials; // set of TObjects used in CINT variables
106
107private: // Data Members
108
109 Int_t fMore; // The brace indent level for the cint command line processor.
110 Int_t fExitCode; // Value passed to exit() in interpreter.
111 char fPrompt[64]; // Command line prompt string.
112 //cling::DictPosition fDictPos; // dictionary context after initialization is complete.
113 //cling::DictPosition fDictPosGlobals; // dictionary context after ResetGlobals().
114 TString fSharedLibs; // Shared libraries loaded by G__loadfile().
115 Int_t fGlobalsListSerial;// Last time we refreshed the ROOT list of globals.
116 TString fIncludePath; // Interpreter include path.
117 TString fRootmapLoadPath; // Dynamic load path for rootmap files.
118 TEnv* fMapfile; // Association of classes to libraries.
119 std::vector<std::string> fAutoLoadLibStorage; // A storage to return a const char* from GetClassSharedLibsForModule.
120 std::map<size_t,std::vector<const char*>> fClassesHeadersMap; // Map of classes hashes and headers associated
121 std::map<const cling::Transaction*,size_t> fTransactionHeadersMap; // Map which transaction contains which autoparse.
122 std::set<size_t> fLookedUpClasses; // Set of classes for which headers were looked up already
123 std::set<size_t> fPayloads; // Set of payloads
124 std::set<const char*> fParsedPayloadsAddresses; // Set of payloads which were parsed
125 std::hash<std::string> fStringHashFunction; // A simple hashing function
126 std::unordered_set<const clang::NamespaceDecl*> fNSFromRootmaps; // Collection of namespaces fwd declared in the rootmaps
127 TObjArray* fRootmapFiles; // Loaded rootmap files.
128 Bool_t fLockProcessLine; // True if ProcessLine should lock gInterpreterMutex.
129 Bool_t fCxxModulesEnabled;// True if C++ modules was enabled
130
131 std::unique_ptr<cling::Interpreter> fInterpreter; // The interpreter.
132 std::unique_ptr<cling::MetaProcessor> fMetaProcessor; // The metaprocessor.
133
134 std::vector<cling::Value> *fTemporaries; // Stack of temporaries
135 ROOT::TMetaUtils::TNormalizedCtxt *fNormalizedCtxt; // Which typedef to avoid stripping.
136 ROOT::TMetaUtils::TClingLookupHelper *fLookupHelper; // lookup helper used by TClassEdit
137
138 void* fPrevLoadedDynLibInfo; // Internal info to mark the last loaded libray.
139 std::vector<void*> fRegisterModuleDyLibs; // Stack of libraries currently running RegisterModule
140 TClingCallbacks* fClingCallbacks; // cling::Interpreter owns it.
142 bool operator()(const char* a, const char *b) const {
143 return strcmp(a, b) < 0;
144 }
145 };
146 std::set<TClass*> fModTClasses;
147 std::vector<std::pair<TClass*,DictFuncPtr_t> > fClassesToUpdate;
149 ULong64_t fTransactionCount; // Cling counter for commited or unloaded transactions which changed the AST.
150 std::vector<const char*> fCurExecutingMacros;
151
153 typedef std::unordered_map<std::string, TObject*> SpecialObjectMap_t;
154 std::map<SpecialObjectLookupCtx_t, SpecialObjectMap_t> fSpecialObjectMaps;
155
157 /// State of gCoreMutex when the first interpreter-related function was invoked.
158 std::unique_ptr<ROOT::TVirtualRWMutex::State> fState;
159
160 /// Interpreter-related functions will push the "entry" lock state to *this.
161 /// Recursive calls will do that, too - but we must only forget about the lock
162 /// state once this recursion count went to 0.
164
165 operator bool() const { return (bool)fState; }
166 };
167
170
172 std::unique_ptr<StateDelta> fDelta;
173 };
174
176
177 DeclId_t GetDeclId(const llvm::GlobalValue *gv) const;
178
179 static Int_t DeepAutoLoadImpl(const char *cls, std::unordered_set<std::string> &visited, bool nameIsNormalized);
180 static Int_t ShallowAutoLoadImpl(const char *cls);
181
184
185 UInt_t AutoParseImplRecurse(const char *cls, bool topLevel);
186 constexpr static const char* kNullArgv[] = {nullptr};
187
188 bool fIsShuttingDown = false;
189
190protected:
192
193public: // Public Interface
194
195 virtual ~TCling();
196 TCling(const char* name, const char* title, const char* const argv[]);
197 TCling(const char* name, const char* title): TCling(name, title, kNullArgv) {}
198
199 void AddIncludePath(const char* path);
200 void *GetAutoLoadCallBack() const { return fAutoLoadCallBack; }
201 void *SetAutoLoadCallBack(void* cb) { void* prev = fAutoLoadCallBack; fAutoLoadCallBack = cb; return prev; }
202 Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded = kFALSE);
203 Int_t AutoLoad(const std::type_info& typeinfo, Bool_t knowDictNotLoaded = kFALSE);
204 Int_t AutoParse(const char* cls);
205 void* LazyFunctionCreatorAutoload(const std::string& mangled_name);
206 bool LibraryLoadingFailed(const std::string&, const std::string&, bool, bool);
207 Bool_t IsAutoLoadNamespaceCandidate(const clang::NamespaceDecl* nsDecl);
208 void ClearFileBusy();
209 void ClearStack(); // Delete existing temporary values
210 Bool_t Declare(const char* code);
211 void EndOfLineAction();
212 TClass *GetClass(const std::type_info& typeinfo, Bool_t load) const;
213 Int_t GetExitCode() const { return fExitCode; }
214 TEnv* GetMapfile() const { return fMapfile; }
215 Int_t GetMore() const { return fMore; }
216 TClass *GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent = kFALSE);
217 TClass *GenerateTClass(ClassInfo_t *classinfo, Bool_t silent = kFALSE);
218 Int_t GenerateDictionary(const char* classes, const char* includes = "", const char* options = 0);
219 char* GetPrompt() { return fPrompt; }
220 const char* GetSharedLibs();
221 const char* GetClassSharedLibs(const char* cls);
222 const char* GetSharedLibDeps(const char* lib, bool tryDyld = false);
223 const char* GetIncludePath();
224 virtual const char* GetSTLIncludePath() const;
226 unsigned long long GetInterpreterStateMarker() const { return fTransactionCount;}
227 virtual void Initialize();
228 virtual void ShutDown();
229 void InspectMembers(TMemberInspector&, const void* obj, const TClass* cl, Bool_t isTransient);
230 Bool_t IsLoaded(const char* filename) const;
231 Bool_t IsLibraryLoaded(const char* libname) const;
232 Bool_t HasPCMForLibrary(const char *libname) const;
233 Int_t Load(const char* filenam, Bool_t system = kFALSE);
234 void LoadMacro(const char* filename, EErrorCode* error = 0);
235 Int_t LoadLibraryMap(const char* rootmapfile = 0);
239 Int_t UnloadLibraryMap(const char* library);
240 Longptr_t ProcessLine(const char* line, EErrorCode* error = 0);
241 Longptr_t ProcessLineAsynch(const char* line, EErrorCode* error = 0);
242 Longptr_t ProcessLineSynch(const char* line, EErrorCode* error = 0);
243 void PrintIntro();
244 bool RegisterPrebuiltModulePath(const std::string& FullPath,
245 const std::string& ModuleMapName = "module.modulemap") const;
246 void RegisterModule(const char* modulename,
247 const char** headers,
248 const char** includePaths,
249 const char* payloadCode,
250 const char* fwdDeclsCode,
251 void (*triggerFunc)(),
252 const FwdDeclArgsToKeepCollection_t& fwdDeclsArgToSkip,
253 const char** classesHeaders,
254 Bool_t lateRegistration = false,
255 Bool_t hasCxxModule = false);
256 virtual void AddAvailableIndentifiers(TSeqCollection& Idents);
257 void RegisterTClassUpdate(TClass *oldcl,DictFuncPtr_t dict);
258 void UnRegisterTClassUpdate(const TClass *oldcl);
259
260 Int_t SetClassSharedLibs(const char *cls, const char *libs);
261 void SetGetline(const char * (*getlineFunc)(const char* prompt),
262 void (*histaddFunc)(const char* line));
263 void Reset();
264 void ResetAll();
265 void ResetGlobals();
266 void ResetGlobalVar(void* obj);
267 void RewindDictionary();
268 Int_t DeleteGlobal(void* obj);
269 Int_t DeleteVariable(const char *name);
270 void SaveContext();
271 void SaveGlobalsContext();
272 void UpdateListOfGlobals();
274 void UpdateListOfTypes();
275 void SetClassInfo(TClass* cl, Bool_t reload = kFALSE);
276
277 ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly = kFALSE);
278
279 Bool_t CheckClassTemplate(const char *name);
280 Longptr_t Calc(const char* line, EErrorCode* error = 0);
281 void CreateListOfBaseClasses(TClass* cl) const;
282 void CreateListOfDataMembers(TClass* cl) const;
283 void CreateListOfMethods(TClass* cl) const;
285 void UpdateListOfMethods(TClass* cl) const;
286 void UpdateListOfDataMembers(TClass* cl) const;
287
288 virtual DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const;
289 virtual DeclId_t GetDataMemberAtAddr(const void *addr) const;
290 virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const;
291 virtual DeclId_t GetEnum(TClass *cl, const char *name) const;
292 virtual TEnum* CreateEnum(void *VD, TClass *cl) const;
293 virtual void UpdateEnumConstants(TEnum* enumObj, TClass* cl) const;
294 virtual void LoadEnums(TListOfEnums& cl) const;
295 virtual std::string ToString(const char* type, void *obj);
296 TString GetMangledName(TClass* cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
297 TString GetMangledNameWithPrototype(TClass* cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
298 void* GetInterfaceMethod(TClass* cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
299 void* GetInterfaceMethodWithPrototype(TClass* cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
300 DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname);
301 DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
302 DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
303 DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname);
304 void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector<DeclId_t>& res) const;
305 virtual void LoadFunctionTemplates(TClass* cl) const;
306
307 virtual std::vector<std::string> GetUsingNamespaces(ClassInfo_t *cl) const;
308
309 void GetInterpreterTypeName(const char* name, std::string &output, Bool_t full = kFALSE);
310 void Execute(const char* function, const char* params, int* error = 0);
311 void Execute(TObject* obj, TClass* cl, const char* method, const char* params, int* error = 0);
312 void Execute(TObject* obj, TClass* cl, const char* method, const char* params, Bool_t objectIsConst, int* error = 0);
313 void Execute(TObject* obj, TClass* cl, TMethod* method, TObjArray* params, int* error = 0);
314 void ExecuteWithArgsAndReturn(TMethod* method, void* address, const void* args[] = 0, int nargs = 0, void* ret= 0) const;
315 Longptr_t ExecuteMacro(const char* filename, EErrorCode* error = 0);
316 void RecursiveRemove(TObject* obj);
320 return fLockProcessLine;
321 }
323 fLockProcessLine = lock;
324 }
325 const char* TypeName(const char* typeDesc);
326
328 void ForgetMutexState();
329
330 void ApplyToInterpreterMutex(void* delta);
332
333 static void UpdateClassInfo(char* name, Long_t tagnum);
334 static void UpdateClassInfoWork(const char* name);
335 void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias);
336 void UpdateClassInfoWithDecl(const clang::NamedDecl* ND);
337 static void UpdateAllCanvases();
338
339 // Misc
340 virtual int DisplayClass(FILE* fout, const char* name, int base, int start) const;
341 virtual int DisplayIncludePath(FILE* fout) const;
342 virtual void* FindSym(const char* entry) const;
343 virtual void GenericError(const char* error) const;
344 virtual Long_t GetExecByteCode() const;
345 virtual const char* GetTopLevelMacroName() const;
346 virtual const char* GetCurrentMacroName() const;
347 virtual int GetSecurityError() const;
348 virtual int LoadFile(const char* path) const;
349 virtual Bool_t LoadText(const char* text) const;
350 virtual const char* MapCppName(const char*) const;
351 virtual void SetAlloclockfunc(void (*)()) const;
352 virtual void SetAllocunlockfunc(void (*)()) const;
353 virtual int SetClassAutoLoading(int) const;
354 virtual int SetClassAutoparsing(int) ;
356 virtual void SetErrmsgcallback(void* p) const;
357 virtual void ReportDiagnosticsToErrorHandler(bool enable = true);
358 virtual void SetTempLevel(int val) const;
359 virtual int UnloadFile(const char* path) const;
360
361 void CodeComplete(const std::string&, size_t&,
362 std::vector<std::string>&);
363 virtual int Evaluate(const char*, TInterpreterValue&);
364 virtual std::unique_ptr<TInterpreterValue> MakeInterpreterValue() const;
365 void RegisterTemporary(const TInterpreterValue& value);
366 void RegisterTemporary(const cling::Value& value);
368 TObject* GetObjectAddress(const char *Name, void *&LookupCtx);
369
370
371 // core/meta helper functions.
372 virtual EReturnType MethodCallReturnType(TFunction *func) const;
373 virtual void GetFunctionName(const clang::Decl *decl, std::string &name) const;
374 virtual bool DiagnoseIfInterpreterException(const std::exception &e) const;
375
376 // CallFunc interface
377 virtual DeclId_t GetDeclId(CallFunc_t *info) const;
378 virtual void CallFunc_Delete(CallFunc_t* func) const;
379 virtual void CallFunc_Exec(CallFunc_t* func, void* address) const;
380 virtual void CallFunc_Exec(CallFunc_t* func, void* address, TInterpreterValue& val) const;
381 virtual void CallFunc_ExecWithReturn(CallFunc_t* func, void* address, void* ret) const;
382 virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t* func, void* address, const void* args[] = 0, int nargs = 0, void* ret = 0) const;
383 virtual Longptr_t CallFunc_ExecInt(CallFunc_t* func, void* address) const;
384 virtual Long64_t CallFunc_ExecInt64(CallFunc_t* func, void* address) const;
385 virtual Double_t CallFunc_ExecDouble(CallFunc_t* func, void* address) const;
386 virtual CallFunc_t* CallFunc_Factory() const;
387 virtual CallFunc_t* CallFunc_FactoryCopy(CallFunc_t* func) const;
388 virtual MethodInfo_t* CallFunc_FactoryMethod(CallFunc_t* func) const;
389 virtual void CallFunc_IgnoreExtraArgs(CallFunc_t* func, bool ignore) const;
390 virtual void CallFunc_Init(CallFunc_t* func) const;
391 virtual bool CallFunc_IsValid(CallFunc_t* func) const;
392 virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t * func) const;
393 virtual void CallFunc_ResetArg(CallFunc_t* func) const;
394 virtual void CallFunc_SetArg(CallFunc_t* func, Long_t param) const;
395 virtual void CallFunc_SetArg(CallFunc_t* func, ULong_t param) const;
396 virtual void CallFunc_SetArg(CallFunc_t* func, Float_t param) const;
397 virtual void CallFunc_SetArg(CallFunc_t* func, Double_t param) const;
398 virtual void CallFunc_SetArg(CallFunc_t* func, Long64_t param) const;
399 virtual void CallFunc_SetArg(CallFunc_t* func, ULong64_t param) const;
400 virtual void CallFunc_SetArgArray(CallFunc_t* func, Longptr_t* paramArr, Int_t nparam) const;
401 virtual void CallFunc_SetArgs(CallFunc_t* func, const char* param) const;
402 virtual void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* params, Longptr_t* Offset) const;
403 virtual void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* params, bool objectIsConst, Longptr_t* Offset) const;
404 virtual void CallFunc_SetFunc(CallFunc_t* func, MethodInfo_t* info) const;
405 virtual void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* proto, Longptr_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
406 virtual void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* proto, bool objectIsConst, Longptr_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
407 virtual void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const std::vector<TypeInfo_t*> &proto, Longptr_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
408 virtual void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const std::vector<TypeInfo_t*> &proto, bool objectIsConst, Longptr_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
409
410 virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const;
411
412 // ClassInfo interface
413 virtual DeclId_t GetDeclId(ClassInfo_t *info) const;
414 virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const;
415 virtual Long_t ClassInfo_ClassProperty(ClassInfo_t* info) const;
416 virtual void ClassInfo_Delete(ClassInfo_t* info) const;
417 virtual void ClassInfo_Delete(ClassInfo_t* info, void* arena) const;
418 virtual void ClassInfo_DeleteArray(ClassInfo_t* info, void* arena, bool dtorOnly) const;
419 virtual void ClassInfo_Destruct(ClassInfo_t* info, void* arena) const;
420 virtual ClassInfo_t* ClassInfo_Factory(Bool_t all = kTRUE) const;
421 virtual ClassInfo_t* ClassInfo_Factory(ClassInfo_t* cl) const;
422 virtual ClassInfo_t* ClassInfo_Factory(const char* name) const;
423 virtual ClassInfo_t* ClassInfo_Factory(DeclId_t declid) const;
424 virtual Longptr_t ClassInfo_GetBaseOffset(ClassInfo_t* fromDerived, ClassInfo_t* toBase, void * address, bool isDerivedObject) const;
425 virtual int ClassInfo_GetMethodNArg(ClassInfo_t* info, const char* method, const char* proto, Bool_t objectIsConst = false, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
426 virtual bool ClassInfo_HasDefaultConstructor(ClassInfo_t* info, Bool_t testio = kFALSE) const;
427 virtual bool ClassInfo_HasMethod(ClassInfo_t* info, const char* name) const;
428 virtual void ClassInfo_Init(ClassInfo_t* info, const char* funcname) const;
429 virtual void ClassInfo_Init(ClassInfo_t* info, int tagnum) const;
430 virtual bool ClassInfo_IsBase(ClassInfo_t* info, const char* name) const;
431 virtual bool ClassInfo_IsEnum(const char* name) const;
432 virtual bool ClassInfo_IsScopedEnum(ClassInfo_t* info) const;
433 virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t* info) const;
434 virtual bool ClassInfo_IsLoaded(ClassInfo_t* info) const;
435 virtual bool ClassInfo_IsValid(ClassInfo_t* info) const;
436 virtual bool ClassInfo_IsValidMethod(ClassInfo_t* info, const char* method, const char* proto, Longptr_t* offset, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const;
437 virtual bool ClassInfo_IsValidMethod(ClassInfo_t* info, const char* method, const char* proto, Bool_t objectIsConst, Longptr_t* offset, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const;
438 virtual int ClassInfo_Next(ClassInfo_t* info) const;
439 virtual void* ClassInfo_New(ClassInfo_t* info) const;
440 virtual void* ClassInfo_New(ClassInfo_t* info, int n) const;
441 virtual void* ClassInfo_New(ClassInfo_t* info, int n, void* arena) const;
442 virtual void* ClassInfo_New(ClassInfo_t* info, void* arena) const;
443 virtual Long_t ClassInfo_Property(ClassInfo_t* info) const;
444 virtual int ClassInfo_Size(ClassInfo_t* info) const;
445 virtual Longptr_t ClassInfo_Tagnum(ClassInfo_t* info) const;
446 virtual const char* ClassInfo_FileName(ClassInfo_t* info) const;
447 virtual const char* ClassInfo_FullName(ClassInfo_t* info) const;
448 virtual const char* ClassInfo_Name(ClassInfo_t* info) const;
449 virtual const char* ClassInfo_Title(ClassInfo_t* info) const;
450 virtual const char* ClassInfo_TmpltName(ClassInfo_t* info) const;
451
452 // BaseClassInfo interface
453 virtual void BaseClassInfo_Delete(BaseClassInfo_t* bcinfo) const;
454 virtual BaseClassInfo_t* BaseClassInfo_Factory(ClassInfo_t* info) const;
455 virtual BaseClassInfo_t* BaseClassInfo_Factory(ClassInfo_t* derived,
456 ClassInfo_t* base) const;
457 virtual int BaseClassInfo_Next(BaseClassInfo_t* bcinfo) const;
458 virtual int BaseClassInfo_Next(BaseClassInfo_t* bcinfo, int onlyDirect) const;
459 virtual Longptr_t BaseClassInfo_Offset(BaseClassInfo_t* toBaseClassInfo, void * address, bool isDerivedObject) const;
460 virtual Long_t BaseClassInfo_Property(BaseClassInfo_t* bcinfo) const;
461 virtual Longptr_t BaseClassInfo_Tagnum(BaseClassInfo_t* bcinfo) const;
462 virtual ClassInfo_t*BaseClassInfo_ClassInfo(BaseClassInfo_t * /* bcinfo */) const;
463 virtual const char* BaseClassInfo_FullName(BaseClassInfo_t* bcinfo) const;
464 virtual const char* BaseClassInfo_Name(BaseClassInfo_t* bcinfo) const;
465 virtual const char* BaseClassInfo_TmpltName(BaseClassInfo_t* bcinfo) const;
466
467 // DataMemberInfo interface
468 virtual DeclId_t GetDeclId(DataMemberInfo_t *info) const;
469 virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t* dminfo) const;
470 virtual void DataMemberInfo_Delete(DataMemberInfo_t* dminfo) const;
471 virtual DataMemberInfo_t* DataMemberInfo_Factory(ClassInfo_t* clinfo, TDictionary::EMemberSelection selection) const;
472 virtual DataMemberInfo_t *DataMemberInfo_Factory(DeclId_t declid, ClassInfo_t* clinfo) const;
473 virtual DataMemberInfo_t* DataMemberInfo_FactoryCopy(DataMemberInfo_t* dminfo) const;
474 virtual bool DataMemberInfo_IsValid(DataMemberInfo_t* dminfo) const;
475 virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t* dminfo, Int_t dim) const;
476 virtual int DataMemberInfo_Next(DataMemberInfo_t* dminfo) const;
477 virtual Longptr_t DataMemberInfo_Offset(DataMemberInfo_t* dminfo) const;
478 virtual Long_t DataMemberInfo_Property(DataMemberInfo_t* dminfo) const;
479 virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t* dminfo) const;
480 virtual int DataMemberInfo_TypeSize(DataMemberInfo_t* dminfo) const;
481 virtual const char* DataMemberInfo_TypeName(DataMemberInfo_t* dminfo) const;
482 virtual const char* DataMemberInfo_TypeTrueName(DataMemberInfo_t* dminfo) const;
483 virtual const char* DataMemberInfo_Name(DataMemberInfo_t* dminfo) const;
484 virtual const char* DataMemberInfo_Title(DataMemberInfo_t* dminfo) const;
485 virtual const char* DataMemberInfo_ValidArrayIndex(DataMemberInfo_t* dminfo) const;
486 virtual void SetDeclAttr(DeclId_t, const char* /* attribute */);
487
488
489 // Function Template interface
490 virtual DeclId_t GetDeclId(FuncTempInfo_t *info) const;
491 virtual void FuncTempInfo_Delete(FuncTempInfo_t * /* ft_info */) const;
492 virtual FuncTempInfo_t *FuncTempInfo_Factory(DeclId_t declid) const;
493 virtual FuncTempInfo_t *FuncTempInfo_FactoryCopy(FuncTempInfo_t * /* ft_info */) const;
494 virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t * /* ft_info */) const;
495 virtual UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t * /* ft_info */) const;
496 virtual UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t * /* ft_info */) const;
497 virtual Long_t FuncTempInfo_Property(FuncTempInfo_t * /* ft_info */) const;
498 virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t * /* ft_info */) const;
499 virtual void FuncTempInfo_Name(FuncTempInfo_t * /* ft_info */, TString& name) const;
500 virtual void FuncTempInfo_Title(FuncTempInfo_t * /* ft_info */, TString& name) const;
501
502 // MethodInfo interface
503 virtual DeclId_t GetDeclId(MethodInfo_t *info) const;
504 virtual void MethodInfo_CreateSignature(MethodInfo_t* minfo, TString& signature) const;
505 virtual void MethodInfo_Delete(MethodInfo_t* minfo) const;
506 virtual MethodInfo_t* MethodInfo_Factory() const;
507 virtual MethodInfo_t* MethodInfo_Factory(ClassInfo_t *clinfo) const;
508 virtual MethodInfo_t *MethodInfo_Factory(DeclId_t declid) const;
509 virtual MethodInfo_t* MethodInfo_FactoryCopy(MethodInfo_t* minfo) const;
510 virtual void* MethodInfo_InterfaceMethod(MethodInfo_t* minfo) const;
511 virtual bool MethodInfo_IsValid(MethodInfo_t* minfo) const;
512 virtual int MethodInfo_NArg(MethodInfo_t* minfo) const;
513 virtual int MethodInfo_NDefaultArg(MethodInfo_t* minfo) const;
514 virtual int MethodInfo_Next(MethodInfo_t* minfo) const;
515 virtual Long_t MethodInfo_Property(MethodInfo_t* minfo) const;
516 virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t* minfo) const;
517 virtual TypeInfo_t* MethodInfo_Type(MethodInfo_t* minfo) const;
518 virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t* minfo) const;
519 virtual const char* MethodInfo_GetMangledName(MethodInfo_t* minfo) const;
520 virtual const char* MethodInfo_GetPrototype(MethodInfo_t* minfo) const;
521 virtual const char* MethodInfo_Name(MethodInfo_t* minfo) const;
522 virtual const char* MethodInfo_TypeName(MethodInfo_t* minfo) const;
523 virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t* minfo) const;
524 virtual const char* MethodInfo_Title(MethodInfo_t* minfo) const;
525
526 // MethodArgInfo interface
527 virtual void MethodArgInfo_Delete(MethodArgInfo_t* marginfo) const;
528 virtual MethodArgInfo_t* MethodArgInfo_Factory() const;
529 virtual MethodArgInfo_t* MethodArgInfo_Factory(MethodInfo_t *minfo) const;
530 virtual MethodArgInfo_t* MethodArgInfo_FactoryCopy(MethodArgInfo_t* marginfo) const;
531 virtual bool MethodArgInfo_IsValid(MethodArgInfo_t* marginfo) const;
532 virtual int MethodArgInfo_Next(MethodArgInfo_t* marginfo) const;
533 virtual Long_t MethodArgInfo_Property(MethodArgInfo_t* marginfo) const;
534 virtual const char* MethodArgInfo_DefaultValue(MethodArgInfo_t* marginfo) const;
535 virtual const char* MethodArgInfo_Name(MethodArgInfo_t* marginfo) const;
536 virtual const char* MethodArgInfo_TypeName(MethodArgInfo_t* marginfo) const;
537 virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const;
538
539 // TypeInfo interface
540 virtual void TypeInfo_Delete(TypeInfo_t* tinfo) const;
541 virtual TypeInfo_t* TypeInfo_Factory() const;
542 virtual TypeInfo_t *TypeInfo_Factory(const char* name) const;
543 virtual TypeInfo_t* TypeInfo_FactoryCopy(TypeInfo_t* /* tinfo */) const;
544 virtual void TypeInfo_Init(TypeInfo_t* tinfo, const char* funcname) const;
545 virtual bool TypeInfo_IsValid(TypeInfo_t* tinfo) const;
546 virtual const char* TypeInfo_Name(TypeInfo_t* /* info */) const;
547 virtual Long_t TypeInfo_Property(TypeInfo_t* tinfo) const;
548 virtual int TypeInfo_RefType(TypeInfo_t* /* tinfo */) const;
549 virtual int TypeInfo_Size(TypeInfo_t* tinfo) const;
550 virtual const char* TypeInfo_TrueName(TypeInfo_t* tinfo) const;
551
552 // TypedefInfo interface
553 virtual DeclId_t GetDeclId(TypedefInfo_t *info) const;
554 virtual void TypedefInfo_Delete(TypedefInfo_t* tinfo) const;
555 virtual TypedefInfo_t* TypedefInfo_Factory() const;
556 virtual TypedefInfo_t* TypedefInfo_Factory(const char* name) const;
557 virtual TypedefInfo_t* TypedefInfo_FactoryCopy(TypedefInfo_t* tinfo) const;
558 virtual void TypedefInfo_Init(TypedefInfo_t* tinfo, const char* name) const;
559 virtual bool TypedefInfo_IsValid(TypedefInfo_t* tinfo) const;
560 virtual int TypedefInfo_Next(TypedefInfo_t* tinfo) const;
561 virtual Long_t TypedefInfo_Property(TypedefInfo_t* tinfo) const;
562 virtual int TypedefInfo_Size(TypedefInfo_t* tinfo) const;
563 virtual const char* TypedefInfo_TrueName(TypedefInfo_t* tinfo) const;
564 virtual const char* TypedefInfo_Name(TypedefInfo_t* tinfo) const;
565 virtual const char* TypedefInfo_Title(TypedefInfo_t* tinfo) const;
566
567 std::set<TClass*>& GetModTClasses() { return fModTClasses; }
568
569 void HandleNewDecl(const void* DV, bool isDeserialized, std::set<TClass*>& modifiedClasses);
570 void UpdateListsOnCommitted(const cling::Transaction &T);
571 void UpdateListsOnUnloaded(const cling::Transaction &T);
572 void InvalidateGlobal(const clang::Decl *D);
573 void TransactionRollback(const cling::Transaction &T);
574 void LibraryLoaded(const void* dyLibHandle, const char* canonicalName);
575 void LibraryUnloaded(const void* dyLibHandle, const char* canonicalName);
576
577private: // Private Utility Functions and Classes
578 template <typename List, typename Object>
579 static void RemoveAndInvalidateObject(List &L, Object *O) {
580 // Invalidate stored information by setting the `xxxInfo_t' to nullptr.
581 if (O && O->IsValid())
582 L.Unload(O), O->Update(nullptr);
583 }
584
585 void InvalidateCachedDecl(const std::tuple<TListOfDataMembers*,
588 TListOfEnums*> &Lists, const clang::Decl *D);
589
591 TCling *fTCling = nullptr;
593
594 public:
597 };
598
600 public:
601 TUniqueString() = delete;
602 TUniqueString(const TUniqueString &) = delete;
604 const char *Data();
605 bool Append(const std::string &str);
606 private:
607 std::string fContent;
608 std::set<size_t> fLinesHashSet;
609 std::hash<std::string> fHashFunc;
610 };
611
613 TCling(const TCling&) = delete;
614 TCling& operator=(const TCling&) = delete;
615
616 void Execute(TMethod*, TObjArray*, int* /*error*/ = nullptr)
617 {
618 }
619
621 void RegisterLoadedSharedLibrary(const char* name);
622 void AddFriendToClass(clang::FunctionDecl*, clang::CXXRecordDecl*) const;
623
624 std::map<std::string, llvm::StringRef> fPendingRdicts;
625 void RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
626 void LoadPCM(std::string pcmFileNameFullPath);
627 void LoadPCMImpl(TFile &pcmFile);
628
629 void InitRootmapFile(const char *name);
630 int ReadRootmapFile(const char *rootmapfile, TUniqueString* uniqueString = nullptr);
631 Bool_t HandleNewTransaction(const cling::Transaction &T);
632 bool IsClassAutoLoadingEnabled() const;
634 cling::Interpreter *GetInterpreterImpl() const { return fInterpreter.get(); }
635 cling::MetaProcessor *GetMetaProcessorImpl() const { return fMetaProcessor.get(); }
636
637 friend void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
638 friend cling::Interpreter* TCling__GetInterpreter();
639};
640
641#endif
void Object()
Definition: Object.C:6
#define b(i)
Definition: RSha256.hxx:100
#define e(i)
Definition: RSha256.hxx:103
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Definition: RtypesCore.h:45
long Longptr_t
Definition: RtypesCore.h:82
unsigned int UInt_t
Definition: RtypesCore.h:46
const Bool_t kFALSE
Definition: RtypesCore.h:101
unsigned long ULong_t
Definition: RtypesCore.h:55
long Long_t
Definition: RtypesCore.h:54
bool Bool_t
Definition: RtypesCore.h:63
double Double_t
Definition: RtypesCore.h:59
long long Long64_t
Definition: RtypesCore.h:80
unsigned long long ULong64_t
Definition: RtypesCore.h:81
float Float_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:100
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:80
void TCling__LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
void TCling__LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
void TCling__TransactionRollback(const cling::Transaction &)
Definition: TCling.cxx:569
void TCling__UpdateListsOnCommitted(const cling::Transaction &, cling::Interpreter *)
Definition: TCling.cxx:554
void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Definition: TCling.cxx:578
const clang::Decl * TCling__GetObjectDecl(TObject *obj)
Definition: TCling.cxx:594
void TCling__UpdateListsOnUnloaded(const cling::Transaction &)
Definition: TCling.cxx:559
void TCling__InvalidateGlobal(const clang::Decl *)
Definition: TCling.cxx:564
TObject * TCling__GetObjectAddress(const char *Name, void *&LookupCtx)
Definition: TCling.cxx:590
EDataType
Definition: TDataType.h:28
char name[80]
Definition: TGX11.cxx:110
int type
Definition: TGX11.cxx:121
const char * proto
Definition: civetweb.c:16604
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
SuspendAutoLoadingRAII(TCling *tcling)
Definition: TCling.h:595
TUniqueString(const TUniqueString &)=delete
const char * Data()
Definition: TCling.cxx:1013
bool Append(const std::string &str)
Append string to the storage if not added already.
Definition: TCling.cxx:1021
std::hash< std::string > fHashFunc
Definition: TCling.h:609
std::set< size_t > fLinesHashSet
Definition: TCling.h:608
std::string fContent
Definition: TCling.h:607
This class defines an interface to the cling C++ interpreter.
Definition: TCling.h:102
virtual const char * MethodArgInfo_DefaultValue(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9258
static Int_t DeepAutoLoadImpl(const char *cls, std::unordered_set< std::string > &visited, bool nameIsNormalized)
Definition: TCling.cxx:6098
virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const
Definition: TCling.cxx:8085
virtual void FuncTempInfo_Name(FuncTempInfo_t *, TString &name) const
Return the name of this function template.
Definition: TCling.cxx:8930
virtual void FuncTempInfo_Title(FuncTempInfo_t *, TString &name) const
Return the comments associates with this function template.
Definition: TCling.cxx:8943
virtual int TypedefInfo_Next(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9436
virtual bool DiagnoseIfInterpreterException(const std::exception &e) const
Definition: TCling.cxx:2449
virtual bool ClassInfo_IsValid(ClassInfo_t *info) const
Definition: TCling.cxx:8301
virtual bool ClassInfo_IsScopedEnum(ClassInfo_t *info) const
Definition: TCling.cxx:8275
Bool_t HasPCMForLibrary(const char *libname) const
Return true if ROOT has cxxmodules pcm for a given library name.
Definition: TCling.cxx:3109
virtual MethodInfo_t * MethodInfo_FactoryCopy(MethodInfo_t *minfo) const
Definition: TCling.cxx:9015
virtual const char * TypeInfo_Name(TypeInfo_t *) const
Definition: TCling.cxx:9342
DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname)
Return pointer to cling interface function for a method of a class with a certain name.
Definition: TCling.cxx:4927
bool LibraryLoadingFailed(const std::string &, const std::string &, bool, bool)
Definition: TCling.cxx:6462
void ForgetMutexState()
Definition: TCling.cxx:9499
Longptr_t ProcessLineSynch(const char *line, EErrorCode *error=0)
Let cling process a command line synchronously, i.e we are waiting it will be finished.
Definition: TCling.cxx:3505
virtual bool ClassInfo_HasMethod(ClassInfo_t *info, const char *name) const
Definition: TCling.cxx:8234
std::vector< void * > fRegisterModuleDyLibs
Definition: TCling.h:139
virtual MethodInfo_t * CallFunc_FactoryMethod(CallFunc_t *func) const
Definition: TCling.cxx:7897
virtual bool MethodInfo_IsValid(MethodInfo_t *minfo) const
Definition: TCling.cxx:9030
std::vector< std::string > fAutoLoadLibStorage
Definition: TCling.h:119
Bool_t fLockProcessLine
Definition: TCling.h:128
virtual const char * DataMemberInfo_TypeTrueName(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8663
void CreateListOfDataMembers(TClass *cl) const
Create list of pointers to data members for TClass cl.
Definition: TCling.cxx:4393
void UnRegisterTClassUpdate(const TClass *oldcl)
If the dictionary is loaded, we can remove the class from the list (otherwise the class might be load...
Definition: TCling.cxx:2400
void HandleNewDecl(const void *DV, bool isDeserialized, std::set< TClass * > &modifiedClasses)
Definition: TCling.cxx:486
void InvalidateCachedDecl(const std::tuple< TListOfDataMembers *, TListOfFunctions *, TListOfFunctionTemplates *, TListOfEnums * > &Lists, const clang::Decl *D)
Invalidate cached TCling information for the given declaration, and removed it from the appropriate o...
Definition: TCling.cxx:6879
virtual const char * MethodInfo_TypeName(MethodInfo_t *minfo) const
Definition: TCling.cxx:9112
bool RegisterPrebuiltModulePath(const std::string &FullPath, const std::string &ModuleMapName="module.modulemap") const
Definition: TCling.cxx:1913
virtual Long_t TypedefInfo_Property(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9444
virtual void MethodArgInfo_Delete(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9203
virtual void LoadFunctionTemplates(TClass *cl) const
Create list of pointers to function templates for TClass cl.
Definition: TCling.cxx:4346
virtual CallFunc_t * CallFunc_Factory() const
Definition: TCling.cxx:7882
virtual TypedefInfo_t * TypedefInfo_FactoryCopy(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9411
std::vector< const char * > fCurExecutingMacros
Definition: TCling.h:150
void UpdateListsOnCommitted(const cling::Transaction &T)
Definition: TCling.cxx:6753
virtual void SetAllocunlockfunc(void(*)()) const
[Place holder for Mutex Unlock] Provide the interpreter with a way to release a lock used to protect ...
Definition: TCling.cxx:7521
void UpdateListOfTypes()
No op: see TClingCallbacks (used to update the list of types)
Definition: TCling.cxx:3835
const char * GetSharedLibDeps(const char *lib, bool tryDyld=false)
Get the list a libraries on which the specified lib depends.
Definition: TCling.cxx:7267
virtual DeclId_t GetDataMemberAtAddr(const void *addr) const
Return pointer to cling DeclId for a data member with a given name.
Definition: TCling.cxx:4848
virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8557
virtual bool ClassInfo_IsBase(ClassInfo_t *info, const char *name) const
Definition: TCling.cxx:8260
virtual int BaseClassInfo_Next(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8465
virtual void GenericError(const char *error) const
Let the interpreter issue a generic error, and set its error state.
Definition: TCling.cxx:7434
virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9282
virtual const char * ClassInfo_TmpltName(ClassInfo_t *info) const
Definition: TCling.cxx:8423
virtual TEnum * CreateEnum(void *VD, TClass *cl) const
Definition: TCling.cxx:459
virtual EReturnType MethodCallReturnType(TFunction *func) const
Definition: TCling.cxx:9139
virtual int UnloadFile(const char *path) const
Definition: TCling.cxx:7623
virtual int Evaluate(const char *, TInterpreterValue &)
Get the interpreter value corresponding to the statement.
Definition: TCling.cxx:7651
TObject * GetObjectAddress(const char *Name, void *&LookupCtx)
If the interpreter encounters Name, check whether that is an object ROOT could retrieve.
Definition: TCling.cxx:7687
virtual Long_t TypeInfo_Property(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9350
DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Return pointer to cling interface function for a method of a class with a certain prototype,...
Definition: TCling.cxx:5053
bool IsClassAutoLoadingEnabled() const
Returns if class AutoLoading is currently enabled.
Definition: TCling.cxx:7529
void InvalidateGlobal(const clang::Decl *D)
Invalidate cached TCling information for the given global declaration.
Definition: TCling.cxx:6864
void EndOfLineAction()
It calls a "fantom" method to synchronize user keyboard input and ROOT prompt line.
Definition: TCling.cxx:3083
DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Return pointer to cling DeclId for a method of a class with a certain prototype, i....
Definition: TCling.cxx:5031
void UpdateListOfLoadedSharedLibraries()
Definition: TCling.cxx:3299
void RegisterModule(const char *modulename, const char **headers, const char **includePaths, const char *payloadCode, const char *fwdDeclsCode, void(*triggerFunc)(), const FwdDeclArgsToKeepCollection_t &fwdDeclsArgToSkip, const char **classesHeaders, Bool_t lateRegistration=false, Bool_t hasCxxModule=false)
Inject the module named "modulename" into cling; load all headers.
Definition: TCling.cxx:2019
virtual const char * DataMemberInfo_ValidArrayIndex(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8687
void InitRootmapFile(const char *name)
Create a resource table and read the (possibly) three resource files, i.e. $ROOTSYS/etc/system<name> ...
Definition: TCling.cxx:5549
virtual Longptr_t ClassInfo_GetBaseOffset(ClassInfo_t *fromDerived, ClassInfo_t *toBase, void *address, bool isDerivedObject) const
Definition: TCling.cxx:8489
void CreateListOfMethodArgs(TFunction *m) const
Create list of pointers to method arguments for TMethod m.
Definition: TCling.cxx:4427
virtual void TypedefInfo_Init(TypedefInfo_t *tinfo, const char *name) const
Definition: TCling.cxx:9418
virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t *minfo) const
Definition: TCling.cxx:9070
virtual void ReportDiagnosticsToErrorHandler(bool enable=true)
Report diagnostics to the ROOT error handler (see TError.h).
Definition: TCling.cxx:7590
void LoadPCM(std::string pcmFileNameFullPath)
Tries to load a rdict PCM, issues diagnostics if it fails.
Definition: TCling.cxx:1824
virtual ~TCling()
Destroy the interpreter interface.
Definition: TCling.cxx:1631
void AddFriendToClass(clang::FunctionDecl *, clang::CXXRecordDecl *) const
Inject function as a friend into klass.
Definition: TCling.cxx:7740
Bool_t fCxxModulesEnabled
Definition: TCling.h:129
void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias)
Internal function. Actually do the update of the ClassInfo when seeing.
Definition: TCling.cxx:6626
void ExecuteWithArgsAndReturn(TMethod *method, void *address, const void *args[]=0, int nargs=0, void *ret=0) const
Definition: TCling.cxx:5283
virtual void FuncTempInfo_Delete(FuncTempInfo_t *) const
Delete the FuncTempInfo_t.
Definition: TCling.cxx:8780
Bool_t SetSuspendAutoParsing(Bool_t value)
Suspend the Autoparsing of headers.
Definition: TCling.cxx:7571
virtual DataMemberInfo_t * DataMemberInfo_FactoryCopy(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8591
virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t *func) const
Definition: TCling.cxx:7931
Longptr_t Calc(const char *line, EErrorCode *error=0)
Directly execute an executable statement (e.g.
Definition: TCling.cxx:3521
virtual void CallFunc_ExecWithReturn(CallFunc_t *func, void *address, void *ret) const
Definition: TCling.cxx:7839
virtual MethodArgInfo_t * MethodArgInfo_Factory() const
Definition: TCling.cxx:9210
virtual void DataMemberInfo_Delete(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8565
Int_t fExitCode
Definition: TCling.h:110
void ApplyToInterpreterMutex(void *delta)
Re-apply the lock count delta that TCling__ResetInterpreterMutex() caused.
Definition: TCling.cxx:9515
void * LazyFunctionCreatorAutoload(const std::string &mangled_name)
Autoload a library based on a missing symbol.
Definition: TCling.cxx:6523
virtual int LoadFile(const char *path) const
Load a source file or library called path into the interpreter.
Definition: TCling.cxx:7477
void CodeComplete(const std::string &, size_t &, std::vector< std::string > &)
The call to Cling's tab complition.
Definition: TCling.cxx:7643
virtual Long_t FuncTempInfo_Property(FuncTempInfo_t *) const
Return the property of the function template.
Definition: TCling.cxx:8844
virtual TypeInfo_t * MethodInfo_Type(MethodInfo_t *minfo) const
Definition: TCling.cxx:9078
virtual const char * MethodArgInfo_TypeName(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9274
Bool_t HandleNewTransaction(const cling::Transaction &T)
Helper function to increase the internal Cling count of transactions that change the AST.
Definition: TCling.cxx:3601
virtual bool ClassInfo_HasDefaultConstructor(ClassInfo_t *info, Bool_t testio=kFALSE) const
Definition: TCling.cxx:8226
virtual bool DataMemberInfo_IsValid(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8599
int ReadRootmapFile(const char *rootmapfile, TUniqueString *uniqueString=nullptr)
Read and parse a rootmapfile in its new format, and return 0 in case of success, -1 if the file has a...
Definition: TCling.cxx:5426
Bool_t IsLoaded(const char *filename) const
Return true if the file has already been loaded by cint.
Definition: TCling.cxx:3134
const char * GetSharedLibs()
Return the list of shared libraries loaded into the process.
Definition: TCling.cxx:6977
virtual const char * GetTopLevelMacroName() const
Return the file name of the current un-included interpreted file.
Definition: TCling.cxx:5314
std::map< SpecialObjectLookupCtx_t, SpecialObjectMap_t > fSpecialObjectMaps
Definition: TCling.h:154
virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const
NOT IMPLEMENTED.
Definition: TCling.cxx:4839
virtual bool MethodArgInfo_IsValid(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9234
Int_t ReloadAllSharedLibraryMaps()
Reload the library map entries coming from all the loaded shared libraries, after first unloading the...
Definition: TCling.cxx:5831
virtual void SetErrmsgcallback(void *p) const
Set a callback to receive error messages.
Definition: TCling.cxx:7581
virtual std::string ToString(const char *type, void *obj)
Definition: TCling.cxx:1030
virtual const char * MethodInfo_Title(MethodInfo_t *minfo) const
Definition: TCling.cxx:9131
virtual int DataMemberInfo_TypeSize(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8647
virtual ClassInfo_t * ClassInfo_Factory(Bool_t all=kTRUE) const
Definition: TCling.cxx:8188
virtual const char * MethodInfo_GetMangledName(MethodInfo_t *minfo) const
Definition: TCling.cxx:9086
virtual bool CallFunc_IsValid(CallFunc_t *func) const
Definition: TCling.cxx:7922
virtual const char * BaseClassInfo_TmpltName(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8544
virtual void SetAlloclockfunc(void(*)()) const
[Place holder for Mutex Lock] Provide the interpreter with a way to acquire a lock used to protect cr...
Definition: TCling.cxx:7511
virtual void MethodInfo_CreateSignature(MethodInfo_t *minfo, TString &signature) const
Definition: TCling.cxx:8982
void SnapshotMutexState(ROOT::TVirtualRWMutex *mtx)
Definition: TCling.cxx:9484
virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const
Return true if the entity pointed to by 'declid' is declared in the context described by 'info'.
Definition: TCling.cxx:8104
std::set< size_t > fPayloads
Definition: TCling.h:123
virtual const char * ClassInfo_Name(ClassInfo_t *info) const
Definition: TCling.cxx:8407
Int_t UnloadLibraryMap(const char *library)
Unload library map entries coming from the specified library.
Definition: TCling.cxx:5910
virtual ClassInfo_t * BaseClassInfo_ClassInfo(BaseClassInfo_t *) const
Definition: TCling.cxx:8510
TObjArray * fRootmapFiles
Definition: TCling.h:127
virtual void CallFunc_Delete(CallFunc_t *func) const
Definition: TCling.cxx:7816
virtual Long_t ClassInfo_ClassProperty(ClassInfo_t *info) const
Definition: TCling.cxx:8149
cling::Interpreter * GetInterpreterImpl() const
Definition: TCling.h:634
virtual bool ClassInfo_IsLoaded(ClassInfo_t *info) const
Definition: TCling.cxx:8293
std::vector< std::pair< TClass *, DictFuncPtr_t > > fClassesToUpdate
Definition: TCling.h:147
virtual int ClassInfo_GetMethodNArg(ClassInfo_t *info, const char *method, const char *proto, Bool_t objectIsConst=false, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
Definition: TCling.cxx:8218
virtual Longptr_t BaseClassInfo_Tagnum(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8518
Int_t DeleteGlobal(void *obj)
Delete obj from Cling symbol table so it cannot be accessed anymore.
Definition: TCling.cxx:3719
virtual const char * GetCurrentMacroName() const
Return the file name of the currently interpreted file, included or not.
Definition: TCling.cxx:5361
const ROOT::TMetaUtils::TNormalizedCtxt & GetNormalizedContext() const
Definition: TCling.h:367
virtual void TypeInfo_Delete(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9295
virtual Bool_t LoadText(const char *text) const
Load the declarations from text into the interpreter.
Definition: TCling.cxx:7490
friend cling::Interpreter * TCling__GetInterpreter()
std::set< TClass * > fModTClasses
Definition: TCling.h:146
void GetInterpreterTypeName(const char *name, std::string &output, Bool_t full=kFALSE)
The 'name' is known to the interpreter, this function returns the internal version of this name (usua...
Definition: TCling.cxx:5098
void * RewindInterpreterMutex()
Reset the interpreter lock to the state it had before interpreter-related calls happened.
Definition: TCling.cxx:9545
TCling(const char *name, const char *title)
Definition: TCling.h:197
virtual int GetSecurityError() const
Interface to cling function.
Definition: TCling.cxx:7464
virtual UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t *) const
Return the number of required template arguments of the function template described by ft_info.
Definition: TCling.cxx:8834
void ResetGlobals()
Reset in Cling the list of global variables to the state saved by the last call to TCling::SaveGlobal...
Definition: TCling.cxx:3676
Longptr_t ExecuteMacro(const char *filename, EErrorCode *error=0)
Execute a cling macro.
Definition: TCling.cxx:5301
virtual const char * ClassInfo_Title(ClassInfo_t *info) const
Definition: TCling.cxx:8415
virtual void AddAvailableIndentifiers(TSeqCollection &Idents)
Definition: TCling.cxx:2365
virtual Long_t BaseClassInfo_Property(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8502
virtual FuncTempInfo_t * FuncTempInfo_Factory(DeclId_t declid) const
Construct a FuncTempInfo_t.
Definition: TCling.cxx:8789
void * GetInterfaceMethod(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Return pointer to cling interface function for a method of a class with parameters params (params is ...
Definition: TCling.cxx:4905
virtual void ClassInfo_Destruct(ClassInfo_t *info, void *arena) const
Definition: TCling.cxx:8180
virtual const char * BaseClassInfo_FullName(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8526
virtual bool ClassInfo_IsEnum(const char *name) const
Definition: TCling.cxx:8268
virtual DataMemberInfo_t * DataMemberInfo_Factory(ClassInfo_t *clinfo, TDictionary::EMemberSelection selection) const
Definition: TCling.cxx:8572
virtual void TypedefInfo_Delete(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9388
void SetGetline(const char *(*getlineFunc)(const char *prompt), void(*histaddFunc)(const char *line))
Set a getline function to call when input is needed.
Definition: TCling.cxx:3584
Int_t fGlobalsListSerial
Definition: TCling.h:115
virtual Longptr_t BaseClassInfo_Offset(BaseClassInfo_t *toBaseClassInfo, void *address, bool isDerivedObject) const
Definition: TCling.cxx:8481
void RewindDictionary()
Rewind Cling dictionary to the point where it was before executing the current macro.
Definition: TCling.cxx:3705
TString fSharedLibs
Definition: TCling.h:114
std::map< std::string, llvm::StringRef > fPendingRdicts
Definition: TCling.h:624
virtual const char * MapCppName(const char *) const
Interface to cling function.
Definition: TCling.cxx:7498
static void UpdateClassInfoWork(const char *name)
Definition: TCling.cxx:6733
virtual bool ClassInfo_IsValidMethod(ClassInfo_t *info, const char *method, const char *proto, Longptr_t *offset, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TCling.cxx:8309
virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t *) const
Return the property not already defined in Property See TDictionary's EFunctionProperty.
Definition: TCling.cxx:8904
void PrintIntro()
No-op; see TRint instead.
Definition: TCling.cxx:2626
virtual CallFunc_t * CallFunc_FactoryCopy(CallFunc_t *func) const
Definition: TCling.cxx:7890
virtual const char * DataMemberInfo_Name(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8671
Bool_t Declare(const char *code)
Declare code to the interpreter, without any of the interpreter actions that could trigger a re-inter...
Definition: TCling.cxx:3060
Int_t DeleteVariable(const char *name)
Undeclare obj called name.
Definition: TCling.cxx:3734
virtual int ClassInfo_Next(ClassInfo_t *info) const
Definition: TCling.cxx:8325
static void * fgSetOfSpecials
Definition: TCling.h:105
void AddIncludePath(const char *path)
Add a directory to the list of directories in which the interpreter looks for include files.
Definition: TCling.cxx:2640
virtual const char * MethodInfo_Name(MethodInfo_t *minfo) const
Definition: TCling.cxx:9104
void ClearFileBusy()
Reset the interpreter internal state in case a previous action was not correctly terminated.
Definition: TCling.cxx:3039
virtual const char * MethodArgInfo_Name(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9266
virtual Long_t ClassInfo_Property(ClassInfo_t *info) const
Definition: TCling.cxx:8365
Int_t fMore
Definition: TCling.h:109
ROOT::TMetaUtils::TNormalizedCtxt * fNormalizedCtxt
Definition: TCling.h:135
virtual int MethodInfo_Next(MethodInfo_t *minfo) const
Definition: TCling.cxx:9054
const char * TypeName(const char *typeDesc)
Return the absolute type of typeDesc.
Definition: TCling.cxx:5376
Int_t GetMore() const
Definition: TCling.h:215
bool fIsShuttingDown
Definition: TCling.h:188
unsigned long long GetInterpreterStateMarker() const
Definition: TCling.h:226
void SaveContext()
Save the current Cling state.
Definition: TCling.cxx:3795
std::set< TClass * > & GetModTClasses()
Definition: TCling.h:567
Longptr_t ProcessLine(const char *line, EErrorCode *error=0)
Definition: TCling.cxx:2460
virtual bool TypeInfo_IsValid(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9334
Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded=kFALSE)
Load library containing the specified class.
Definition: TCling.cxx:6159
TClingCallbacks * fClingCallbacks
Definition: TCling.h:140
TString GetMangledNameWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Return the cling mangled name for a method of a class with a certain prototype, i....
Definition: TCling.cxx:4887
void RegisterTClassUpdate(TClass *oldcl, DictFuncPtr_t dict)
Register classes that already existed prior to their dictionary loading and that already had a ClassI...
Definition: TCling.cxx:2391
virtual Long_t DataMemberInfo_Property(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8631
void UpdateListOfGlobalFunctions()
No op: see TClingCallbacks (used to update the list of global functions)
Definition: TCling.cxx:3828
Bool_t IsAutoParsingSuspended() const
Definition: TCling.h:355
virtual const char * MethodInfo_GetPrototype(MethodInfo_t *minfo) const
Definition: TCling.cxx:9096
Longptr_t ProcessLineAsynch(const char *line, EErrorCode *error=0)
Let cling process a command line asynch.
Definition: TCling.cxx:3496
TString fIncludePath
Definition: TCling.h:116
virtual Longptr_t CallFunc_ExecInt(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7858
virtual void * ClassInfo_New(ClassInfo_t *info) const
Definition: TCling.cxx:8333
void Execute(TMethod *, TObjArray *, int *=nullptr)
Execute method on this object with parameters stored in the TObjArray.
Definition: TCling.h:616
virtual void TypeInfo_Init(TypeInfo_t *tinfo, const char *funcname) const
Definition: TCling.cxx:9325
Bool_t SetErrorMessages(Bool_t enable=kTRUE)
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
Definition: TCling.cxx:7334
virtual const char * DataMemberInfo_Title(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8679
void TransactionRollback(const cling::Transaction &T)
Definition: TCling.cxx:6939
virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t *info) const
Definition: TCling.cxx:8284
virtual void CallFunc_Init(CallFunc_t *func) const
Definition: TCling.cxx:7913
virtual UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t *) const
Return the maximum number of template arguments of the function template described by ft_info.
Definition: TCling.cxx:8823
TString GetMangledName(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Return the cling mangled name for a method of a class with parameters params (params is a string of a...
Definition: TCling.cxx:4860
virtual void SetTempLevel(int val) const
Create / close a scope for temporaries.
Definition: TCling.cxx:7617
void SetProcessLineLock(Bool_t lock=kTRUE)
Definition: TCling.h:322
virtual DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const
Return pointer to cling Decl of global/static variable that is located at the address given by addr.
Definition: TCling.cxx:4670
void RegisterTemporary(const TInterpreterValue &value)
Definition: TCling.cxx:7660
MutexStateAndRecurseCount fInitialMutex
Definition: TCling.h:175
virtual void LoadEnums(TListOfEnums &cl) const
Create list of pointers to enums for TClass cl.
Definition: TCling.cxx:4299
virtual void CallFunc_SetArg(CallFunc_t *func, Long_t param) const
Definition: TCling.cxx:7947
virtual Long_t GetExecByteCode() const
This routines used to return the address of the internal wrapper function (of the interpreter) that w...
Definition: TCling.cxx:7456
virtual void * MethodInfo_InterfaceMethod(MethodInfo_t *minfo) const
Definition: TCling.cxx:9022
friend void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Definition: TCling.cxx:578
Int_t UnloadAllSharedLibraryMaps()
Unload the library map entries coming from all the loaded shared libraries.
Definition: TCling.cxx:5892
virtual void CallFunc_IgnoreExtraArgs(CallFunc_t *func, bool ignore) const
Definition: TCling.cxx:7905
void * SetAutoLoadCallBack(void *cb)
Definition: TCling.h:201
std::vector< cling::Value > * fTemporaries
Definition: TCling.h:134
virtual Long_t MethodInfo_Property(MethodInfo_t *minfo) const
Definition: TCling.cxx:9062
virtual std::unique_ptr< TInterpreterValue > MakeInterpreterValue() const
Definition: TCling.cxx:7636
static Int_t ShallowAutoLoadImpl(const char *cls)
Definition: TCling.cxx:6050
void LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
Definition: TCling.cxx:6962
virtual TypedefInfo_t * TypedefInfo_Factory() const
Definition: TCling.cxx:9395
void UpdateListOfGlobals()
No op: see TClingCallbacks (used to update the list of globals)
Definition: TCling.cxx:3821
void ClearStack()
Delete existing temporary values.
Definition: TCling.cxx:3047
void * SpecialObjectLookupCtx_t
Definition: TCling.h:152
std::map< const cling::Transaction *, size_t > fTransactionHeadersMap
Definition: TCling.h:121
virtual int SetClassAutoparsing(int)
Enable/Disable the Autoparsing of headers.
Definition: TCling.cxx:7560
Bool_t fHeaderParsingOnDemand
Definition: TCling.h:182
virtual int SetClassAutoLoading(int) const
Enable/Disable the AutoLoading of libraries.
Definition: TCling.cxx:7542
Int_t RescanLibraryMap()
Scan again along the dynamic path for library maps.
Definition: TCling.cxx:5819
virtual int DataMemberInfo_Next(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8615
void Reset()
Pressing Ctrl+C should forward here.
Definition: TCling.cxx:3644
Int_t Load(const char *filenam, Bool_t system=kFALSE)
Load a library file in cling's memory.
Definition: TCling.cxx:3451
void InspectMembers(TMemberInspector &, const void *obj, const TClass *cl, Bool_t isTransient)
Visit all members over members, recursing over base classes.
Definition: TCling.cxx:2655
std::hash< std::string > fStringHashFunction
Definition: TCling.h:125
TEnv * fMapfile
Definition: TCling.h:118
const char * GetIncludePath()
Refresh the list of include paths known to the interpreter and return it with -I prepended.
Definition: TCling.cxx:7348
static void RemoveAndInvalidateObject(List &L, Object *O)
Definition: TCling.h:579
virtual void ClassInfo_DeleteArray(ClassInfo_t *info, void *arena, bool dtorOnly) const
Definition: TCling.cxx:8172
virtual void GetFunctionName(const clang::Decl *decl, std::string &name) const
Definition: TCling.cxx:8735
virtual DeclId_t GetEnum(TClass *cl, const char *name) const
Return pointer to cling Decl of global/static variable that is located at the address given by addr.
Definition: TCling.cxx:4730
void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector< DeclId_t > &res) const
Insert overloads of name in cl to res.
Definition: TCling.cxx:4946
virtual Longptr_t DataMemberInfo_Offset(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8623
virtual void CallFunc_Exec(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7823
std::unordered_map< std::string, TObject * > SpecialObjectMap_t
Definition: TCling.h:153
virtual int DisplayIncludePath(FILE *fout) const
Interface to cling function.
Definition: TCling.cxx:7397
void RegisterLoadedSharedLibrary(const char *name)
Register a new shared library name with the interpreter; add it to fSharedLibs.
Definition: TCling.cxx:3359
constexpr static const char * kNullArgv[]
Definition: TCling.h:186
virtual void UpdateEnumConstants(TEnum *enumObj, TClass *cl) const
Definition: TCling.cxx:411
void SaveGlobalsContext()
Save the current Cling state of global objects.
Definition: TCling.cxx:3808
std::unordered_set< const clang::NamespaceDecl * > fNSFromRootmaps
Definition: TCling.h:126
void ProcessClassesToUpdate()
Definition: TCling.cxx:1989
virtual Long_t MethodArgInfo_Property(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9250
virtual const char * GetSTLIncludePath() const
Return the directory containing CINT's stl cintdlls.
Definition: TCling.cxx:7379
TString fRootmapLoadPath
Definition: TCling.h:117
Int_t LoadLibraryMap(const char *rootmapfile=0)
Load map between class and library.
Definition: TCling.cxx:5635
virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t *minfo) const
Definition: TCling.cxx:9120
void Execute(const char *function, const char *params, int *error=0)
Execute a global function with arguments params.
Definition: TCling.cxx:5131
virtual const char * ClassInfo_FullName(ClassInfo_t *info) const
Definition: TCling.cxx:8397
TClass * GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent=kFALSE)
Generate a TClass for the given class.
Definition: TCling.cxx:4450
virtual Longptr_t ClassInfo_Tagnum(ClassInfo_t *info) const
Definition: TCling.cxx:8381
virtual int TypeInfo_Size(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9366
virtual int MethodArgInfo_Next(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9242
ROOT::TMetaUtils::TClingLookupHelper * fLookupHelper
Definition: TCling.h:136
virtual const char * TypedefInfo_TrueName(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9460
Bool_t fIsAutoParsingSuspended
Definition: TCling.h:183
TClass * GetClass(const std::type_info &typeinfo, Bool_t load) const
Demangle the name (from the typeinfo) and then request the class via the usual name based interface (...
Definition: TCling.cxx:6004
DeclId_t GetDeclId(const llvm::GlobalValue *gv) const
Return pointer to cling DeclId for a global value.
Definition: TCling.cxx:4770
virtual std::vector< std::string > GetUsingNamespaces(ClassInfo_t *cl) const
Get the scopes representing using declarations of namespace.
Definition: TCling.cxx:4382
Int_t SetClassSharedLibs(const char *cls, const char *libs)
Register the AutoLoading information for a class.
Definition: TCling.cxx:5972
virtual void ClassInfo_Init(ClassInfo_t *info, const char *funcname) const
Definition: TCling.cxx:8242
virtual TypeInfo_t * TypeInfo_FactoryCopy(TypeInfo_t *) const
Definition: TCling.cxx:9318
Bool_t CheckClassTemplate(const char *name)
Return true if there is a class template by the given name ...
Definition: TCling.cxx:4255
void LoadPCMImpl(TFile &pcmFile)
Tries to load a PCM from TFile; returns true on success.
Definition: TCling.cxx:1709
Bool_t IsAutoLoadNamespaceCandidate(const clang::NamespaceDecl *nsDecl)
Definition: TCling.cxx:6618
TObjArray * GetRootMapFiles() const
Definition: TCling.h:225
char fPrompt[64]
Definition: TCling.h:111
void * fPrevLoadedDynLibInfo
Definition: TCling.h:138
void UpdateListOfDataMembers(TClass *cl) const
Update the list of pointers to data members for TClass cl This is now a nop.
Definition: TCling.cxx:4420
virtual void SetDeclAttr(DeclId_t, const char *)
Definition: TCling.cxx:8698
virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8639
virtual void ShutDown()
Definition: TCling.cxx:1668
virtual const char * DataMemberInfo_TypeName(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8655
virtual void CallFunc_SetArgs(CallFunc_t *func, const char *param) const
Definition: TCling.cxx:8003
virtual const char * BaseClassInfo_Name(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8536
virtual void MethodInfo_Delete(MethodInfo_t *minfo) const
Interface to cling function.
Definition: TCling.cxx:8975
virtual void CallFunc_SetFunc(CallFunc_t *func, ClassInfo_t *info, const char *method, const char *params, Longptr_t *Offset) const
Definition: TCling.cxx:8011
virtual const char * TypeInfo_TrueName(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9374
std::set< const char * > fParsedPayloadsAddresses
Definition: TCling.h:124
ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly=kFALSE)
Checks if an entity with the specified name is defined in Cling.
Definition: TCling.cxx:4083
static void UpdateClassInfo(char *name, Long_t tagnum)
No op: see TClingCallbacks.
Definition: TCling.cxx:6727
virtual void BaseClassInfo_Delete(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8438
void ResetGlobalVar(void *obj)
Reset the Cling 'user' global objects/variables state to the state saved by the last call to TCling::...
Definition: TCling.cxx:3690
std::unique_ptr< cling::Interpreter > fInterpreter
Definition: TCling.h:131
Bool_t IsLibraryLoaded(const char *libname) const
Definition: TCling.cxx:3100
TEnv * GetMapfile() const
Definition: TCling.h:214
TCling & operator=(const TCling &)=delete
virtual void Initialize()
Initialize the interpreter, once TROOT::fInterpreter is set.
Definition: TCling.cxx:1649
virtual void * FindSym(const char *entry) const
Interface to cling function.
Definition: TCling.cxx:7426
virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t *dminfo, Int_t dim) const
Definition: TCling.cxx:8607
void SetClassInfo(TClass *cl, Bool_t reload=kFALSE)
Set pointer to the TClingClassInfo in TClass.
Definition: TCling.cxx:3954
virtual int TypeInfo_RefType(TypeInfo_t *) const
Definition: TCling.cxx:9358
cling::MetaProcessor * GetMetaProcessorImpl() const
Definition: TCling.h:635
void LoadMacro(const char *filename, EErrorCode *error=0)
Load a macro file in cling's memory.
Definition: TCling.cxx:3488
std::set< size_t > fLookedUpClasses
Definition: TCling.h:122
TCling(const TCling &)=delete
virtual void CallFunc_ResetArg(CallFunc_t *func) const
Definition: TCling.cxx:7939
virtual Long64_t CallFunc_ExecInt64(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7866
void ResetAll()
Reset the Cling state to its initial state.
Definition: TCling.cxx:3660
virtual void ClassInfo_Delete(ClassInfo_t *info) const
Definition: TCling.cxx:8157
virtual Double_t CallFunc_ExecDouble(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7874
UInt_t AutoParseImplRecurse(const char *cls, bool topLevel)
Helper routine for TCling::AutoParse implementing the actual call to the parser and looping over temp...
Definition: TCling.cxx:6275
virtual const char * TypedefInfo_Title(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9476
void CreateListOfBaseClasses(TClass *cl) const
Create list of pointers to base class(es) for TClass cl.
Definition: TCling.cxx:4275
void RecursiveRemove(TObject *obj)
Delete object from cling symbol table so it can not be used anymore.
Definition: TCling.cxx:3619
virtual MethodArgInfo_t * MethodArgInfo_FactoryCopy(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9226
void UpdateListsOnUnloaded(const cling::Transaction &T)
Invalidate stored TCling state for declarations included in transaction ‘T’.
Definition: TCling.cxx:6837
void UpdateClassInfoWithDecl(const clang::NamedDecl *ND)
Internal function. Inform a TClass about its new TagDecl or NamespaceDecl.
Definition: TCling.cxx:6669
virtual void CallFunc_SetFuncProto(CallFunc_t *func, ClassInfo_t *info, const char *method, const char *proto, Longptr_t *Offset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
Interface to cling function.
Definition: TCling.cxx:8038
virtual const char * ClassInfo_FileName(ClassInfo_t *info) const
Definition: TCling.cxx:8389
virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t *func, void *address, const void *args[]=0, int nargs=0, void *ret=0) const
Definition: TCling.cxx:7847
DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname)
Return pointer to cling interface function for a method of a class with a certain name.
Definition: TCling.cxx:5075
virtual int MethodInfo_NArg(MethodInfo_t *minfo) const
Definition: TCling.cxx:9038
char * GetPrompt()
Definition: TCling.h:219
virtual FuncTempInfo_t * FuncTempInfo_FactoryCopy(FuncTempInfo_t *) const
Construct a FuncTempInfo_t.
Definition: TCling.cxx:8800
void * fAutoLoadCallBack
Definition: TCling.h:148
virtual int TypedefInfo_Size(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9452
std::unique_ptr< cling::MetaProcessor > fMetaProcessor
Definition: TCling.h:132
virtual const char * TypedefInfo_Name(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9468
virtual int DisplayClass(FILE *fout, const char *name, int base, int start) const
Definition: TCling.cxx:7388
const char * GetClassSharedLibs(const char *cls)
Get the list of shared libraries containing the code for class cls.
Definition: TCling.cxx:7080
void * GetAutoLoadCallBack() const
Definition: TCling.h:200
Bool_t IsErrorMessagesEnabled() const
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
Definition: TCling.cxx:7320
ULong64_t fTransactionCount
Definition: TCling.h:149
virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t *) const
Check validity of a FuncTempInfo_t.
Definition: TCling.cxx:8811
virtual BaseClassInfo_t * BaseClassInfo_Factory(ClassInfo_t *info) const
Definition: TCling.cxx:8445
virtual bool TypedefInfo_IsValid(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9428
virtual MethodInfo_t * MethodInfo_Factory() const
Definition: TCling.cxx:8990
Int_t GetExitCode() const
Definition: TCling.h:213
Int_t AutoParse(const char *cls)
Parse the headers relative to the class Returns 1 in case of success, 0 in case of failure.
Definition: TCling.cxx:6417
virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t *minfo) const
Definition: TCling.cxx:9150
void * GetInterfaceMethodWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Return pointer to cling interface function for a method of a class with a certain prototype,...
Definition: TCling.cxx:5008
virtual TypeInfo_t * TypeInfo_Factory() const
Definition: TCling.cxx:9302
std::map< size_t, std::vector< const char * > > fClassesHeadersMap
Definition: TCling.h:120
virtual int MethodInfo_NDefaultArg(MethodInfo_t *minfo) const
Definition: TCling.cxx:9046
Int_t GenerateDictionary(const char *classes, const char *includes="", const char *options=0)
Generate the dictionary for the C++ classes listed in the first argument (in a semi-colon separated l...
Definition: TCling.cxx:4622
void CreateListOfMethods(TClass *cl) const
Create list of pointers to methods for TClass cl.
Definition: TCling.cxx:4402
void UpdateListOfMethods(TClass *cl) const
Update the list of pointers to method for TClass cl This is now a nop.
Definition: TCling.cxx:4411
virtual void CallFunc_SetArgArray(CallFunc_t *func, Longptr_t *paramArr, Int_t nparam) const
Definition: TCling.cxx:7995
void RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Register Rdict data for future loading by LoadPCM;.
Definition: TCling.cxx:1691
virtual int ClassInfo_Size(ClassInfo_t *info) const
Definition: TCling.cxx:8373
static void UpdateAllCanvases()
Update all canvases at end the terminal input command.
Definition: TCling.cxx:6742
Bool_t IsProcessLineLocked() const
Definition: TCling.h:319
void LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
Definition: TCling.cxx:6969
EMemberSelection
Kinds of members to include in lists.
Definition: TDictionary.h:215
The TEnum class implements the enum type.
Definition: TEnum.h:33
The TEnv class reads config files, by default named .rootrc.
Definition: TEnv.h:124
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
Global functions class (global functions are obtained from CINT).
Definition: TFunction.h:30
THashTable implements a hash table to store TObject's.
Definition: THashTable.h:35
This class defines an abstract interface to a generic command line interpreter.
Definition: TInterpreter.h:64
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
Definition: TInterpreter.h:137
TDictionary::DeclId_t DeclId_t
Definition: TInterpreter.h:290
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnums.h:33
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
Abstract base class for accessing the data-members of a class.
Each ROOT class (see TClass) has a linked list of methods.
Definition: TMethod.h:38
An array of TObjects.
Definition: TObjArray.h:37
Mother of all ROOT objects.
Definition: TObject.h:37
Sequenceable collection abstract base class.
Basic string class.
Definition: TString.h:136
TText * text
TLine * line
RooCmdArg Offset(Bool_t flag=kTRUE)
Type
enumeration specifying the integration types.
const Int_t n
Definition: legend1.C:16
double T(double x)
Definition: ChebyshevPol.h:34
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:150
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
EFunctionMatchMode
Definition: TDictionary.h:160
@ kConversionMatch
Definition: TDictionary.h:162
static constexpr double L
Definition: TString.h:850
const char * Name
Definition: TXMLSetup.cxx:67
const char * Value
Definition: TXMLSetup.cxx:73
State as returned by GetStateDelta() that can be passed to Restore()
bool operator()(const char *a, const char *b) const
Definition: TCling.h:142
std::unique_ptr< StateDelta > fDelta
Definition: TCling.h:172
MutexStateAndRecurseCount fInitialState
Definition: TCling.h:171
std::unique_ptr< ROOT::TVirtualRWMutex::State > fState
State of gCoreMutex when the first interpreter-related function was invoked.
Definition: TCling.h:158
Int_t fRecurseCount
Interpreter-related functions will push the "entry" lock state to *this.
Definition: TCling.h:163
auto * m
Definition: textangle.C:8
auto * a
Definition: textangle.C:12
static void output(int code)
Definition: gifencode.c:226