Commit Graph

14 Commits

Author SHA1 Message Date
Jonas Hahnfeld
fd2212c84e Create new CompoundStmt instead of replacing children
For the update of LLVM 9, Cling required another patch to Clang for
replacing the children of a CompoundStmt. Instead solve this by
creating a new CompoundStmt with the right Stmts attached.

Co-authored-by: Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>
Co-authored-by: Jonas Hahnfeld <hahnjo@hahnjo.de>
2021-04-23 09:29:06 +02:00
Roman Zulak
35c0ef1cdd Remove unused stream argument.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-10-05 10:53:00 +02:00
Frederich Munch
354a406ae8 Remove ValuePrinterSynthesizer::m_ValuePrinterStream. 2016-09-02 12:59:54 +02:00
CristinaCristescu
b44cf929ba Cache the lookup of the runtime functions in the synthesizers of the transformers. 2015-12-15 20:24:16 +01:00
Axel Naumann
690d4b0578 Rename ASTTransformer.h -> TransactionTransformer.h. 2015-03-16 15:24:52 +01:00
Axel Naumann
166032069e Emit Decls as DeclCollector sees them.
Now that we can easily revert Transactions' IR (by unloading their
module) we do not need to queue the Decls before emitting them.
This enables EndOfTU actions to be emitted seeminglessly, without
extra transactions, or explicit post-EndOfTU-emission: each
Transaction will have its TU finalized exactly once.

This in turn allows us to turn on Debug emission - which relies on
being invoked exactly once per Module.

Transformers must be invoked before emitting Decls. They are now
invoked for each Decl; WrapperTransformers are invoked when seeing
a wrapper decl. They do not see the "full transaction AST" anymore
- luckily none of our transformers requires this and actually become
simpler because of this change.

This also fixes a bug where the relative sequencing of parsed and
deserialized Decls was lost (parsed was emitted before deserialized).

Remove unused IRTransactions; they should really be llvm::Pass-es.
We don't have them anyway.

Disable a few transformations if the Decl isFromASTFile.

When reverting a Transaction, also revert its nested ones.

In the ValueExtractionSynthesizer, pass the ValuePrinter option as
int, instead of the transaction pointer - that might have changed
(at least its options) by the time we invoke the wrapper.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i or -o; assuming --only paths...
# rebase in progress; onto b3d9f92
# You are currently splitting a commit while rebasing branch 'declcollector-emits-v2' on 'b3d9f92'.
#
# Changes to be committed:
#	modified:   interpreter/cling/include/cling/Interpreter/RuntimeUniverse.h
#	modified:   interpreter/cling/lib/Interpreter/AutoSynthesizer.cpp
#	modified:   interpreter/cling/lib/Interpreter/AutoSynthesizer.h
#	modified:   interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.cpp
#	modified:   interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.h
#	modified:   interpreter/cling/lib/Interpreter/DeclCollector.cpp
#	modified:   interpreter/cling/lib/Interpreter/DeclCollector.h
#	modified:   interpreter/cling/lib/Interpreter/DeclExtractor.cpp
#	modified:   interpreter/cling/lib/Interpreter/DeclExtractor.h
#	modified:   interpreter/cling/lib/Interpreter/DynamicLookup.cpp
#	modified:   interpreter/cling/lib/Interpreter/DynamicLookup.h
#	modified:   interpreter/cling/lib/Interpreter/IncrementalParser.cpp
#	modified:   interpreter/cling/lib/Interpreter/IncrementalParser.h
#	modified:   interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp
#	modified:   interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.h
#	modified:   interpreter/cling/lib/Interpreter/TransactionTransformer.cpp
#	modified:   interpreter/cling/lib/Interpreter/TransactionTransformer.h
#	modified:   interpreter/cling/lib/Interpreter/TransactionUnloader.cpp
#	modified:   interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.cpp
#	modified:   interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.h
#	modified:   interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.cpp
#	modified:   interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.h
#
# Untracked files:
#	.idea/
#	0001-Fix-llvm-merge-issue.patch
#	0002-Fix-warnings.patch
#	0003-Keep-weak-symbols-around-subsequent-transactions-mig.patch
#	T.cxx
#	T.cxx~
#	TMVA.root
#	a.out
#	boost.root
#	config/Makefile.depend~
#	core/textinput/src/textinput/TerminalDisplayWin.cpp.orig
#	ct.root
#	data.root
#	interpreter/cling/76fc2055249da7b03148a7d4197a279e9943f012.patch
#	interpreter/cling/lib/Interpreter/CIFactory.cpp~
#	interpreter/cling/lib/Interpreter/DeclCollector.h~
#	interpreter/cling/lib/Interpreter/DynamicLibraryManager.cpp~
#	modulemap-one-header-per-file.txt
#	osrm-routed
#	tiles.tar.bz2
#	tmva_class_example.root
#	tutorials/v3.root
#	weights/
#
2015-03-16 14:58:58 +01:00
Vassil Vassilev
0aa2a31fa0 llvm::OwningPtr is now std::unique_ptr. 2014-08-14 14:56:44 +02:00
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
Vassil Vassilev
3e5af816aa No need to synthesize anything anymore. 2014-05-18 18:08:58 +02:00
Axel Naumann
44481ace1e Fix license; remove $Id$ version. 2014-01-07 11:14:04 +01:00
Axel Naumann
8416a9183c Simplify: don't loop over everything to find the WrapperFD but use the one stored in the transaction.
git-svn-id: http://root.cern.ch/svn/root/trunk@47163 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 12:47:05 +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
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
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