Commit Graph

56 Commits

Author SHA1 Message Date
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
Vassil Vassilev
f5250400d4 Remove the junk I accidentally committed. 2014-06-05 17:38:59 +02:00
manasij7479
024b16df11 Init TagsExtension Module, for extending cling to provide interactive hints
AutoloadCallback: Implementing InterpreterCallbacks to attach the module to cling
   The main focus is on overriding LookupObject so that the information about
   lookup failures are obtained from clang.
   The type of the name is not taken into consideration for now.

TagManager: To manage and lookup information from various sorts of tag files.
   Currently a TagManager object is owned by the callback system.
   This may change in future.

Wrapper: As a base class for handling particular types of tagfiles.
   The TagManager maintains a container of Wrappers.

CtagsFileWrapper: Implementing a wrapper for ctags.
   This class is responsible for generating a tagfile from a given path or list of files.
   It also performs lookups in the file generated by it.

And a few simple file system utils to complement llvm::sys::fs and path utilities
2014-06-04 09:20:14 +02:00
Axel Naumann
39ed28c03e Void has no address. 2014-05-26 17:37:57 +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
9b4ea193c0 If cling::Value is provided turn result evaluation on. 2014-04-14 09:09:01 +02:00
Axel Naumann
628618f2b9 Add test for copy ctor and dtor in Value for array-of-structs. 2014-04-11 09:00:01 +02:00
Vassil Vassilev
d1a416ddc0 When variadic return stmt doesn't have a return value, invalidate the calculation of the last expr for evaluation.
In the same cases we still need to synthesize the setValueNoAlloc, to initialize
the cling::Value to void.
2014-04-04 09:42:07 +02:00
Vassil Vassilev
c868ddfd49 In cases of cling::Value reuse we need to update its settings even if we evaluated void expression. 2014-04-02 16:56:58 +02:00
Axel Naumann
d00d9e8d54 Simplify; adapt to new Value. 2014-04-01 18:31:58 +02:00
Axel Naumann
574b7751f9 Test the behavior of the ValueExtractionSythesizer for objects.
Still missing: arrays incl arrays of objects.
2014-02-26 09:22:05 +01:00
Axel Naumann
efa8f37cd4 long double has "L" suffix. 2014-02-19 15:34:56 +01:00
Axel Naumann
6b3e713217 Test evaluation of long double. 2014-02-19 14:55:00 +01:00
Vassil Vassilev
e92088a41e If RHS is dependent - skip value extraction. Add a testcase for auto vars. 2014-02-19 14:22:58 +01:00
Vassil Vassilev
9749af417c The test should be run on 32 bit finally. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
460b8b43b1 We have more accurate results so adjust the test. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
980a1813cf typo. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
c963d9f520 Add var returns test case. 2014-02-18 17:22:58 +01:00
Axel Naumann
4f07ffa888 Refer to license in C files. 2014-01-07 12:02:58 +01:00
Axel Naumann
d240bd5de8 Refer to license in test and demo files. 2014-01-07 12:02:58 +01:00
Axel Naumann
47475c9934 Do not run the test at all on 32bit: it might or might not fail. 2013-12-17 15:29:49 +01:00
Axel Naumann
51f03371e1 Aggregate returns do not work on 32bit; see ROOT-5860. 2013-12-17 13:54:53 +01:00
Axel Naumann
020af968f0 Resolve Elab and TemplSpecTypes; use short name for dtor; test (ROOT-5839). 2013-12-12 21:46:51 +01:00
Axel Naumann
b0fe13d878 Test lifetime handling of StoredValue. 2013-12-11 12:14:52 +01:00
Axel Naumann
490f9084d3 Add test for Interpreter::compileFunction(). 2013-12-09 16:35:01 +01:00
Vassil Vassilev
26b0a13f81 Use the correct interface to check for emptiness. 2013-11-25 13:56:02 +01:00
Vassil Vassilev
64b1a77356 Fix the case when the decl doesn't need mangling, adapt the test to the new impl. 2013-10-29 20:19:23 +01:00
Vassil Vassilev
26eec6ab21 Now expected errors are printed out and filecheck cannot skip them. This is actually an improvement in newest llvm. In that case we don't need to run the test twice. 2013-10-14 09:11:38 +02:00
Vassil Vassilev
ffa77e6521 We cannot forward declare a function inside a function. 2013-10-14 09:11:38 +02:00
Vassil Vassilev
069a9d76c1 Remove unnecessary files that used to 'steer' the testsuite. 2013-09-27 14:33:05 +02:00
Vassil Vassilev
342918a4b9 Adapt to _Bool -> bool Use reg expr, because when building cling standalone we should still get _Bool. 2013-09-05 19:08:56 +02:00
Philippe Canal
f13c81470a We must have a function implementation to take its address 2013-08-31 20:49:07 +02:00
Philippe Canal
fc90db23ba In ReturnSynthesizer add better support for RecordType.
When we dectect that the last expression is a record type and is not
a temporary, we now return it by reference, hence avoiding an unnecessary
and sometimes impossible (cout) copy.   If it is a temporary we still
return a 'copy'.
2013-08-31 20:49:07 +02:00
Vassil Vassilev
8a6adff938 Make sure that the value is valid.a 2013-08-07 17:58:57 +02:00
Vassil Vassilev
96dbd7d963 Remove the expected error. We don't expect error there. The declared function has an address, which could be evaluated. 2013-08-07 17:58:57 +02:00
Vassil Vassilev
6604b6b763 Some transactions don't have a wrapper. 2013-06-25 09:30:32 +02:00
Vassil Vassilev
78ea68614a Fix syntax errors in the test.
I DO NOT STILL UNDERSTAND HOW THAT WAS HIDDEN BY CLING's TESTSUITE. We should
investigate seriously these issues.
2013-06-25 09:30:32 +02:00
Axel Naumann
56e2be3e6f Add library path.
git-svn-id: http://root.cern.ch/svn/root/trunk@49350 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-25 16:22:23 +00:00
Vassil Vassilev
fc0f602a9e Add more checks.
git-svn-id: http://root.cern.ch/svn/root/trunk@49319 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 15:01:35 +00:00
Vassil Vassilev
4a809957be Add test.
git-svn-id: http://root.cern.ch/svn/root/trunk@49316 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 13:12:08 +00:00
Vassil Vassilev
8040f69fc3 Fix the test. In that particular case in ReturnSynthesizer we check whether the
type is trivially copiable and cling::StoredValueRef is not.
We could check for a copy ctor (which is defined in that type), however, that is
not important at the moment. We can readd that logic on use-case.


