540 Commits

Author SHA1 Message Date
CristinaCristescu
ac18e69a68 Create option for disabling the Pointer check in cling::Interpreter::declare.
To improve performance we limit the use of the Pointer validity check
and remove it from cling::Interpreter::declare.
To do this we introduce a Compilation Option which is used by the
ASTTransformer through Transaction.
2016-04-22 21:14:07 +02:00
Axel Naumann
cec046a44f Dump stack trace when throwing a null deref exception. 2016-04-21 19:14:47 +02:00
Axel Naumann
739a3c962c Fix decl / impl noexcept mismatch; throw() -> noexcept. 2016-04-21 19:14:47 +02:00
Vassil Vassilev
c3480a086c The decl shouldn't be more 'lax' than the one in base. 2016-04-21 19:14:47 +02:00
CristinaCristescu
fc500ad68e Reduce I/O operations caused by the check of address validity. 2016-04-08 15:44:11 +02:00
CristinaCristescu
b9a2d80235 Diagnose Interpreter exceptions.
Enable the TInterpreter to diagnose InterpreterExceptions so that
they can be caught and diagnose from outside ROOT. For that
InterpreterException derives from std::exception.
2016-03-23 14:29:11 +01:00
Bertrand Bellenot
74b12a0cfe Use LLVM_ON_WIN32 everywhere 2016-02-23 11:29:06 +01:00
Bertrand Bellenot
96612a35db use _MSC_VER instead of LLVM_ON_WIN32 2016-02-23 10:29:09 +01:00
Bertrand Bellenot
2649f0d318 Fix cling compilation errors on Windows (with VS 2015) 2016-02-23 09:29:07 +01:00
Philippe Canal
c1cb2ca6f2 Add a means to customize which file are ignored in ForwardDeclPrinter.
This will also rootcling to tell cling's ForwardDeclPrinter to consider the file included inside a LinkDef file as
being top level headers (rather than listing the linkdef itself\!).
2016-02-19 00:00:26 +01:00
Axel Naumann
14e101a3b1 Windows needs Windows.h instead of unidist.h. 2016-02-05 17:29:32 +01:00
Axel Naumann
a306d87760 Add santity check - compiled programs should not see this. 2016-02-05 11:44:09 +01:00
Axel Naumann
c2172523f4 Add missing #include <tuple>.
The tuple part will be moved to a separate header in the cling extra / overriding include path,
behind a #include_next <tuple>.
2016-02-04 18:14:08 +01:00
Danilo Piparo
359515e06e Remove usage of stringstream and reformulate iteration on tuple elements
in order to  stop the iteration and account for the empty tuple case with
one single specialisation.
We loop at compile time from element 0 to element TUPLE_SIZE - 1
of the tuple. The running index is N which has as initial value
TUPLE_SIZE.
2016-02-04 15:29:16 +01:00
Danilo Piparo
90fe0e262e Add to cling value printing capabilities for std::tuple and std::pair. 2016-02-02 12:59:25 +01:00
Elisavet Sakellari
01a4526fc6 Edited test for Multiple Interps, and added some fixes 2016-01-14 20:44:14 +01:00
Elisavet Sakellari
4ac0a10a3e Added test for MultipleInterpreters, and some changes. 2016-01-14 20:44:14 +01:00
Elisavet Sakellari
b0bdcf4c56 First commit for the Multiple Interpreters. 2016-01-14 20:44:14 +01:00
Elisavet Sakellari
ee92892ad4 First commit for the Multiple Interpreters 2016-01-14 20:44:14 +01:00
CristinaCristescu
c5a42b19af Invalid referrencing runtime call casted to appropriate type. 2015-12-18 12:44:09 +01:00
CristinaCristescu
fb8bc80796 Fix max 80 columns in cling files. 2015-12-15 20:24:16 +01:00
Axel Naumann
2ebdea084b Fix CPP indentation. 2015-12-15 20:24:16 +01:00
CristinaCristescu
95e3dcf8ef Check for invalid pointer address access. 2015-12-15 20:24:16 +01:00
CristinaCristescu
7556d3814d NullDeref check changed from injection of if(stmt) to a runtime call. 2015-12-15 20:24:16 +01:00
Axel Naumann
25bbe0c617 Cache Dtor wrappers (used by ~Value); reduce calls to dlsym (ROOT-7840).
This fixes a PyROOT performance regression between 6.02 and 6.04, seen by ATLAS.

(cherry picked from commit ba4b0df02a91be4102e62fc76038711d188f07f3)

Conflicts:
	interpreter/cling/lib/Interpreter/Value.cpp
