Commit Graph

291 Commits

Author SHA1 Message Date
Vassil Vassilev
8fea4d6f75 Early exit if there is no Transaction. 2014-07-22 15:19:01 +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
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
manasij7479
2e3e929a41 Skip functions and vars with nested types and new failing enum tests 2014-07-22 14:52:02 +02:00
manasij7479
b71886acf3 Prevent the printing of extra semicolons 2014-07-22 14:52:01 +02:00
manasij7479
fac4708d54 Printing simple Macros enabled 2014-07-22 14:52:01 +02:00
Manasij Mukherjee
f474d63079 Generation of forward declarations of top level decls in an input file.
Consists of:
  ForwardDeclPrinter, adapted from clang::DeclPrinter
  Interpterer::GenerateAutoloadingMap for invoking the functionality
  It has hardcoded checks to prevent ForwardDeclPrinter from visiting decls from
standard library files. This restriction will be lifted after the
issues specifyed in the tests are fixed.
  Test cases for code which FowrardDeclPrinter can not deal with properly
2014-06-23 14:37:03 +02:00
manasij7479
f9f829c48e autoloading visitor 2014-06-10 15:24:01 +02:00
Vassil Vassilev
213141cb5c Use the more user-friendly clang diagnostics engine to produce execution errors. 2014-06-04 09:20:09 +02:00
Philippe Canal
63de420f9c Add missing transaction in Interpreter::StateDebuggerRAII::~StateDebuggerRAII
This prevents .printDebug from crashing.  However it is still more verbose
than expected.
2014-05-29 18:02:55 +02:00
Philippe Canal
0df6d7ee38 Add missing transaction in Interpreter::StateDebuggerRAII::StateDebuggerRAII
This prevents .printDebug from crashing.  However it is still more verbose
than expected.
2014-05-29 17:33:59 +02:00
Axel Naumann
a9ad9a8c02 Wrap using decl/def that are followed by code (ROOT-6153). 2014-05-27 12:17:12 +02:00
Vassil Vassilev
d03ba0fb9f Reduce cling's runtime overhead. 2014-05-21 18:11:58 +02:00
Vassil Vassilev
10259542d2 Add some future reference for the C runtime. 2014-05-18 18:08:59 +02:00
Vassil Vassilev
9b5c844b9b Change the wrapper signature to take a void* (useful for the C mode) 2014-05-18 18:08:59 +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
db0c7200db Use the short more meaningful function. 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
b29245024c Ignore #line directives in ShouldWrapInput(). 2014-05-15 17:53:03 +02:00
Axel Naumann
af66248191 Accessor to current transaction, useful e.g. for callbacks. 2014-05-14 15:32:58 +02:00
Vassil Vassilev
764f126c70 Simplify. 2014-05-09 15:28:06 +02:00
Axel Naumann
961cc8d7bf Add protection against missing CodeGen. 2014-05-06 12:18:00 +02:00
Axel Naumann
04d0d17f3e Protect from missing CodeGen. 2014-04-29 17:47:57 +02:00
Axel Naumann
a1bf77d47a If we cannot find the canonical file, try to load the original one. 2014-04-16 17:33:59 +02:00
Axel Naumann
164686caf1 Fix assert. Thanks, Timur! 2014-04-16 09:13:07 +02:00
Axel Naumann
cc04f68f1d Assert consistency: if we get a canonical name it must exist. 2014-04-15 18:22:55 +02:00
Vassil Vassilev
047391706d Return don't break, because it causes #including of so files. 2014-04-15 17:32:59 +02:00
Axel Naumann
1f9a259c33 Propagate cache flags from LookupFile() to FileManager::getFile(). 2014-04-15 17:32:59 +02:00
Vassil Vassilev
f75cef233f Implement callbacks for the DynamicLibraryManager. 2014-04-14 20:58:15 +02:00
Vassil Vassilev
e52457601c No need of flagging which is library and which not. The lib manager knows. 2014-04-14 20:58:14 +02:00
Vassil Vassilev
68a0a45eab Use normalized filenames. 2014-04-14 20:58:13 +02:00
Vassil Vassilev
9b4ea193c0 If cling::Value is provided turn result evaluation on. 2014-04-14 09:09:01 +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
Axel Naumann
895e8eaf51 Init member (thanks, valgrind). 2014-04-11 09:00:00 +02:00
Vassil Vassilev
76c4024d1d Polish the implementation. Each pragma equivalent must use different source location. 2014-04-02 15:29:58 +02:00
Axel Naumann
d00d9e8d54 Simplify; adapt to new Value. 2014-04-01 18:31:58 +02:00
Axel Naumann
93970e8c35 Replace StoredValueRef by Value. 2014-04-01 18:31:58 +02:00
Vassil Vassilev
ffc9fe50b5 Disable useless warnings only for the wrapper functions.
We simulate programatically:
void __cling_Unique {
  #pragma push
  #pragma ... ignore ...
  {code}
  #pragma pop
}
2014-04-01 17:09:58 +02:00
Vassil Vassilev
1f25fe3a00 CXX consistency. 2014-03-31 14:03:03 +02:00
Vassil Vassilev
73113c2c4b Reduce includes. 2014-03-31 14:03:02 +02:00
Vassil Vassilev
d86e86086f Use better, more accurate include. 2014-03-31 14:03:02 +02:00
Vassil Vassilev
5e3a83bd3b Set the ignored diags before the driver does parse from args.
This allows the driver to override our custom diagnostics if the user wants any
special treatment.
2014-03-31 14:03:01 +02:00
Vassil Vassilev
4d5e607256 Merge unloadTransaction and rollbackTransaction. 2014-03-24 14:25:58 +01:00
Axel Naumann
7390550dfe Add comment explaining (part of) the bootstrap sequencing. 2014-03-23 21:13:54 +01:00
CristinaCristescu
6422e03e30 Unloading of functions, enums, globals (ROOT-5701). 2014-03-17 14:48:07 +01:00