Commit Graph

2066 Commits

Author SHA1 Message Date
Vassil Vassilev
b978876705 Flip the flag, because of the name change.
git-svn-id: http://root.cern.ch/svn/root/trunk@46810 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 14:10:41 +00:00
Vassil Vassilev
8c385cf901 Use better naming.
git-svn-id: http://root.cern.ch/svn/root/trunk@46809 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 14:07:19 +00:00
Vassil Vassilev
326c0b21b0 Give a chance to the eventual lazy function creators to do their job. (Thanks Philippe)
git-svn-id: http://root.cern.ch/svn/root/trunk@46804 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 12:58:50 +00:00
Vassil Vassilev
5d4af3ddc7 Add a way to disable the complaints of HandleMissing symbol, when it is ok for
the symbol to be missing.


git-svn-id: http://root.cern.ch/svn/root/trunk@46795 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 09:17:45 +00:00
Vassil Vassilev
f398425dbb Add note.
git-svn-id: http://root.cern.ch/svn/root/trunk@46791 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 08:33:40 +00:00
Philippe Canal
4215db4407 Always return the canonical decl of a function to ease comparison
git-svn-id: http://root.cern.ch/svn/root/trunk@46787 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-24 20:28:03 +00:00
Vassil Vassilev
09ca68c259 Don't dereference null ptr if the transaction has 0 decls
git-svn-id: http://root.cern.ch/svn/root/trunk@46753 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-24 07:34:53 +00:00
Vassil Vassilev
88bd362c63 Keep the const version only for now.
git-svn-id: http://root.cern.ch/svn/root/trunk@46742 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 13:03:08 +00:00
Vassil Vassilev
71ccaf68b7 Fix a typo, which will silence doxygen warnings.
git-svn-id: http://root.cern.ch/svn/root/trunk@46734 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 08:52:48 +00:00
Vassil Vassilev
10a8ff762d Protect in case no global variable is found.
git-svn-id: http://root.cern.ch/svn/root/trunk@46733 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 08:46:38 +00:00
Axel Naumann
835bb9fa1c Try to fix intermittent test failure (library not yet built)
git-svn-id: http://root.cern.ch/svn/root/trunk@46730 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 07:25:45 +00:00
Vassil Vassilev
314d9a362c The decls for a transactions should be collected using single interface.
git-svn-id: http://root.cern.ch/svn/root/trunk@46724 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-22 16:43:57 +00:00
Vassil Vassilev
50027e07fc std::vector::data() is not standartized and on windows it cause build failure.
GCC implements it but there is a comment saying:
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 464. Suggestion for new member functions in standard containers.
// data access
Use standartized alternative.


git-svn-id: http://root.cern.ch/svn/root/trunk@46710 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-22 12:35:32 +00:00
Axel Naumann
8e78058564 Revert r46665 until ROOT has an updated llvm == LastKnownGood is bumped.
git-svn-id: http://root.cern.ch/svn/root/trunk@46692 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 15:57:14 +00:00
Vassil Vassilev
cbd2ae5bac Keep just the head and the tail of the single-linked list.
git-svn-id: http://root.cern.ch/svn/root/trunk@46683 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 14:17:20 +00:00
Vassil Vassilev
acef61e88f Fix not only the address but the string too.
git-svn-id: http://root.cern.ch/svn/root/trunk@46681 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:49:34 +00:00
Philippe Canal
e60b8ce424 extend testing of typedef to reference
git-svn-id: http://root.cern.ch/svn/root/trunk@46679 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:33:38 +00:00
Vassil Vassilev
94994c05dc Publish the head of the transaction list so that the transactions become
iteratable. (We will use it in TCintWithCling)


git-svn-id: http://root.cern.ch/svn/root/trunk@46677 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:30:06 +00:00
Vassil Vassilev
da3a51f5f8 Make the transaction class single list.
git-svn-id: http://root.cern.ch/svn/root/trunk@46676 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:29:03 +00:00
Philippe Canal
51a176173b Use llvm::isa rathen that QualType::isXYZ as the later reports about the canonical type while we are interested in the direct type. Make sure to recurse if needed after removing the typedefs
git-svn-id: http://root.cern.ch/svn/root/trunk@46675 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:24:46 +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
d916876642 RunFunction takes FunctionDecl as an argument. Thus it avoids a lookup and
simplifies the implementation.


git-svn-id: http://root.cern.ch/svn/root/trunk@46673 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 11:56:52 +00:00
Vassil Vassilev
dac353c6df Each transaction has one wrapper function that we use all over.
Register the wrapper function in the transaction so that we can find it without
having to iterate over the rest of the declarations.


git-svn-id: http://root.cern.ch/svn/root/trunk@46672 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 11:49:49 +00:00
Vassil Vassilev
3fa63ae560 Make certain tests from the testsuite happy.
The issue was assert in codegen where the DeclRefExpr was built after the
declaration was extracted.


