35 Commits

Author SHA1 Message Date
Axel Naumann
fcad3e9e4d Silence unused var warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@48198 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-31 13:29:19 +00:00
Philippe Canal
90d940fbb8 Introduce (and use in TCling) Interpreter::parseForModule that codegen just
inline functions (and should codegen anything that is not directly provide
by a library 'described' by a module).


git-svn-id: http://root.cern.ch/svn/root/trunk@48197 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-25 04:57:07 +00:00
Axel Naumann
c759ab29ed Add two missing ASTConsumer interfaces to the DeclCollector.
git-svn-id: http://root.cern.ch/svn/root/trunk@47986 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-12 08:08:56 +00:00
Vassil Vassilev
add2016128 Silence -Wcovered-switch-default
git-svn-id: http://root.cern.ch/svn/root/trunk@47853 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-05 14:50:00 +00:00
Vassil Vassilev
ce6051db36 Copy-pasto
git-svn-id: http://root.cern.ch/svn/root/trunk@47829 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 17:13:14 +00:00
Vassil Vassilev
63492a7a1b We use kCCINone internally as delimiter in the Transaction
git-svn-id: http://root.cern.ch/svn/root/trunk@47828 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 17:12:21 +00:00
Vassil Vassilev
32751e08ff Remove now redundant code.
git-svn-id: http://root.cern.ch/svn/root/trunk@47823 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 15:42:01 +00:00
Vassil Vassilev
ed96f22a74 Make use of the new patch in the vendor branch. Setting the TU to TU_Complete
will force generation of the vtables of referenced classes.


git-svn-id: http://root.cern.ch/svn/root/trunk@47821 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 15:22:10 +00:00
Vassil Vassilev
5e9a144766 Add default case and silence a warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@47813 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 10:53:44 +00:00
Vassil Vassilev
ef8d4e85ba Readd support (which we had long time ago) for tracking down which decl came from.
This "is meant" to help us generating the missing symbols in the llvm::Module.


git-svn-id: http://root.cern.ch/svn/root/trunk@47790 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-03 16:28:24 +00:00
Vassil Vassilev
fdd88b8a47 Implement basic infrastruction to begin tracking down the interfaces from which the decls came.
git-svn-id: http://root.cern.ch/svn/root/trunk@47787 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-03 14:27:12 +00:00
Axel Naumann
2da8caecff Handle unresolved symbols in static initialization.
Now that it's used twice, extract the conversion from ExeContext::ExeResult to Interp::ExeResult.
IncrementalParser will try to roll the transaction back for unresolved initializers.


git-svn-id: http://root.cern.ch/svn/root/trunk@47484 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 16:24:02 +00:00
Axel Naumann
c197c04fb6 DiagConsumer::Begin/EndSourceFile() are used to switch from "parsing command line flags" to "parsing source files" more; not to signal a new source file to the diag client.
Switch BeginSourceFile() on after having parsed Interpreter internals.
Switch it off (EndSourceFile()) in ~Interpreter.
Indentation.

Now that we handle diags appropriately, test/ErrorRecovery/MetaProcessor.C fails; repair it.


git-svn-id: http://root.cern.ch/svn/root/trunk@47476 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:21:00 +00:00
Vassil Vassilev
009338beb7 Since cling::Transaction is public and the fact that on commit of transaction a
new transaction could be triggered, every compile should return the transaction
that it actually compiled. I.e. the cling::IncrementalParser::getLastTransaction
in many cases might not be the transaction we expect. For example in ROOT's case
plugin manager is triggered for some reason and the last transaction is not the
one that I'd personally expect.
This should be fix roottest/.../runMemory.C


git-svn-id: http://root.cern.ch/svn/root/trunk@47465 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 03:26:52 +00:00
Vassil Vassilev
177d20e14c Fix code generation of dynamic classes, i.e classes having virtual tables.
git-svn-id: http://root.cern.ch/svn/root/trunk@47418 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:57:52 +00:00
Vassil Vassilev
29b9270e50 Remove unused code.
git-svn-id: http://root.cern.ch/svn/root/trunk@47291 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-14 22:07:42 +00:00
Vassil Vassilev
76975bf2da Improve cling's transaction model. For now a bit hackish because it doesn't
actually support proper nesting of transactions.
(begin|end)Transaction return the transaction began or ended, which simplifies
interaction in case of nested transactions (coming from the autoloading)

Implement new function which transforms the single-linked list into a vector of
transactions for debugging purposes only.


git-svn-id: http://root.cern.ch/svn/root/trunk@47290 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-14 22:06:58 +00:00
Vassil Vassilev
9fbe6096c9 Add some support for nested transactions, needed by the upcoming patch of the
autoloading. There we need to subparse some content that naturally should end up
as nested transaction.


git-svn-id: http://root.cern.ch/svn/root/trunk@47247 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-13 23:52:30 +00:00
Vassil Vassilev
f7da8da78f End close the file for diagnostics at proper time.
git-svn-id: http://root.cern.ch/svn/root/trunk@46857 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-27 21:41:21 +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
b07eb9a4ec Move begin/end source file in commitCurrentTransaction to make sure that we
get relevant diagnostics from the transformers.
Fixes the text diagnostic printer bug #98434.


git-svn-id: http://root.cern.ch/svn/root/trunk@46822 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 10:08:00 +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
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
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
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
c5a8df6c88 Prepare cling for fixing bug #98146. In principle the bug could be fixed in 10
seconds, but I don't like where EvaluateInternal is going.
At first place it shouldn't do any smart guessing what the transformers would do.
Second it shouldn't try to attach expression evaluation (storing the result in 
cling::Value) while preparing for value printing.

To sum up:
* Simplify the old craft in EvaluateInternal
  - Move the value printing logic into the value printer transformer. 
  - Move the expression evaluation login (mainly coming through the 
Interpreter::evaluate interface) into separate transformer.
* Attach the new transformer to the list of transformers (the size of it was 
increased as well.)
* Add new compilation option switch that the new transformer will react on.
* Turn on the switch where necessary.
* Simplify value printer logic. Now everything is at one place, which makes it
simpler and easier to debug.
* Make IncrementalParser::Parse to take compilation options' reference instead of
constructing it's own.
* As consequence of the new implementation - two bugs in the testsuite were 
uncovered. Propose a fix for them.
* Improve documentation.
* TODO: There is some code duplication, which will be factored out soon.


git-svn-id: http://root.cern.ch/svn/root/trunk@46549 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-15 13:42:09 +00:00
Vassil Vassilev
fce967cd7d Coverity #46995
git-svn-id: http://root.cern.ch/svn/root/trunk@46538 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-14 15:23:14 +00:00
Vassil Vassilev
9d654b26f9 No need to enable/disable, check for enabled/disabled callback. Either they are
there and we use them or not.


git-svn-id: http://root.cern.ch/svn/root/trunk@46440 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-10 14:50:45 +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
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
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
Vassil Vassilev
7c08e8c678 Get rid of interpreter pointer in one of the transformers.
git-svn-id: http://root.cern.ch/svn/root/trunk@46017 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-18 13:13:22 +00:00
Vassil Vassilev
f2d691971f Get rid of interpreter pointer in one of the transformers. More to follow.
git-svn-id: http://root.cern.ch/svn/root/trunk@46016 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-18 12:46:30 +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