Commit Graph

324 Commits

Author SHA1 Message Date
Vassil Vassilev
21c8d3c81c Add support for .undo [Number], extend the meaning of the constant token, document. 2013-10-29 20:19:26 +01:00
Vassil Vassilev
a4c14b87e5 Rename interface with more meaningful name. 2013-10-29 20:19:25 +01:00
Bertrand Bellenot
98976770ba call string::find() only once (thanks Axel) 2013-10-28 14:51:56 +01:00
Bertrand Bellenot
2f7f48cb99 Fix Jira issue #ROOT-4939
Replace "/./" in path with single '/' it is more readable and solve the issue of gInterpreter->IsLoaded being too sensitive to the path's spelling
2013-10-28 12:28:58 +01:00
Axel Naumann
daf8c8281b llvm head interface changes. 2013-09-26 17:54:19 +02:00
Axel Naumann
0552bae468 Rmove invalud / unused fwd decl of Path. 2013-09-26 17:54:18 +02:00
Axel Naumann
8542f73128 Fix include. 2013-09-26 17:54:18 +02:00
Axel Naumann
1c8d0e6378 File magic moved / changed. 2013-09-26 17:54:18 +02:00
Axel Naumann
dfb8941422 Use StringRef instead of Path. 2013-09-26 17:54:18 +02:00
Axel Naumann
8f9e6ebe81 Use StringRef instead of Path. 2013-09-26 17:54:17 +02:00
Axel Naumann
0c59578ed3 Header renamed. 2013-09-26 17:54:17 +02:00
Axel Naumann
5c958d7df9 Register result of .L 2013-09-11 15:19:56 +02:00
Jerome Beclin
afcd8a7cca Commit of storeState/compareState that now print lookup table and included files
Implementation of .files moved in the Interpreter.cpp

storeState now calls three functions: dumpAST(), dumpLookup(), printIncludedFiles().
compareState now calls three functions: compareAST(), compareLookup(), compareIncludedFiles().
It's working for the included files and the AST, and it needs a new patch for
being able to dump the lookup tables (we cannot use dumpLookups() for the moment).
2013-09-07 10:41:01 +02:00
Philippe Canal
26a63ae38f Add missing transaction (fix .class) 2013-09-04 18:32:55 +02:00
Bertrand Bellenot
3575eb44f1 Check if fileName *starts* with /usr/ 2013-08-24 16:00:56 +02:00
Bertrand Bellenot
9daf1d7571 List loaded header and source files with the .files command
List the loaded source files when typing .files on the command line, including the system headers, but whithout the ones in /usr/..../bit/
2013-08-23 16:49:54 +02:00
Jerome Beclin
ead0f8d091 Implement cling (clang) internal state verification.
There are cases where cling needs to 'rollback' its state to a previous one.
Examples for that are cling's error recovery and code unloading. This can become
easily tricky to implement. One step reducing the complexity is the verification
of the 'interesting' data structures.

Implement .storeState and .compareState commands, which dump the internal compiler
data structures like AST (implemented), included files (in progress) and lookup
tables (unimplemented yet). The information is dumped into a file and then that
file is diff-ed to the one taken with .compareState. If they were identical all
files are deleted otherwise a .diff file with the differences remains for debug.
2013-08-21 14:29:57 +02:00
Timur Pocheptsov
b23e62fe11 .O implemented. 2013-08-13 11:13:53 +02:00
Vassil Vassilev
b202f00c12 We now keep track of the deserialized declarations in the transaction, because ROOT needs the callbacks to be fired on deserialized bunch of declarations.
Track down (almost) all places that might trigger deserialization of declarations
and wrap it with cling::PushTransactionRAII. I could solve it much more elegantly
by putting that RAII in the callback of the ExternalASTSource, but I wanted to be
verbose and denote all the places that trigger deserializations in ROOT. This
will help us in future optimize this code, because we want to deserialize as
rare as possible.

This should make roottest a bit happier.
2013-08-04 18:44:55 +02:00
Philippe Canal
80d57d9c93 80 columns. 2013-07-18 10:36:45 +02:00
Axel Naumann
7849f4e7f1 Fix assert 2013-07-17 09:03:49 +02:00
Philippe Canal
871f2df4a1 Improve the input line validator handling of quoted strings.
For example those are now properly accepted (because the content
of the string is now ignored):

