Commit Graph

2066 Commits

Author SHA1 Message Date
Vassil Vassilev
6fd2a83a5c Revert previous change which broke cling's testsuite.
The issue that was addressing the previous commit will be fixed with the upcoming
changes anyway.


git-svn-id: http://root.cern.ch/svn/root/trunk@46345 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-05 14:03:29 +00:00
Vassil Vassilev
2fbeb6ecd4 The callback goes first.
git-svn-id: http://root.cern.ch/svn/root/trunk@46342 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-05 13:19:18 +00:00
Axel Naumann
0a9ed8027c Remove cling::Value-compatible overloads.
Use "m_" as member prefix.
Remove adopt() - not needed.
Remove hasValue() - it's meaningless (use isValid() to check validity of value).


git-svn-id: http://root.cern.ch/svn/root/trunk@46341 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-05 13:10:28 +00:00
Axel Naumann
abdd03925f update cmake config file.
git-svn-id: http://root.cern.ch/svn/root/trunk@46338 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-05 13:01:15 +00:00
Axel Naumann
bc18a88f10 Essential part of r46334. Log was:
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.


git-svn-id: http://root.cern.ch/svn/root/trunk@46335 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-05 12:18:14 +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
Vassil Vassilev
5e4f599000 Typo.
git-svn-id: http://root.cern.ch/svn/root/trunk@46331 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-05 10:32:03 +00:00
Vassil Vassilev
f8d42d206f Add sensible constructor.
git-svn-id: http://root.cern.ch/svn/root/trunk@46319 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-04 16:03:05 +00:00
Vassil Vassilev
a7261215a3 Add multiplex external sema source, which is a list of sema sources. When it is
used it dispatches the events to every element of the list of sources.

This is used because we want to have ASTDeclReader and our custom external source
catching LookupUnqualified callbacks, happening on failed lookup.


git-svn-id: http://root.cern.ch/svn/root/trunk@46317 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-04 15:47:10 +00:00
Vassil Vassilev
a255ebf4de Clarify ownership.
git-svn-id: http://root.cern.ch/svn/root/trunk@46316 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-04 15:44:50 +00:00
Vassil Vassilev
238b375d09 Don't enable/disable incremental processing every time we parse. Just set it once and forever.
git-svn-id: http://root.cern.ch/svn/root/trunk@46315 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-04 13:09:52 +00:00
Axel Naumann
0717f653ff One more const-correctness fix
git-svn-id: http://root.cern.ch/svn/root/trunk@46307 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-04 06:53:23 +00:00
Axel Naumann
f3758f5f2a Improve const-correctness in casts.
git-svn-id: http://root.cern.ch/svn/root/trunk@46294 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-03 15:23:04 +00:00
Vassil Vassilev
b95f52a9f2 remove the inclusion of CompilerInstance
git-svn-id: http://root.cern.ch/svn/root/trunk@46289 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-03 12:57:48 +00:00
Vassil Vassilev
32f4bd161b Add non-const getter.
git-svn-id: http://root.cern.ch/svn/root/trunk@46288 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-03 12:57:09 +00:00
Vassil Vassilev
a41c19237c * Remove the craftwork from dealing with setting callbacks.
* Simplify the impelentation of DynIDHandler.
* Create a shortcut for getting the semantic analysis object.


git-svn-id: http://root.cern.ch/svn/root/trunk@46287 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-03 12:40:41 +00:00
Axel Naumann
6a493b079f Already merged into cling.
git-svn-id: http://root.cern.ch/svn/root/trunk@46282 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-03 10:13:45 +00:00
Axel Naumann
9c865d8553 Update llvm / clang to r165095.
Update cling to follow interface changes; make note of it in cling/LastKnownGoodLLVMSVNRevision.txt.

