5032 Commits

Author SHA1 Message Date
Vassil Vassilev
1901c83a0e Fix warning in EC.
git-svn-id: http://root.cern.ch/svn/root/trunk@47475 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:20:22 +00:00
Axel Naumann
d465d934a5 Simplify the RAII:
when constructing it takes a snapshot of whatever is relevant.
when destructing it restores whatever is relevant.

Don't mess with the diag Begin/EndSourceFile(); that's only relevant on a frontend level (aka are we parsing command line flgs or already source files?)


git-svn-id: http://root.cern.ch/svn/root/trunk@47474 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:17:55 +00:00
Axel Naumann
546c2b1e61 When parsing .x/.L filename() //comment
* empty argument is not an error.
* pass comment to interpreter whether .x was successful or not; it might be an expected-diagnostic
Thus implement comment lexer.


git-svn-id: http://root.cern.ch/svn/root/trunk@47473 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:15:25 +00:00
Axel Naumann
83f7b6c23d Say who is complaining.
git-svn-id: http://root.cern.ch/svn/root/trunk@47470 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 10:10:57 +00:00
Axel Naumann
afcf1105c9 Having warnings does not mean failure.
git-svn-id: http://root.cern.ch/svn/root/trunk@47469 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 09:43:17 +00:00
Vassil Vassilev
009338beb7 Since cling::Transaction is public and the fact that on commit of transaction a
new transaction could be triggered, every compile should return the transaction
that it actually compiled. I.e. the cling::IncrementalParser::getLastTransaction
in many cases might not be the transaction we expect. For example in ROOT's case
plugin manager is triggered for some reason and the last transaction is not the
one that I'd personally expect.
This should be fix roottest/.../runMemory.C


git-svn-id: http://root.cern.ch/svn/root/trunk@47465 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 03:26:52 +00:00
Vassil Vassilev
e49c5fb31e If the first decl happens to be null ask the wrapper function for the ASTContext.
git-svn-id: http://root.cern.ch/svn/root/trunk@47459 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-19 21:17:28 +00:00
Axel Naumann
1546d01ca3 Make test more verbose; fix directory for library.
git-svn-id: http://root.cern.ch/svn/root/trunk@47430 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-19 10:59:40 +00:00
Axel Naumann
26f3d7cf75 Do cling's best at returning the currently executing file.
#included files will not be picked up as cling cannot tell where the currently running function was defined.
But it does know which file was passed to MetaProcessor::executeFunction() (e.g. via .x).
So at least store that.
This fixes the occurrences of GetCurrentMacroName() in tutorials/


git-svn-id: http://root.cern.ch/svn/root/trunk@47421 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-19 00:00:53 +00:00
Vassil Vassilev
177d20e14c Fix code generation of dynamic classes, i.e classes having virtual tables.
git-svn-id: http://root.cern.ch/svn/root/trunk@47418 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:57:52 +00:00
Vassil Vassilev
9fce4384b9 Add test exposing the problem with the partial code generation.
git-svn-id: http://root.cern.ch/svn/root/trunk@47417 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:56:46 +00:00
Vassil Vassilev
3a684ca4d6 HandleVTable assert is far too intrusive to stay.
git-svn-id: http://root.cern.ch/svn/root/trunk@47416 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:44:58 +00:00
Vassil Vassilev
9b1a7efe4b Indents
git-svn-id: http://root.cern.ch/svn/root/trunk@47415 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:27:00 +00:00
Vassil Vassilev
991d6c55c8 Assert actually on use of one of those routines in Sema.
git-svn-id: http://root.cern.ch/svn/root/trunk@47411 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 20:52:41 +00:00
Vassil Vassilev
6c4ae5b1dd Add non const iterator.
git-svn-id: http://root.cern.ch/svn/root/trunk@47407 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 15:46:16 +00:00
Axel Naumann
10c0ac8711 Don't free all JITted functions, only those that are referencing an unresolved symbol.
Thus also no need anymore to collect all jitted functions through a function JIT listener.
Sadly, recompilation of them will pick up the existing stub instead of actually recompiling.
Don't use StringRef.data() where we need a 0-terminated string for FindFunctionNamed().
Be explicit about what symbol is triggering an unresolved symbol.
Update test suite.