2015-12-15 20:24:16 +01:00
Axel Naumann
923b4ce39b Also strip the "runtime" part of the Interpreter exception here. 2015-12-15 20:24:16 +01:00
CristinaCristescu
1d46fe88d8 Remove runtime namespace from NullDerefException and rename RuntimeException.h to Exception.h.
(cherry picked from commit 234da8bfedce8661c2b8bc50f72632c240c4dfd8)
2015-12-15 20:24:16 +01:00
CristinaCristescu
8ab37ec3d6 Enable Baozeng Ding's NullDeref protection for ROOT; use exceptions.
The function HandleInterpreterException catches the NullDerefException.
Remove pre-exception longjmp code.
2015-12-15 20:24:15 +01:00
Axel Naumann
a3a1e27b2f Improve doc wording, no functional change. 2015-10-23 21:16:12 +02:00
Philippe Canal
432884aada Add a callback during Transaction's rollback. 2015-10-22 14:56:16 +02:00
Axel Naumann
be55c83f9b Inline Value move ctor to enable the compiler to skip it. 2015-10-20 01:50:13 +02:00
Philippe Canal
fdbc4b985c Remove debug characters 2015-10-15 17:09:17 +02:00
Philippe Canal
cb70c9d802 Fix value printing of TCollection objects.
The iterator for a TCollection currently return the content
(a TObject*) by value, preventing the usual mechanism from
working:
   error: cannot take the address of an rvalue of type 'TObject *'
        str += printValue(&(*iter));
                          ^ ~~~~~
so add a special case when this address taking fails.
2015-10-10 20:08:02 +02:00
Philippe Canal
75fac59326 Coding conventions fixes 2015-09-30 16:41:12 +02:00
Philippe Canal
9c88696445 Implement TCling::ResetGlobals to fix ROOT-7673.
Note we don't want to unload transaction so soon as this might remove the header files still needed
(they need to be removed by the library .... which is still a to-be-done feature)
2015-09-29 22:49:05 +02:00
Boris Perovic
39f64ab7b7 Catch-all printValue implementation changed to enable correct invocation if only parent type overload exists (ex. if there is no overload for TF1*, compiler invokes the overload to its best parent overload match, in the worst case void*). Argument changed from reference to pointer to support this. isEnumType Coverity bug changed from if to assert (coding, not runtime error) Changed the way printValue is invoked in order to correctly cast Value to the needed value (e.g. LL -> short). Extracted value stays in scope while we execute printValue, because we use the address. 2015-08-20 17:06:02 +02:00
Boris Perovic
fc447d5fd5 Small improvements. nullptr -> nullptr_t for isNullPtrType 2015-08-18 18:08:20 +02:00
Boris Perovic
800c644352 Removed "VALID" after address output, fixes roottest. Various fixes based on comments after second round. 2015-08-18 18:08:20 +02:00
Boris Perovic
63bc59dde6 Fixed the bug (missing internal::) from commit 279fc73896036900366fa1596ec4d624b9db1c05. 2015-08-18 18:08:19 +02:00
Boris Perovic
688ad34b3f Minor fixes around printValue, based on comments after the integration. 2015-08-18 18:08:17 +02:00
Boris Perovic
c44940b223 New printValue() integration (printing unified through overloading of printValue() function and template resolution). Modified tests to conform to the new prints. 2015-08-17 18:45:03 +02:00
Elisavet Sakellari
d2953ff9a6 Handling of multiple Redirection RAII's 2015-08-17 18:45:02 +02:00
Axel Naumann
dc2047e7c4 Replace Transaction::reset() by ~Transaction(). Replace RefillPool by new Transaction.
Simplifies code, removes duplication.
2015-06-08 14:58:29 +02:00
Axel Naumann
397f6fb9e9 Fix warning; make determineStorageType() static. 2015-04-07 09:39:25 +02:00
Axel Naumann
ca9ac1961f Accelerate costly Value functions by storing results. 2015-04-06 21:30:19 +02:00
Axel Naumann
8552299b66 Support DynamicLookup test resolver not resolving anything. 2015-04-01 12:09:19 +02:00
Axel Naumann
c91fffa352 Register IssuedDiags with topmost Transaction. 2015-03-17 14:06:39 +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
Bertrand Bellenot
bb53e44094 Fix compilation errors on Windows
MSVC doesn't support fSpinLock=ATOMIC_FLAG_INIT; in the class definition, nor in the class constructor initializer list
2015-02-25 18:03:18 +01:00
martell
6383df2174 use size_t for void pointer cast 2015-02-23 00:31:28 +01:00