git-svn-id: http://root.cern.ch/svn/root/trunk@46671 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 10:46:53 +00:00
Vassil Vassilev
5b30c1e744 Why we didn't see that before. FileCheck is consuming the issued diagnostics,
which per se is terrible...


git-svn-id: http://root.cern.ch/svn/root/trunk@46669 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 10:07:41 +00:00
Vassil Vassilev
24cdb599f7 In many modes (eg like evaluate and value print) we need to find the last
expression in the wrapper function and do things with it. In some cases we 
must consider variable declarations as expressions (eg. int i = 5;) and take
the l-value and build a DeclRefExpr and return it.
Extract that common functionality out in a utility function and call it whenever
needed.


git-svn-id: http://root.cern.ch/svn/root/trunk@46668 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 09:22:36 +00:00
Vassil Vassilev
9fe2fb3239 Already in the mainline (r166208).
git-svn-id: http://root.cern.ch/svn/root/trunk@46665 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 08:05:57 +00:00
Vassil Vassilev
a209569ac5 * We need 0-terminated string (Thanks Axel for pointing that out) indeed.
* Add comment explaining it.
* Improve style of implementation.


git-svn-id: http://root.cern.ch/svn/root/trunk@46664 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 07:33:44 +00:00
Axel Naumann
9327a62ee1 Revert test r46655
git-svn-id: http://root.cern.ch/svn/root/trunk@46656 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 17:43:39 +00:00
Axel Naumann
5b0f6be89c Test for struct/class: who is complaining?
git-svn-id: http://root.cern.ch/svn/root/trunk@46655 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 17:42:39 +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
a952558fdc Reduce includes.
git-svn-id: http://root.cern.ch/svn/root/trunk@46640 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 12:10:29 +00:00
Vassil Vassilev
bdc04cd18e Extract the code duplication in separate routine.
git-svn-id: http://root.cern.ch/svn/root/trunk@46638 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 12:05:53 +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
Vassil Vassilev
2b27986ff9 Totally wrong assumptions. Pipe everything in FileCheck and we are done.
git-svn-id: http://root.cern.ch/svn/root/trunk@46633 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 10:25:24 +00:00
Vassil Vassilev
9ea3f22a54 Do not copy strings around when unneeded.
git-svn-id: http://root.cern.ch/svn/root/trunk@46632 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:43:05 +00:00
Vassil Vassilev
a907396350 Make it even simpler.
git-svn-id: http://root.cern.ch/svn/root/trunk@46631 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:38:39 +00:00
Vassil Vassilev
e8560dc77f This is definitely expected to fail.
git-svn-id: http://root.cern.ch/svn/root/trunk@46630 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:35:38 +00:00
Vassil Vassilev
59c03fda84 Simplify a bit the implementation. Make it more readable.
git-svn-id: http://root.cern.ch/svn/root/trunk@46629 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:33:29 +00:00
Vassil Vassilev
fe93a54d61 Silence doxygen warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@46628 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 08:19:19 +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
Philippe Canal
d907f10347 Fix library order
git-svn-id: http://root.cern.ch/svn/root/trunk@46617 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 15:37:38 +00:00
Vassil Vassilev
94904e14ad Revert changes and add proper fix for the coverity issues.
git-svn-id: http://root.cern.ch/svn/root/trunk@46614 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 14:53:36 +00:00
Vassil Vassilev
3a180eb6b5 Remove confusing part of the comment.
git-svn-id: http://root.cern.ch/svn/root/trunk@46594 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 08:54:00 +00:00
Vassil Vassilev
ec129305af Centralize the unique name prefix (the names generated by the interpreter use it)
and provide utility function which checks if a decls has such name.


git-svn-id: http://root.cern.ch/svn/root/trunk@46593 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 08:52:24 +00:00
Vassil Vassilev
32a2b46db8 Use more meaningful compare instead of find.
git-svn-id: http://root.cern.ch/svn/root/trunk@46590 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 08:15:25 +00:00
Vassil Vassilev
aaab1dca48 We need to analyze the whole transaction. (Thanks Axel!)
git-svn-id: http://root.cern.ch/svn/root/trunk@46589 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 07:38:08 +00:00
Vassil Vassilev
1c2df25cdd Remove the / because the FileManager thinks it is a directory prefix and asserts
that the directory doesn't exist in its cache.
Bring us one step further in importing AST nodes.


git-svn-id: http://root.cern.ch/svn/root/trunk@46564 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-16 12:50:21 +00:00
Vassil Vassilev
df045c6cf4 It doesn't leak, it is refcounted by the compiler instance.
git-svn-id: http://root.cern.ch/svn/root/trunk@46560 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-16 09:58:08 +00:00