TFile *_file0 = TFile::Open("http://root.cern.ch/files/atlasFlushed.root");
n.SetName(" ( ");
2013-07-17 00:04:55 +02:00
Vassil Vassilev
87a4b6bd63 From Baozeng: Add .printIR meta command, printing the llvm::Module. 2013-06-17 21:00:58 +02:00
Axel Naumann
1372426925 Add param doc; 80cols. 2013-06-11 13:26:50 +02:00
Axel Naumann
11e71f5c76 Make result evaluation optional again. 2013-06-10 17:12:50 +02:00
Axel Naumann
80790083ff Remove unused var. 2013-06-07 16:25:22 +02:00
Axel Naumann
8d462963d6 Return whether this is a .x; not wether the .x succeeded. 2013-06-07 15:19:51 +02:00
Axel Naumann
0c1c22f002 Return action result and Value from all interfaces. Force callers to rpovide them, to make them handle errors etc. 2013-06-07 15:19:51 +02:00
Axel Naumann
fb8620de4c Error out of the input file is incomplete (ROOT-4823) 2013-05-17 17:21:55 +02:00
Axel Naumann
70695fe2be Update to clang/llvm r179269 (llvm vendor branch r49215):
Parser::Scope versus Sema::DeclContext are now checked for cross-vailidity.
Emit the TU-transaction explicitly instead of relying on a first transaction.
The typename extraction now takes a stream instead of a string to write to.
The llvm::Linker has much reduced functionality; use llvm::sys::Path instead to find dynamic libraries.


git-svn-id: http://root.cern.ch/svn/root/trunk@49325 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 16:28:08 +00:00
Vassil Vassilev
c44b59bab7 Follow the lowStartingCaps.
git-svn-id: http://root.cern.ch/svn/root/trunk@48764 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-28 10:55:45 +00:00
Axel Naumann
b364112d1d Don't expose SmallVector (which needs DataTypes.h).
Use vector instead.


git-svn-id: http://root.cern.ch/svn/root/trunk@48691 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-25 15:54:36 +00:00
Philippe Canal
84e8217b0c Add forward declared class to the list of classes and mark them with 'fwd'
git-svn-id: http://root.cern.ch/svn/root/trunk@48455 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-01 20:58:10 +00:00
Philippe Canal
9b52eb38da Extent .class to print the class template instantiation (and specialization) which are often (always?) stored in the class template decl
git-svn-id: http://root.cern.ch/svn/root/trunk@48436 27541ba8-7e3a-0410-8455-c3a389f83636
2013-01-29 22:39:00 +00:00
Vassil Vassilev
1ae610b211 Fix savannah #99234.
The issue we experienced is that we couldn't pipe the output in the terminal.
The reason is that we were using llvm::outs() which closes explicitly the file
descriptor (thanks Axel for the help debugging).
We introduce our custom stream, which keeps the file descriptor open so that
we can use it in pipes. For debugging purposes, however we use/should use llvm::errs()

The lesson learned:
DONT USE LLVM::OUTS() ANYMORE!


git-svn-id: http://root.cern.ch/svn/root/trunk@48316 27541ba8-7e3a-0410-8455-c3a389f83636
2013-01-17 15:27:14 +00:00
Vassil Vassilev
d98bece0ed Implement .? (fixes savannah #99730)
git-svn-id: http://root.cern.ch/svn/root/trunk@48300 27541ba8-7e3a-0410-8455-c3a389f83636
2013-01-15 10:11:52 +00:00
Axel Naumann
e89020d590 Also print headers from modules - once we update clang as it doesn't exist yet in our revision...
git-svn-id: http://root.cern.ch/svn/root/trunk@48228 27541ba8-7e3a-0410-8455-c3a389f83636
2013-01-08 15:34:40 +00:00
Vassil Vassilev
833d4de40b Another try to fix the warning unused return result of system.
git-svn-id: http://root.cern.ch/svn/root/trunk@48119 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-19 09:56:37 +00:00
Axel Naumann
adaba0a9b4 Silence "result unused" warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@48010 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-13 13:29:34 +00:00
Philippe Canal
c5bbf1c9a1 The input passed to MetaProcessor's InputValidator::validate can have multiple line (for example being a script\!) and so we need to skip the comment only until the end of the end of the line
git-svn-id: http://root.cern.ch/svn/root/trunk@47993 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-13 04:38:00 +00:00
Timur Pocheptsov
f4b4c78748 .! is back, fix .typedef to process sequence of tokens, containing white-space characters.
git-svn-id: http://root.cern.ch/svn/root/trunk@47962 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-11 09:19:50 +00:00
Philippe Canal
5e19abebbb humm .. the message was not so much the problem but rather the 'unbalanced' fixing. Yet another minor patch around the current unnamed script detection to make it go a bit further ...
git-svn-id: http://root.cern.ch/svn/root/trunk@47938 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-09 10:07:41 +00:00
Philippe Canal
6a56db4741 Disable error/warning message that is often wrongly issued (whenever an unamed macro has text after the closing })
git-svn-id: http://root.cern.ch/svn/root/trunk@47936 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-09 06:44:59 +00:00
Vassil Vassilev
20f9431b19 Use the stored value in MP;
Invoke process instead of it's shortcuts. Should fix savannah #98725


