13 Commits

Author SHA1 Message Date
Axel Naumann
48b4a4e934 For Decls coming from a parsed file that describes the content of a library:
the callbacks must be triggered for those, too.
As they are not part of a transaction (think "module") they are now sent to the deserialization listener.
This can be removed once the modules work.

Set the state of the transaction to Committing before the static init - which might trigger more decls even though CodeGen has been run over the decls.

Forward DeclCollector::HandleInterestingDecl() to DeclCollector::HandleTopLevelDecl() for decls from the AST reader / from headers describing libraries.

Empty transactions must be passed to TCling; they trigger the sending of deserialized decls to ROOT/Meta.

Don't start TCling's artificial TU Transaction if the transaction coming in is empty - we need a decl to get the ASTContext.

Swap the deserialized decls before handling them in TCling, such that nested calls don't see the same decls again.


git-svn-id: http://root.cern.ch/svn/root/trunk@49197 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-10 15:15:49 +00:00
Axel Naumann
e70dfc300b Recurse over Namespaces; add comments / doc.
git-svn-id: http://root.cern.ch/svn/root/trunk@49169 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-10 06:57:36 +00:00
Axel Naumann
95db59648c Logic improvement: if a decl comes from an ASTReader is should not be collected, even if no codegen object exists.
Don't codegen statics and non-inline functions if from AST file or "forModules" is set:
Filter decls to be sent to codegen also based on the "forModules" flag, not only on whether it's from an AST file - in the end they are the same (forModules will vanish once we have modules).
Iterate over NamespaceDecls before emitting, to be able to filter their elements.


git-svn-id: http://root.cern.ch/svn/root/trunk@49152 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-09 15:38:50 +00:00
Vassil Vassilev
e9c68e3d38 One more (final) of "Resurrect the trunk" series:
Implement a shortcut for the deserialized decls to codegen. We do not need to put
the deserialized declaration in a transaction, because they are not interesting.
They are valid so we don't need to do sanity checks and if we'd want to unload
we would unload the entire PCH/PCM, which contains a list of all the deserialized
declarations.

NOTE that the implementation is rough and needs further polishing, which will 
happen some time soon...


git-svn-id: http://root.cern.ch/svn/root/trunk@49076 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-04 15:40:05 +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
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
Philippe Canal
63ea4e20db avoid crashing when seeing module 'import' thingies
git-svn-id: http://root.cern.ch/svn/root/trunk@47653 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 15:54:36 +00:00
Vassil Vassilev
3a684ca4d6 HandleVTable assert is far too intrusive to stay.
git-svn-id: http://root.cern.ch/svn/root/trunk@47416 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:44:58 +00:00
Vassil Vassilev
991d6c55c8 Assert actually on use of one of those routines in Sema.
git-svn-id: http://root.cern.ch/svn/root/trunk@47411 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 20:52:41 +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
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
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