git-svn-id: http://root.cern.ch/svn/root/trunk@47398 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-17 16:28:14 +00:00
Axel Naumann
777c96d84e Only replace if used.
git-svn-id: http://root.cern.ch/svn/root/trunk@47397 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-17 16:22:57 +00:00
Axel Naumann
9386e93211 * The ExeEngine *is* the JIT (and not owned by the JIT); it is now owned by the ExectutionContext.
* Fix documentation
* Move d'tor to c'tor; document that both c'tor and d'tor should be in source because the OwningPtr c'tor and d'tor need a definition of ExecutionEngine, and we don't want to #include ExectuionEngine in the header.
* Add debug options to the JIT; keep frame pointer. Should make debugging a lot easier (and all tests continue to pass).


git-svn-id: http://root.cern.ch/svn/root/trunk@47396 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-17 12:09:08 +00:00
Axel Naumann
95a0df6fba Move things around.
Print the builder error message if needed.


git-svn-id: http://root.cern.ch/svn/root/trunk@47395 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-17 11:29:35 +00:00
Philippe Canal
fc629a9c46 code convention
git-svn-id: http://root.cern.ch/svn/root/trunk@47391 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-17 07:36:22 +00:00
Axel Naumann
47c2be1200 Handle ValuePrinting of char* 0 without crashing.
git-svn-id: http://root.cern.ch/svn/root/trunk@47378 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 20:25:34 +00:00
Fons Rademakers
c77d19d969 patch to turn off the -fvisibility-inlines-hidden option.
git-svn-id: http://root.cern.ch/svn/root/trunk@47373 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 17:09:37 +00:00
Vassil Vassilev
4761e31353 The patch has to be relative to llvm/src.
git-svn-id: http://root.cern.ch/svn/root/trunk@47368 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 16:24:09 +00:00
Vassil Vassilev
3c768be374 Patch adding the support for the case of TFile::Open(...);
git-svn-id: http://root.cern.ch/svn/root/trunk@47360 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 15:38:19 +00:00
Axel Naumann
6e29edaafa Add getAddressOfGlobal() taking a const char symbol name.
git-svn-id: http://root.cern.ch/svn/root/trunk@47358 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 15:32:43 +00:00
Axel Naumann
ee70e6bee3 tryCode only makes sense if a shared library is tried.
Fixes "cond jump dep on uninit var" / cling test failure.


git-svn-id: http://root.cern.ch/svn/root/trunk@47345 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 13:39:09 +00:00
Axel Naumann
0f6a4cc921 Doxygen is unhappy about the hash.
git-svn-id: http://root.cern.ch/svn/root/trunk@47344 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 13:27:49 +00:00
Axel Naumann
5491fc88b6 Use the full path name to the shared library when registering it, not just "libGPad".
git-svn-id: http://root.cern.ch/svn/root/trunk@47342 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 11:30:31 +00:00
Vassil Vassilev
20180ac047 Temporarily!? publish the parser.
git-svn-id: http://root.cern.ch/svn/root/trunk@47340 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 23:51:52 +00:00
Axel Naumann
28dc13c51e Don't try to #include a file for which we know it's a dynamic library (that just failed to load) or a bitcode file.
Fixes bug #98798.
Print error message from loader ("cling::Interpreter::tryLinker(): .../libFoo.so: undefined symbol: bar") on dlopen failure.


git-svn-id: http://root.cern.ch/svn/root/trunk@47339 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 21:36:41 +00:00
Axel Naumann
7d5ed9e511 Define result of ExecutionContext::executeFunction().
Return it all the way through Interpreter.
Fixes bug #98837.


git-svn-id: http://root.cern.ch/svn/root/trunk@47337 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 20:55:43 +00:00
Paul Russo
f8b1205d19 Use the DestroyTemplateIdAnnotationsRAIIObj to cleanup
template ids after a parse.


git-svn-id: http://root.cern.ch/svn/root/trunk@47335 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 20:19:21 +00:00
Axel Naumann
a5ab389c14 These meta commands request a dump of the current file*s*: use plural.
git-svn-id: http://root.cern.ch/svn/root/trunk@47334 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 19:59:26 +00:00
Axel Naumann
226b360b15 Rename LoadLibResult constants to start with 'k'.
Enable kLoadLibExists case in TCintWithCling.

Collect statistics about loaded files.
Give access to that through .file; rename SourceManager dump to fileEx.