git-svn-id: http://root.cern.ch/svn/root/trunk@47916 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-07 13:04:19 +00:00
Vassil Vassilev
dc5e70e317 Store the last value that was returned from execution.
git-svn-id: http://root.cern.ch/svn/root/trunk@47915 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-07 13:02:06 +00:00
Philippe Canal
b5ccfdfe18 Fully desugar the typedef underlying type
git-svn-id: http://root.cern.ch/svn/root/trunk@47895 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 17:08:19 +00:00
Vassil Vassilev
9881b59a06 Get rid of meta processor options and various improvements.
git-svn-id: http://root.cern.ch/svn/root/trunk@47889 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 11:47:24 +00:00
Vassil Vassilev
ba6e233003 Unused var.
git-svn-id: http://root.cern.ch/svn/root/trunk@47886 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 10:54:52 +00:00
Vassil Vassilev
ad0cfca9a6 Get rid of another use of meta processor option.
git-svn-id: http://root.cern.ch/svn/root/trunk@47885 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 10:52:01 +00:00
Vassil Vassilev
5fe903da79 Don't rely on MP options we have support for rawInput in the interpreter through cling::Interpreter::process
git-svn-id: http://root.cern.ch/svn/root/trunk@47883 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 10:40:20 +00:00
Vassil Vassilev
9b237493fe MetaProcessor Options must go away. This is one step towards it.
git-svn-id: http://root.cern.ch/svn/root/trunk@47879 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 10:18:35 +00:00
Vassil Vassilev
7717eb911f Cleanup.
git-svn-id: http://root.cern.ch/svn/root/trunk@47878 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 10:15:38 +00:00
Vassil Vassilev
1f8fc62305 Remove unused code
git-svn-id: http://root.cern.ch/svn/root/trunk@47877 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 10:11:25 +00:00
Philippe Canal
8b517ca71f We need to the typedef type printed fully qualified which typdefDecl::print does not seem to be able to do. Add a couple of missing header lines
git-svn-id: http://root.cern.ch/svn/root/trunk@47871 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 06:57:39 +00:00
Philippe Canal
6bc1db9883 Add error message in case the decl is not a class or does not have definition
git-svn-id: http://root.cern.ch/svn/root/trunk@47870 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 05:15:07 +00:00
Timur Pocheptsov
6a649ea5f4 'Class-name' can contain spaces, like in 'std::vector<int, std::allocator<int> >'
git-svn-id: http://root.cern.ch/svn/root/trunk@47862 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-05 16:36:42 +00:00
Timur Pocheptsov
964bde36f1 Print diagnostic, if class was not found.
git-svn-id: http://root.cern.ch/svn/root/trunk@47859 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-05 16:09:15 +00:00
Timur Pocheptsov
76e614c8ee Initial version of '.typedef' command.
git-svn-id: http://root.cern.ch/svn/root/trunk@47856 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-05 15:44:04 +00:00
Timur Pocheptsov
77e5b37f8c Oops, remove an assert.
git-svn-id: http://root.cern.ch/svn/root/trunk@47852 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-05 13:23:12 +00:00
Timur Pocheptsov
4bae258b78 Support for 'typedef' command.
git-svn-id: http://root.cern.ch/svn/root/trunk@47851 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-05 13:20:58 +00:00
Vassil Vassilev
1c073c84c6 Doxygen.
git-svn-id: http://root.cern.ch/svn/root/trunk@47841 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-05 09:46:28 +00:00
Axel Naumann
3f150a8d8b Fix fwd decl for windows.
git-svn-id: http://root.cern.ch/svn/root/trunk@47814 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 12:46:01 +00:00
Vassil Vassilev
68020403d7 Update cmake to compile the newly added files
git-svn-id: http://root.cern.ch/svn/root/trunk@47812 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 10:41:56 +00:00
Vassil Vassilev
183115df4f Remove redundant comment.
git-svn-id: http://root.cern.ch/svn/root/trunk@47810 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 09:45:17 +00:00
Axel Naumann
7fa822b411 Remove unused var.
Make const string static.


