Commit Graph

443 Commits

Author SHA1 Message Date
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
manasij7479
662262e3ac Rename SetAutoloadCallback to EnableAutoloading 2014-07-22 14:52:04 +02:00
manasij7479
03e5ef7668 Prevent printing non-fixed enums Remove skipping of system headers Also, do not print default template arguments if they do not have a name. 2014-07-22 14:52:04 +02:00
manasij7479
6e642eeea8 Added options for controlling Macro printing and skipping System Headers And other modifications in ForwardDeclPrinter: HasNestedNameSpecifier function is now disabled. Because it fails for typedefs or classes not having complete definitions. Differentiating between variable initializations and function default arguments. 2014-07-22 14:52:03 +02:00
manasij7479
a812b2cd1d Added a function to attach the AutoloadCallback automatically 2014-07-22 14:52:03 +02:00
manasij7479
6b48ac6804 Default argument stripping for FunctionDecl Also, re-enabled the printing of function default arguments in ForwardDeclPrinter 2014-07-22 14:52:02 +02:00
manasij7479
ab048fa2dd Move Autoloading State information from Interpreter to Callback: Also, use the TransactionCommitted callback instead of a transformation Disable AutoloadingTransform in IncrementalParser for now. 2014-07-22 14:52:02 +02:00
manasij7479
e7a196dcbd Transformation-Callback Pipeline for Decls needing special handling (when defining after being forward declared.)
New state in Interpreter (AutoloadingStateInfo) containing a map.
AutoloadingTransform adapted to push required decls into this map.
AutoloadCallback adapted to be called when a file is included (but before being parsed)
(done by enabling PPCallbacks and overriding InclusionDirective method)
m_PPCallbacks changed from OwningPtr to a normal pointer as an workaround for double free bug.
Default template arguments as a POC example usage of this pileline.

Test:
AutoForwarding.C now passes because of this commit.

Extra:
Re-enabled the printing of class template default arguments when generating fwd declarations.
Forward declprinter now looks up the SourceManager for file name instead of directly printing the Argument.
2014-07-22 14:52:02 +02:00
Axel Naumann
df678cc870 Unused param names; trailing spaces. 2014-07-15 16:30:58 +02:00
CristinaCristescu
4cf130675f Fix const array of char*. (ROOT-5607). 2014-06-14 09:53:03 +02:00
manasij7479
f9f829c48e autoloading visitor 2014-06-10 15:24:01 +02:00
manasij7479
db964bfcfc purged ctags code and moved autoloading into interpreter 2014-06-10 15:24:01 +02:00
Vassil Vassilev
f5250400d4 Remove the junk I accidentally committed. 2014-06-05 17:38:59 +02:00
manasij7479
ebc1309b5f initial code for new approach
(cherry picked from commit fa2b32bd9281f61fd36ff1987041a9a7607ab5e7)
2014-06-04 10:06:03 +02:00
Vassil Vassilev
cd3259b39a Improve implementation of ctags. 2014-06-04 09:20:15 +02:00
manasij7479
6d1d81309d const ness updates in base class, etc 2014-06-04 09:20:15 +02:00
Vassil Vassilev
56b5dc86dd Obey coding rules and indentation. 2014-06-04 09:20:15 +02:00
Vassil Vassilev
08c26eb004 Obey coding styles and indentation. 2014-06-04 09:20:15 +02:00
manasij7479
024b16df11 Init TagsExtension Module, for extending cling to provide interactive hints
AutoloadCallback: Implementing InterpreterCallbacks to attach the module to cling
   The main focus is on overriding LookupObject so that the information about
   lookup failures are obtained from clang.
   The type of the name is not taken into consideration for now.

TagManager: To manage and lookup information from various sorts of tag files.
   Currently a TagManager object is owned by the callback system.
   This may change in future.

Wrapper: As a base class for handling particular types of tagfiles.
   The TagManager maintains a container of Wrappers.

CtagsFileWrapper: Implementing a wrapper for ctags.
   This class is responsible for generating a tagfile from a given path or list of files.
   It also performs lookups in the file generated by it.