Documentation.

(Sorry, should have been three patches.)


git-svn-id: http://root.cern.ch/svn/root/trunk@47330 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 18:23:11 +00:00
Axel Naumann
6379c2a21d Use the proper extention and you will be applied.
git-svn-id: http://root.cern.ch/svn/root/trunk@47328 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 18:11:08 +00:00
Axel Naumann
e8d7963b97 Split dumping and extraction of IncludePaths (aka HeaderSearchOpts).
Call it like this:
SmallVector<std::string, 100> inclPaths;
interp->GetIncludePaths(inclPaths, false, true);
to get the include paths prefixed with -I, but no system onclude paths.

Mark include paths supplied via AddIncludePath() as IsUserSupplied.


git-svn-id: http://root.cern.ch/svn/root/trunk@47325 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 17:07:44 +00:00
Axel Naumann
d5f237f819 Move "library load result" enum to the other enum.
Make tryLinker a member function now that it uses the collection of loaded libraries.
Implement "was alreday loaded" as possible loadLibrary() result.


git-svn-id: http://root.cern.ch/svn/root/trunk@47324 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 16:41:30 +00:00
Vassil Vassilev
3b037537f4 The test symbol provider should react on empty lookup result (Thus avoid the ambiguity coming from the extra call put in clang for autoloading).
git-svn-id: http://root.cern.ch/svn/root/trunk@47323 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 16:41:10 +00:00
Axel Naumann
956567cf9e Make DynamicLibrary sortable.
git-svn-id: http://root.cern.ch/svn/root/trunk@47322 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 16:39:23 +00:00
Axel Naumann
8616cc7bea Split loadFile() into two and we have a new interface loadLibrary()!
Prepare new result "library was alreday loaded" - will be implemented if we actually need it.


git-svn-id: http://root.cern.ch/svn/root/trunk@47319 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 14:50:59 +00:00
Vassil Vassilev
b7beb7fabe That part of the patch is in separate patch now.
git-svn-id: http://root.cern.ch/svn/root/trunk@47317 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 14:25:02 +00:00
Vassil Vassilev
e57bbc6e10 Patch allowing if the found decl is fwd declare it asks the autoloader to try to find full one.
git-svn-id: http://root.cern.ch/svn/root/trunk@47301 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 01:42:17 +00:00
Vassil Vassilev
c3c5d1e11a Use separate parser for our string-based lookup. This in general is safer because
we don't need pin-point precision while we recover the lookup parser from lookup.


git-svn-id: http://root.cern.ch/svn/root/trunk@47298 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 00:11:14 +00:00
Vassil Vassilev
8c3ce66b05 Patch allowing clang to interact with multiple parsers recursively.
git-svn-id: http://root.cern.ch/svn/root/trunk@47296 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 00:08:23 +00:00
Vassil Vassilev
d83f3a9bec Needed changes in clang to support *almost* autoloading.
git-svn-id: http://root.cern.ch/svn/root/trunk@47294 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-15 00:05:43 +00:00
Paul Russo
ecbd7d40af Sigh, fix revision v47289, it should have been
the type lowering fix, but instead it was the
template id cleanup fix.


git-svn-id: http://root.cern.ch/svn/root/trunk@47292 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-14 23:08:01 +00:00
Vassil Vassilev
29b9270e50 Remove unused code.
git-svn-id: http://root.cern.ch/svn/root/trunk@47291 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-14 22:07:42 +00:00
Vassil Vassilev
76975bf2da Improve cling's transaction model. For now a bit hackish because it doesn't
actually support proper nesting of transactions.
(begin|end)Transaction return the transaction began or ended, which simplifies
interaction in case of nested transactions (coming from the autoloading)

Implement new function which transforms the single-linked list into a vector of
transactions for debugging purposes only.


git-svn-id: http://root.cern.ch/svn/root/trunk@47290 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-14 22:06:58 +00:00
Paul Russo
418d601061 Change this to a diff of only interpreter/llvm/src
to make EC happy.


git-svn-id: http://root.cern.ch/svn/root/trunk@47289 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-14 21:39:10 +00:00
Paul Russo
afe62b76cb Use CodeGen to lower an AST type to a LLVM type.
git-svn-id: http://root.cern.ch/svn/root/trunk@47285 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-14 21:23:31 +00:00