git-svn-id: http://root.cern.ch/svn/root/trunk@47809 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 09:37:11 +00:00
Axel Naumann
5ed01c266c Add interface to cancel input continuation.
git-svn-id: http://root.cern.ch/svn/root/trunk@47803 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 08:05:33 +00:00
Axel Naumann
643a9c3284 Spelling.
git-svn-id: http://root.cern.ch/svn/root/trunk@47802 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 08:05:11 +00:00
Vassil Vassilev
86243e4b95 Add support for exclamation point.
git-svn-id: http://root.cern.ch/svn/root/trunk@47792 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-03 16:42:06 +00:00
Vassil Vassilev
e5a6058db4 Add support for backslash
git-svn-id: http://root.cern.ch/svn/root/trunk@47791 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-03 16:37:47 +00:00
Vassil Vassilev
33e420bb73 Typo in comment.
git-svn-id: http://root.cern.ch/svn/root/trunk@47788 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-03 14:28:21 +00:00
Vassil Vassilev
8e84e50e2a Lex properly identifiers (Allow numbers to occur in idents.)
git-svn-id: http://root.cern.ch/svn/root/trunk@47783 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-03 08:34:39 +00:00
Vassil Vassilev
5ea5ea8351 Readd support for .g
git-svn-id: http://root.cern.ch/svn/root/trunk@47781 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-02 20:14:02 +00:00
Vassil Vassilev
fd499a33b3 Ugly typo.
git-svn-id: http://root.cern.ch/svn/root/trunk@47780 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-02 19:31:08 +00:00
Vassil Vassilev
953819f92d Remove redundant comment.
git-svn-id: http://root.cern.ch/svn/root/trunk@47777 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-02 19:05:24 +00:00
Vassil Vassilev
a530a63d15 Readd custom meta command support.
git-svn-id: http://root.cern.ch/svn/root/trunk@47776 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-02 19:01:02 +00:00
Vassil Vassilev
d89c749b1f .x is alias of .X
git-svn-id: http://root.cern.ch/svn/root/trunk@47764 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 16:48:33 +00:00
Vassil Vassilev
d2c7012d6e Documentation.
git-svn-id: http://root.cern.ch/svn/root/trunk@47763 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 14:30:31 +00:00
Vassil Vassilev
e6b1a83e6a Use small caps for method names.
git-svn-id: http://root.cern.ch/svn/root/trunk@47762 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 14:07:57 +00:00
Vassil Vassilev
a189526360 Cling/LLVM style Include order.
git-svn-id: http://root.cern.ch/svn/root/trunk@47761 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 14:04:29 +00:00
Vassil Vassilev
d5d88ab9df Timur.
git-svn-id: http://root.cern.ch/svn/root/trunk@47760 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 14:00:22 +00:00
Vassil Vassilev
7daf8ac1b6 Cling compatible style improvements.
git-svn-id: http://root.cern.ch/svn/root/trunk@47759 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 13:56:53 +00:00
Vassil Vassilev
bdf60ac8c4 Readd support for .class and .Class
git-svn-id: http://root.cern.ch/svn/root/trunk@47758 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 13:46:50 +00:00
Vassil Vassilev
485e1ecd69 Bring back the recent change. Reverse merging is not one of my strenghts. :)
git-svn-id: http://root.cern.ch/svn/root/trunk@47753 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 00:54:25 +00:00
Vassil Vassilev
60b330abb2 Revert r47746 (which means fully unrevert the r47739). We can run roottest and all seems good. Unbreaks the trunk.
git-svn-id: http://root.cern.ch/svn/root/trunk@47752 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 00:45:43 +00:00
Vassil Vassilev
dbe2c6d8dc Add support for .X. Ignore comments in LexAnyStringToken for now.
git-svn-id: http://root.cern.ch/svn/root/trunk@47751 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 00:40:04 +00:00
Philippe Canal
e719c8efdb Partially revert r47739 so that we have a functional meta processor
git-svn-id: http://root.cern.ch/svn/root/trunk@47746 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-30 23:09:26 +00:00
Vassil Vassilev
72539ff673 Implement lexer/parser/sema for the meta language, which we have to implement soon.
* It makes the life easier to add new grammar rules and keywords.
* Silences a lot of the test failures we had.
* Fixes the imbalanced ' or " properly.