Remove all (!) patches from ROOT's version of clang; they are all integrated into clang mainline.
ROOT now starts up with modules without errors; doing almost anything hits
root.exe: /home/axel/build/root/llvmvendor/roottrunk/interpreter/llvm/inst/include/clang/AST/RecordLayout.h:199: clang::CharUnits clang::ASTRecordLayout::getBaseClassOffset(const clang::CXXRecordDecl*) const: Assertion `CXXInfo->BaseOffsets.count(Base) && "Did not find base!"' failed.
or a "corrupt" vtable due to base class definitions being replaced by later PCMs; to be worked-around soon.


git-svn-id: http://root.cern.ch/svn/root/trunk@46280 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-03 09:45:56 +00:00
Vassil Vassilev
0ada6afba2 Silence doxygen warnings
git-svn-id: http://root.cern.ch/svn/root/trunk@46279 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-03 09:21:57 +00:00
Vassil Vassilev
397efb6340 Include the transaction where needed (caused by the forward declares in prev commit.)
git-svn-id: http://root.cern.ch/svn/root/trunk@46265 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-02 10:34:22 +00:00
Vassil Vassilev
e087402f78 * Implement interpreter callbacks, which the Interpreter owns.
* Implement new callback functions - on transaction committed and transaction unloaded.
* Publish the Transaction class so that it can be visible by TCintWithCling.
* Publish the CompilationOptions needed by Transaction.
* Fix the references of Transaction and CompilationOptions.
* Forward declare where possible.
* Add missing keywords.
* Improve include style.


git-svn-id: http://root.cern.ch/svn/root/trunk@46264 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-02 10:30:25 +00:00
Vassil Vassilev
3a2e68400b PrintingPolicy is struct not a class.
git-svn-id: http://root.cern.ch/svn/root/trunk@46261 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-01 14:22:41 +00:00
Vassil Vassilev
68b6851405 Add pretty printing routines, making the class gdb-friendly.
git-svn-id: http://root.cern.ch/svn/root/trunk@46258 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-01 11:47:27 +00:00
Axel Naumann
9e83d653a9 In clang's trunk, asking for the Type of a TemplateArgument is forbidden if it's not a Type.
Indentation.


git-svn-id: http://root.cern.ch/svn/root/trunk@46252 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-28 12:28:14 +00:00
Axel Naumann
9e01fa3de8 Clarify fall-through
git-svn-id: http://root.cern.ch/svn/root/trunk@46240 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-28 06:48:09 +00:00
Vassil Vassilev
bdea443b1b Another try to produce patch that doesn't try to patch itself :)
git-svn-id: http://root.cern.ch/svn/root/trunk@46231 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 14:37:05 +00:00
Vassil Vassilev
d0ff2257f6 Adapt the testsuite to the newest changes in the llvm's pretty printing.
git-svn-id: http://root.cern.ch/svn/root/trunk@46228 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 13:55:09 +00:00
Vassil Vassilev
147ef25264 Another try to send that patch in history!
git-svn-id: http://root.cern.ch/svn/root/trunk@46220 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 12:20:30 +00:00
Vassil Vassilev
f39c6f4642 To r46217
git-svn-id: http://root.cern.ch/svn/root/trunk@46218 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 11:43:33 +00:00
Vassil Vassilev
a688499804 Revert unintentionally committed files.
git-svn-id: http://root.cern.ch/svn/root/trunk@46217 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 11:41:53 +00:00
Vassil Vassilev
e899b1cf93 Remove the patch causing llvm test suite to fail. If we need it - it is in the
svn history anyway.


git-svn-id: http://root.cern.ch/svn/root/trunk@46216 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 11:39:14 +00:00
Vassil Vassilev
be94fde062 Add special folder in patches - ToT (Top of Tree) for LLVM. There will go the
patches, which make cling to work with llvm's trunk, before our vendor drop gets
in sync.
  EC picks the patches from there only for our nightlies.


git-svn-id: http://root.cern.ch/svn/root/trunk@46211 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 08:55:41 +00:00
Vassil Vassilev
9cc45252ae Use more meaningful names - irrelevant for the users, priceless for developers.
git-svn-id: http://root.cern.ch/svn/root/trunk@46210 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 08:51:01 +00:00
Philippe Canal
00f0d19636 Add many more tests ..
git-svn-id: http://root.cern.ch/svn/root/trunk@46209 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 08:49:18 +00:00
Vassil Vassilev
fac0637329 Remove unused class.
git-svn-id: http://root.cern.ch/svn/root/trunk@46199 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-26 13:30:53 +00:00
Vassil Vassilev
d057925245 Improve documentation.
git-svn-id: http://root.cern.ch/svn/root/trunk@46198 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-26 13:27:48 +00:00
Philippe Canal
c22cd67c6d Fix the handling of B<const Double32_t, const int>
git-svn-id: http://root.cern.ch/svn/root/trunk@46192 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-26 08:01:21 +00:00
Philippe Canal
22952b8f72 Improve the handling of qualified named (i.e. elaborated type) especially when they also have
qualifiers (const std::string) in template arguments.
Fix the handling of default template argument that are not a type.

No longer drop any default argument except for STL collection (as needed by ROOT I/O).

This fixes support of (for example):
#pragma link C++ class std::pair<const std::string,int>+;
#pragma link C++ class ROOT::TArrayProxy<ROOT::TArrayType<double> >+;
 (which is ROOT::TArrayProxy<ROOT::TArrayType<double,0> >)


git-svn-id: http://root.cern.ch/svn/root/trunk@46188 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-25 19:35:24 +00:00
Axel Naumann
afd46ea54a Rename getMangledName() into mangleName().
git-svn-id: http://root.cern.ch/svn/root/trunk@46147 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-24 15:20:19 +00:00
Axel Naumann
fe430cd40d Add tests for Interpreter::getAddressOfGlobal().
Fix it for the JIT case.


git-svn-id: http://root.cern.ch/svn/root/trunk@46146 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-24 15:16:36 +00:00
Axel Naumann
a23e654580 Also suppress warning about unused comparisons.
git-svn-id: http://root.cern.ch/svn/root/trunk@46142 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-24 13:53:23 +00:00
Axel Naumann
a6c25495ce Spelling
git-svn-id: http://root.cern.ch/svn/root/trunk@46141 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-24 13:52:52 +00:00
Axel Naumann
adcf034af3 Enable Modules by default for cling.
git-svn-id: http://root.cern.ch/svn/root/trunk@46140 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-24 13:52:26 +00:00
Axel Naumann
621c0173c2 Cache MangleContext as a private member of the interpreter, so we don't have to re-create it all the time.
Implement JITed version of ExecutionContext::getAddressOfGlobal(), which now also needs a Module.


git-svn-id: http://root.cern.ch/svn/root/trunk@46139 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-24 12:11:46 +00:00
Axel Naumann
6323e0e50c Implement Interpreter::getAddressOfGlobal(const clang::NamedDecl*) (test comes "in a minute")
Factor out mangling into Interpreter::getMangledName().
Spelling.


git-svn-id: http://root.cern.ch/svn/root/trunk@46136 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-24 09:57:43 +00:00
Philippe Canal
f191b6097c fix typo
git-svn-id: http://root.cern.ch/svn/root/trunk@46132 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-22 21:56:36 +00:00
Philippe Canal
fcf8c7fa66 In Transform::GetPartiallyDesugaredType also handle the case where
we are given a qualified typedef (the first node is 'Elaborated' rather
than Typedef), for example ROOT::Math::TDataPoint1D.

Also properly handle the case when the scope of the typedef's underlying
type and the scope of the typedef are different.  In the case their are
the same, keeping the version given as input (after 'normalizing).

Prevent the desugaring of _any_ typedef declared within the std namespace
(for now hardcoded in AST.cpp) to avoid exposing to ROOT implementation
details (this is a kind of replacement for CINT's customized STL header)


git-svn-id: http://root.cern.ch/svn/root/trunk@46131 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-22 21:30:24 +00:00
Axel Naumann
842a4520c9 Fix initialization order for "new" binutils that use ctors-in-init-array, by passing -Wl,--no-ctors-in-init-array.
See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770>.
This enforces llvm (at the end of the link line) globals to be initialized before ROOT's, pretty healthy for new TInterpreter in gROOT's initializer.


git-svn-id: http://root.cern.ch/svn/root/trunk@46055 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-19 14:12:07 +00:00
Philippe Canal
d754a4e262 Do not use standard desugaring if we need to have the full qualification
git-svn-id: http://root.cern.ch/svn/root/trunk@46047 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-19 12:39:06 +00:00
Axel Naumann
fff6b6404c Remove optimization flags coming from llvm build
git-svn-id: http://root.cern.ch/svn/root/trunk@46039 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-19 09:50:56 +00:00