git-svn-id: http://root.cern.ch/svn/root/trunk@47825 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 16:10:48 +00:00
Axel Naumann
2f0d47e0b7 Teach the ValuePrinter to print arrays.
Accept that Value's type is not the last Expr's type (e.g. const char[5]) but whatever the wrapper returns, (e.g. const char*).
Print StoredValueRefs recursively.
Add mechanism to suppress newlines (improves readability for nested calls)


git-svn-id: http://root.cern.ch/svn/root/trunk@47169 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 16:05:30 +00:00
Axel Naumann
3b59fceed9 Test r47166:
return 12;
as alterative to
12;


git-svn-id: http://root.cern.ch/svn/root/trunk@47168 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 14:06:03 +00:00
Vassil Vassilev
d70f4b6173 Fix broken by construction test.
git-svn-id: http://root.cern.ch/svn/root/trunk@46858 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-27 21:42:00 +00:00
Vassil Vassilev
4fd8ccc00d Rollback the transaction if there is an error occurred in one of the transformers.
git-svn-id: http://root.cern.ch/svn/root/trunk@46826 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 12:56:49 +00:00
Vassil Vassilev
d132d3d5ba evaluate now builds DeclRefExpr if there is DeclStmt.
Don't run the wrapper function when the transaction was rolled back.


git-svn-id: http://root.cern.ch/svn/root/trunk@46674 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 12:23:34 +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
f48a4881cd Add super efficient execute function. It doesn't do any fancy things with the
declarations - it just compiles and runs given expression or statement.


git-svn-id: http://root.cern.ch/svn/root/trunk@46636 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 11:56:20 +00:00
Vassil Vassilev
ff1861cfc2 Lit runs cling with --nologo.
git-svn-id: http://root.cern.ch/svn/root/trunk@46635 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 11:55:04 +00:00
Axel Naumann
a4ec8a554f Check for variables injected throug process being available on the prompt.
Check that redecl causes an error -- only the whole verify thing doesn't actually verify!
Also, the initializer should end up in the Value returned by evaluate; it's not!


git-svn-id: http://root.cern.ch/svn/root/trunk@46626 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 21:34:59 +00:00