git-svn-id: http://root.cern.ch/svn/root/trunk@47739 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-30 17:26:26 +00:00
Timur Pocheptsov
c49a19a255 Though I can not always follow 80-chars-in-a-line rule, I still can avoid too wide lines
(except the cases I want the code to be in one physical line).

Say hello to my Samsung VGA 14 inches and my glasses -7 :)


git-svn-id: http://root.cern.ch/svn/root/trunk@47718 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-29 20:40:53 +00:00
Timur Pocheptsov
c03019ab27 Remove undef hack and change inclusion quard.
git-svn-id: http://root.cern.ch/svn/root/trunk@47717 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-29 20:12:47 +00:00
Timur Pocheptsov
ba38abf955 Follow the code convention with * and & declarators.
git-svn-id: http://root.cern.ch/svn/root/trunk@47716 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-29 20:09:41 +00:00
Timur Pocheptsov
a187d773b9 Remove llvm:: qualified name where possible, relying on the name lookup.
git-svn-id: http://root.cern.ch/svn/root/trunk@47715 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-29 19:48:39 +00:00
Timur Pocheptsov
dc65a8f2c4 Remove explicit name qualification and replace it with "nice" using directive at the beginning of implementation file.
git-svn-id: http://root.cern.ch/svn/root/trunk@47714 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-29 19:42:43 +00:00
Timur Pocheptsov
46a3404e6f 2 spaces instead of 3 in indents.
git-svn-id: http://root.cern.ch/svn/root/trunk@47713 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-29 19:35:33 +00:00
Timur Pocheptsov
7af5326d79 Do not attempt to calculate the size for a partial template specialization class.
git-svn-id: http://root.cern.ch/svn/root/trunk@47687 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 19:50:50 +00:00
Timur Pocheptsov
208c024a5d 1. Remove <iostream>.
2. '_' can also be a part of identifier.


git-svn-id: http://root.cern.ch/svn/root/trunk@47686 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 19:37:36 +00:00
Timur Pocheptsov
d61e44e47d Clang dies in EmptySubobjectMap::ComputeEmptySubobjectSizes(), one of bases for some weird class is not of
RecordType.


git-svn-id: http://root.cern.ch/svn/root/trunk@47685 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 19:15:10 +00:00
Timur Pocheptsov
10b8039f2f Replace hand-made BaseName with llvm::sys::path::filename.
git-svn-id: http://root.cern.ch/svn/root/trunk@47679 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 17:13:31 +00:00
Timur Pocheptsov
4e1cc75fda Remove TCintDisplayClass from the core/meta, fix MetaProcessor.cpp (wrong include path)
git-svn-id: http://root.cern.ch/svn/root/trunk@47677 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 16:50:13 +00:00
Timur Pocheptsov
f474053b85 1. Remove all ROOT specific code from the TCintDisplayXXX and move this "display" into the MetaProcessor.
2. Mods in CommandLexer to support .! .g .class in a MetaProcessor.


git-svn-id: http://root.cern.ch/svn/root/trunk@47674 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 16:38:02 +00:00
Vassil Vassilev
27bfa0f1cc Silence another warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@47655 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 16:23:22 +00:00
Vassil Vassilev
b497a0b37a Silence a warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@47654 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 15:56:52 +00:00
Vassil Vassilev
b66d4750fd Handle properly ticks and quotes.
I know that the lexers are getting too many and soon I will merge both implementations
into one full-blown.
Reduces the test failures a lot.


git-svn-id: http://root.cern.ch/svn/root/trunk@47652 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 15:41:08 +00:00
Vassil Vassilev
1015181bd2 Insert an actual new line, which means new line for the lexer too...
git-svn-id: http://root.cern.ch/svn/root/trunk@47630 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-26 14:09:43 +00:00
Vassil Vassilev
cc112e3dc7 Remove unused include.
git-svn-id: http://root.cern.ch/svn/root/trunk@47618 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-24 22:31:41 +00:00
Vassil Vassilev
6ff2764fc1 Teach the input validator to handle imbalance of ' or ".
Add constness to the reference.
Improve style.


