Vassil Vassilev
a6fbc75dfa
Move the TransactionPool in its own file.
2013-08-02 17:34:56 +02:00
Vassil Vassilev
4230a3cc6c
Remove redundant transaction state.
2013-08-02 17:34:56 +02:00
Vassil Vassilev
2bab03fa58
Use the transaction pool to reduce the number of transaction allocations. Add extra assertions. Simplify *a lot* the implementation.
2013-08-02 17:34:56 +02:00
Vassil Vassilev
418fa9d489
Typo.
2013-08-02 17:34:56 +02:00
Vassil Vassilev
31d26f7371
Add debugging printout.
2013-08-02 17:34:56 +02:00
Vassil Vassilev
b1c501daf8
Separate concerns.
2013-08-02 17:34:56 +02:00
Vassil Vassilev
5db0612527
Remove unused code.
2013-08-02 17:34:55 +02:00
Vassil Vassilev
48984bc835
Simplify commitTransaction by moving the running of inits in the caller.
...
Temporarily we create a nested transaction instead of delegating that to the
caller to decide. This should be fixed soon.
2013-08-02 17:34:54 +02:00
Vassil Vassilev
c61a2f5695
Make use of the new NDEBUG define. Offload the extra work only when in debug mode.
2013-08-02 17:34:54 +02:00
Baozeng Ding
8e17b5e93e
Report the null deref warning through diagnostic engine.
2013-07-27 20:43:03 +02:00
Philippe Canal
eef395f046
Add missing re-attach nested transaction to parent after a reset in beginTransaction.
...
This fix the assert failure:
endTransaction(cling::Transaction*) const: Assertion `T->getState() == Transaction::kCollecting' failed.
2013-07-27 02:01:03 +02:00
Vassil Vassilev
dd06cb6fca
Spelling.
2013-07-14 23:00:52 +02:00
Vassil Vassilev
bc6a51340b
Fix the wrong include filename.
2013-07-14 22:40:51 +02:00
Baozeng Ding
e02eb39090
Add null deref ptr transformer, which instruments the llvm::IR to protect user code at the prompt accidentally dereferencing a null ptr.
...
Tests coming soon.
2013-07-14 22:27:52 +02:00
Vassil Vassilev
90203e1d43
Alphabetic order.
2013-07-10 14:20:08 +02:00
Axel Naumann
0c74a310d8
Rebase to master/HEAD; split commitTransaction(); select needed parts in emitAllDecls().
2013-06-28 00:33:17 +02:00
Axel Naumann
0e6302f92c
Split CodeGen and UsedAttr from commitTransaction into separate functionw.
2013-06-28 00:33:16 +02:00
Axel Naumann
e87cf60d9e
Set UsedAttr instead of LangOpt.EmtiAllDecls (temporary implementation)
2013-06-28 00:33:16 +02:00
Baozeng Ding
1c2f34afd1
Baozeng Ding - Split the transformers into two kinds: AST and IR
...
The AST transformers should be run *before* codegen, whereas the IR transformers
should be run *after*
2013-06-26 20:57:05 +02:00
Vassil Vassilev
cc609ad618
Add missing protection.
2013-06-26 16:18:26 +02:00
Vassil Vassilev
7e5846924a
Do not make the new transaction coming from the static initializer nested. If the transaction was nested make the current active the parent on commit.
2013-06-25 09:30:35 +02:00
Vassil Vassilev
2f3cdedfde
Use the std::deque to implement the first and last transaction accessors.
2013-06-25 09:30:35 +02:00
Vassil Vassilev
bc1117d95a
The transaction could be in state rolled back as well.
2013-06-25 09:30:34 +02:00
Vassil Vassilev
1ee8915aa6
Since we enforced very strict policy when declarations should be added to a transaction we have corner cases which need to be handled. For example in the transaction transformers there could be template instantiations happening and the transaction should be open and expecting decls.
2013-06-25 09:30:34 +02:00
Vassil Vassilev
0818c453ad
Add an assertion at deletion time to ensure all the transactions were committed.
2013-06-25 09:30:33 +02:00
Vassil Vassilev
ab8cf4de8e
Place the code next to the use. Makes the use-def chain shorter.
2013-06-25 09:30:30 +02:00
Vassil Vassilev
09ed3d32da
Place the comment at the right place.
2013-06-25 09:30:30 +02:00
Vassil Vassilev
43eaeb1893
Better spelling.
2013-06-25 09:30:30 +02:00
Axel Naumann
502afb5e91
Move codegen forcing to IncrementalParser, skip transformers and callbacks.
2013-06-21 09:27:56 +02:00
Vassil Vassilev
e7cf9b3570
Patch by Baozeng Ding: Implement a llvm::Module dumper for debugging purposes.
2013-06-14 09:57:52 +02:00
Vassil Vassilev
1340b29437
Set the llvm::Module earlier so that the TransactionTransformers could potentially use it.
2013-06-14 09:57:52 +02:00
Axel Naumann
50c463b803
Decl extract then return synthesize to not return a "local" var.
2013-06-10 14:48:01 +02:00
Vassil Vassilev
2d18a9f7e9
Revert "Better spelling."
...
This reverts commit b80e596feead4faab0e5852d0907e4629856942e.
2013-06-05 16:26:51 +02:00
Vassil Vassilev
10de73f318
Revert "Place the comment at the right place."
...
This reverts commit 452f22a3d5e8092f05c596be50930a5f314a7391.
2013-06-05 16:26:51 +02:00
Vassil Vassilev
ba7c6596f8
Revert "Place the code next to the use. Makes the use-def chain shorter."
...
This reverts commit 2acfd4d54cc6db3a450577a8882bdfeec80e20a9.
2013-06-05 16:26:51 +02:00
Vassil Vassilev
e74e7655d0
Revert "Progress on the llvm multi-module support."
...
This reverts commit 9d78faef6a45cb16c05fe7a96d9e2eb9fb2c1298.
2013-06-05 16:26:51 +02:00
Vassil Vassilev
b1d11c2987
Progress on the llvm multi-module support.
...
Now we build a llvm::Module per cling::Transaction and link them in on commit.
2013-06-05 16:26:51 +02:00
Vassil Vassilev
fb4dfa6b9b
Place the code next to the use. Makes the use-def chain shorter.
2013-06-05 16:26:50 +02:00
Vassil Vassilev
da531b3a93
Place the comment at the right place.
2013-06-05 16:26:50 +02:00
Vassil Vassilev
9bdf9f4ca4
Better spelling.
2013-06-05 16:26:50 +02:00
Vassil Vassilev
052976bf88
endTransaction should take a transaction to be ended.
...
Parsing code in ROOT can lead to lookups which open a nested transactions. Ending
the current transaction in these cases is misleading because usually the
transaction that is expected to be ended is different.
Add an argument to endTransaction to disambiguate. Please note that this fixes
the regular cases of ROOT autoloading.
One of the remaining issues is autoloading of classes, which are passed in as
template arguments. The second remaining is autoloading of classes residing in
unnamed namespaces. Eg. MyNamespace::MyClass, where the diagnostic is issued upon
seeing that MyNamespace is unknown.
2013-04-27 01:52:55 +02:00
Vassil Vassilev
5eb7362a39
Add a nested transaction if not reusing.
...
git-svn-id: http://root.cern.ch/svn/root/trunk@49352 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-25 16:29:27 +00:00
Axel Naumann
70695fe2be
Update to clang/llvm r179269 (llvm vendor branch r49215):
...
Parser::Scope versus Sema::DeclContext are now checked for cross-vailidity.
Emit the TU-transaction explicitly instead of relying on a first transaction.
The typename extraction now takes a stream instead of a string to write to.
The llvm::Linker has much reduced functionality; use llvm::sys::Path instead to find dynamic libraries.
git-svn-id: http://root.cern.ch/svn/root/trunk@49325 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 16:28:08 +00:00
Vassil Vassilev
943faf4683
Reuse preparation of a transaction has to happen when its state gets changed to
...
committed.
Add some asserts.
Move setting of the DeclCollector's active transaction to happen after the state
gets changed to committed.
git-svn-id: http://root.cern.ch/svn/root/trunk@49321 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 15:09:47 +00:00
Vassil Vassilev
3f7249ee28
Silence a warning.
...
git-svn-id: http://root.cern.ch/svn/root/trunk@49312 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 12:50:27 +00:00
Vassil Vassilev
128cc3436b
Fix warning.
...
git-svn-id: http://root.cern.ch/svn/root/trunk@49311 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 11:57:29 +00:00
Vassil Vassilev
852606b028
Reuse the empty nested transactions too.
...
git-svn-id: http://root.cern.ch/svn/root/trunk@49307 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 09:57:30 +00:00
Vassil Vassilev
2d770ce24c
Move resetting of the transaction in the transaction itself.
...
git-svn-id: http://root.cern.ch/svn/root/trunk@49303 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 09:06:58 +00:00
Vassil Vassilev
0fac9d5de3
Empty is a transaction with no decls and no nested transactions.
...
git-svn-id: http://root.cern.ch/svn/root/trunk@49302 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 08:51:27 +00:00
Vassil Vassilev
8817cef9ca
Reduce the creation of empty top-most transactions. Instead if the last
...
transaction was empty just reuse it.
git-svn-id: http://root.cern.ch/svn/root/trunk@49301 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 06:55:38 +00:00