And a few simple file system utils to complement llvm::sys::fs and path utilities
2014-06-04 09:20:14 +02:00
Vassil Vassilev
ee9fc709ab We don't need the ValuePrinter.h 2014-05-21 18:11:58 +02:00
Vassil Vassilev
d03ba0fb9f Reduce cling's runtime overhead. 2014-05-21 18:11:58 +02:00
Vassil Vassilev
e1c16dec1b Move the documentation at the accurate place. 2014-05-21 18:11:58 +02:00
Vassil Vassilev
2b9860162e Typo. 2014-05-19 16:27:54 +02:00
Vassil Vassilev
711e39e092 Pass in the transaction ptr, whoose value we print out. 2014-05-18 18:08:59 +02:00
Vassil Vassilev
74ad676363 Allow handling of ptr types by the non-specialized version. 2014-05-18 18:08:59 +02:00
Vassil Vassilev
46636a18d3 No need to pass the interpreter. We have it. 2014-05-18 18:08:59 +02:00
Vassil Vassilev
28de2c1cc2 No need to pass in the ASTContext, we have it. 2014-05-18 18:08:59 +02:00
Vassil Vassilev
47a0d9e5e8 No need of complex indirections and 'fancy' function signatures. Simplify. 2014-05-18 18:08:59 +02:00
Vassil Vassilev
3dc52b1e5f No need of 'public' StreamClingValue. 2014-05-18 18:08:58 +02:00
Vassil Vassilev
96be4e98c5 Remove dangling comment. 2014-05-18 18:08:58 +02:00
Vassil Vassilev
3e5af816aa No need to synthesize anything anymore. 2014-05-18 18:08:58 +02:00
Vassil Vassilev
3dfc56637b Get rid of redundant class. 2014-05-18 18:08:58 +02:00
Vassil Vassilev
c86fbc27b9 Rewire the dumping on cling::Value to its new implementation.
Dump cling::Value within setNoAlloc routines because this is its lifespan,
otherwise gets deleted if nobody requested it. I.e it was created only for
value printing purposes.

Dump cling::Value outside setWithAlloc because the actual value is not put inside
until the call to ::new finishes, thus we need to do it outside, i.e in EvaluateInternal.

Switch on the ValueExtraction synthesizer even when 'just' value printing. We
depend on it. Must be factored out properly in one class.

Stop attaching the value printing template magic, which didn't work in some cases.

Update the ref file, because now there is better type information.

Adapt the user-defined printout functions (TDatime).
2014-05-18 18:08:58 +02:00
Vassil Vassilev
245f098fe1 Record the outcome of VPAuto (auto detection if a value should be printed out). 2014-05-18 18:08:58 +02:00
Vassil Vassilev
e587158b03 Add the Interpreter* to the cling::Value. We can afford it, because its actual size is 24 and it anyway gets aligned to 32 (except on a few old washing machines). 2014-05-18 18:08:58 +02:00
Vassil Vassilev
b9cc758195 Allow simplisticCastAs to work on ptr types. 2014-05-18 18:08:58 +02:00
Vassil Vassilev
ca50db4ec7 Remove the const so that the proper overload can be picked up. 2014-05-18 18:08:58 +02:00
Vassil Vassilev
39f42b02cd Instead of passing the Expr*, which is being value printed, pass the Interpreter* and deduce the expr. 2014-05-18 18:08:58 +02:00
Vassil Vassilev
cb29e6e529 Add printing utility functions to the cling::Value. 2014-05-18 18:08:58 +02:00
Vassil Vassilev
9b009e02a6 Hide codegen from external users. 2014-05-18 18:08:58 +02:00
Axel Naumann
4dfe5ee75a Make interpreter available to callbacks. 2014-05-14 15:32:58 +02:00
Axel Naumann
af66248191 Accessor to current transaction, useful e.g. for callbacks. 2014-05-14 15:32:58 +02:00
Lukas Vacek
ce008b07fc Fix input files processing (cling foo.c should work now) 2014-05-02 19:01:01 +02:00
Axel Naumann
8b60eaf361 Survive and signal non-unique lookup results. 2014-04-29 17:47:58 +02:00
Vassil Vassilev
f75cef233f Implement callbacks for the DynamicLibraryManager. 2014-04-14 20:58:15 +02:00
Vassil Vassilev
68a0a45eab Use normalized filenames. 2014-04-14 20:58:13 +02:00
Vassil Vassilev
59c7b7b2d7 Coding convention. 2014-04-14 09:09:00 +02:00
Vassil Vassilev
6bb29c9130 Consistent argument names. 2014-04-14 09:09:00 +02:00
Vassil Vassilev
ebad01a510 Simplify and extend the dynamic library manager.
Now it provides an interface which can lookup library names. It can unload a
library and the implementation of loading and resolving a library name is much
simpler.

The extensions are greatly used by the unloading facilities in cling its users.
2014-04-14 09:09:00 +02:00
Vassil Vassilev
0abad4f1ff Implement an interface for file/librarly lookup, given the interpreter and system inc paths. 2014-04-14 09:09:00 +02:00