git-svn-id: http://root.cern.ch/svn/root/trunk@47587 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-22 17:58:59 +00:00
Axel Naumann
010b391174 Warning comparison (un)signed.
git-svn-id: http://root.cern.ch/svn/root/trunk@47526 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-21 10:51:41 +00:00
Axel Naumann
a68395dc86 Also set the name of the currently executing file for readInputFromFile.
Refuse to readInputFromFile if the file is binary, as determined by llvm::sys::IdentifyFileType or wild guessing based on the fraction of non-printables in the first 1k (max) bytes.
Prevents root -l libRooFit.so
Now that we identify the file we could even link the library in - but that's for later.


git-svn-id: http://root.cern.ch/svn/root/trunk@47500 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 20:21:29 +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
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
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
46eb845f6d * pass whole file content to process(); enables #ifdef
* ignore ';' after terminal '}'


git-svn-id: http://root.cern.ch/svn/root/trunk@47136 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-09 10:54:07 +00:00
Philippe Canal
bc63cc3bdd Correctly test for the result of loadFile
git-svn-id: http://root.cern.ch/svn/root/trunk@47084 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-06 22:42:02 +00:00
Axel Naumann
ee3b83e48a Implement unnamed macros:
* MetaProcessor::readInputFromFile passes the content to the Interpreter as if typed at the prompt
* they do not get passed to CINT in TCintWithCling


git-svn-id: http://root.cern.ch/svn/root/trunk@46898 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-30 13:40:25 +00:00
Axel Naumann
a62cc82f24 Pass CompilationResult through
* MetaProcessor
* loadFile
* TCintWithCling::ProcessLine().
Second part of fixing #98499.

Also fix a few dubious "return 0" instead of returnign the indent in MetaProcessor.


git-svn-id: http://root.cern.ch/svn/root/trunk@46873 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-29 14:23:53 +00:00
Philippe Canal
c926ac116c Add support for string arguments (allow spaces in them) for example: build.C("dummy18381.C"," " , "customConstructor.o customConstructorDict.o")
git-svn-id: http://root.cern.ch/svn/root/trunk@46847 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-27 01:09:08 +00:00
Vassil Vassilev
7f6039444b When we evaluate we *must* provide a value where the evaluated result to be stored
git-svn-id: http://root.cern.ch/svn/root/trunk@46642 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 12:24:04 +00:00
Vassil Vassilev
1c6759298b Fix resource leak cid=#46296
git-svn-id: http://root.cern.ch/svn/root/trunk@46540 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-14 15:37:38 +00:00
Vassil Vassilev
d444bf0c83 Fix memory leak (coverity #47844)
git-svn-id: http://root.cern.ch/svn/root/trunk@46532 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-14 14:26:10 +00:00
Axel Naumann
3ec1741cf9 Add cling::StoredValueRef: a ref-counted value with automatic storage management.
Update Interpreter to use that instead of cling::Value.
This fixes an issue where the called neded to guess the return type of the wrapper function, such that for instance Interpreter::Evaluate() has storage for the wrapper's aggregate SRet return value if needed.
Instead, the Interpreter now allocates the proper storage for return values, and hands out references to it.
StoredValueRef is tiny (8bytes on 64bit Linux); default allocation is cheap.

Update TCintWithCling and friends; don't pass the returnValue in if the caller does not need it.
TClingCallFunc: provide storage for fArgs.


git-svn-id: http://root.cern.ch/svn/root/trunk@46334 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-05 12:09:51 +00:00
Axel Naumann
8ec0986618 Fix uninitialized exit (thanks, GCC).
Mark test for PCM / redecl of templates as XFAIL until fixed.
Update last known good to the one used in ROOT.


git-svn-id: http://root.cern.ch/svn/root/trunk@45890 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-07 06:56:06 +00:00
Axel Naumann
286910cee0 Reapply Vassil's r45838 which got lost during the move of cint/cling to interpreter/
git-svn-id: http://root.cern.ch/svn/root/trunk@45868 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-05 15:27:17 +00:00
Axel Naumann
05ba8a3a07 Move cling from cint/ to interpreter/ (Will add a "we have moved" readme to cint/cling.)
git-svn-id: http://root.cern.ch/svn/root/trunk@45844 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-05 09:37:39 +00:00