31 Commits

Author SHA1 Message Date
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