cling.git
14 hours agoFirst iteration of updating CMake build for ROOT6. It builds on MacOSX but not yet... master __internal-root-40943321c68a7c4a0972e5aa1704e341312c7f9f
Pere Mato [Tue, 17 Sep 2013 14:49:58 +0000 (16:49 +0200)]
First iteration of updating CMake build for ROOT6. It builds on MacOSX but not yet run.

40 hours agoAssert only when in debug mode *and* llvmdev mode
Philippe Canal [Mon, 16 Sep 2013 11:50:55 +0000 (06:50 -0500)]
Assert only when in debug mode *and* llvmdev mode

2 days agoAvoid assert in rootcling/genreflex just because there is a user error
Philippe Canal [Sun, 15 Sep 2013 18:18:49 +0000 (13:18 -0500)]
Avoid assert in rootcling/genreflex just because there is a user error

4 days agoDisable tests on SLC6 32 bit.
Vassil Vassilev [Fri, 13 Sep 2013 13:21:13 +0000 (15:21 +0200)]
Disable tests on SLC6 32 bit.

4 days agoAdd getter and silence a warning.
Vassil Vassilev [Fri, 13 Sep 2013 13:13:21 +0000 (15:13 +0200)]
Add getter and silence a warning.

4 days ago80 Cols.
Vassil Vassilev [Fri, 13 Sep 2013 08:26:13 +0000 (10:26 +0200)]
80 Cols.

4 days agoDGRs can have a decl to be emitted, another not to be emitted.
Axel Naumann [Fri, 13 Sep 2013 08:37:54 +0000 (10:37 +0200)]
DGRs can have a decl to be emitted, another not to be emitted.

When this oce comes from a #include through ParseForModules():
class A{} g;
A should be emitted, but not g.
This is now tested in roottest/root/meta/templateAutoload.

5 days agoCompile RuntimeException with exceptions enabled.
Axel Naumann [Thu, 12 Sep 2013 07:14:43 +0000 (09:14 +0200)]
Compile RuntimeException with exceptions enabled.

6 days agoSynthesizing if(DeclRefExpr) throw requires cling to be run with rtti.
Vassil Vassilev [Wed, 11 Sep 2013 21:04:36 +0000 (23:04 +0200)]
Synthesizing if(DeclRefExpr) throw requires cling to be run with rtti.

Fix that problem by introducing an indirection - a compiled function that throws.

6 days agoAdd trampoline that will help avoid running without -no-rtti.
Vassil Vassilev [Wed, 11 Sep 2013 17:21:26 +0000 (19:21 +0200)]
Add trampoline that will help avoid running without -no-rtti.

6 days agoWhite space change (to force recompilation)
Philippe Canal [Wed, 11 Sep 2013 19:10:51 +0000 (14:10 -0500)]
White space change (to force recompilation)

6 days agoCompile RuntimeException.o with -fexception
Philippe Canal [Wed, 11 Sep 2013 19:09:22 +0000 (14:09 -0500)]
Compile RuntimeException.o with -fexception

6 days agoSilence a warning.
Vassil Vassilev [Wed, 11 Sep 2013 14:30:19 +0000 (16:30 +0200)]
Silence a warning.

6 days agoRegister result of .L
Axel Naumann [Wed, 11 Sep 2013 13:13:37 +0000 (15:13 +0200)]
Register result of .L

6 days agoUse better name.
Vassil Vassilev [Wed, 11 Sep 2013 11:31:14 +0000 (13:31 +0200)]
Use better name.

6 days agoRemove unused files.
Vassil Vassilev [Wed, 11 Sep 2013 11:21:21 +0000 (13:21 +0200)]
Remove unused files.

6 days agoExtend the AST null deref checher and disable the IR checker.
Vassil Vassilev [Wed, 11 Sep 2013 11:18:06 +0000 (13:18 +0200)]
Extend the AST null deref checher and disable the IR checker.

This resulted in one change of warning kind, which is expected. I disabled the
test MetdhoCalls, Baozeng will look at it once he gets the code.

6 days agoVisit the possible dereferences in-depth.
Vassil Vassilev [Wed, 11 Sep 2013 08:08:38 +0000 (10:08 +0200)]
Visit the possible dereferences in-depth.

6 days agoTypo
Axel Naumann [Wed, 11 Sep 2013 08:03:27 +0000 (10:03 +0200)]
Typo

6 days agoImprove exception reporting.
Axel Naumann [Wed, 11 Sep 2013 07:36:37 +0000 (09:36 +0200)]
Improve exception reporting.

6 days agoAdd more rationale as to how this exception is different from others.
Axel Naumann [Tue, 10 Sep 2013 09:06:21 +0000 (11:06 +0200)]
Add more rationale as to how this exception is different from others.

7 days agoUse the correct routine.
Vassil Vassilev [Tue, 10 Sep 2013 17:34:09 +0000 (19:34 +0200)]
Use the correct routine.

7 days agoMerge the two routines.
Vassil Vassilev [Tue, 10 Sep 2013 16:38:21 +0000 (18:38 +0200)]
Merge the two routines.

7 days agoReuse code.
Vassil Vassilev [Tue, 10 Sep 2013 16:05:44 +0000 (18:05 +0200)]
Reuse code.

7 days agoSilence warnings for unused fields.
Vassil Vassilev [Tue, 10 Sep 2013 15:01:25 +0000 (17:01 +0200)]
Silence warnings for unused fields.

7 days agoComment out that unused variable until the new llvm import.
Vassil Vassilev [Tue, 10 Sep 2013 13:44:27 +0000 (15:44 +0200)]
Comment out that unused variable until the new llvm import.

7 days agoSpell out that we want only one wrapper per transaction.
Vassil Vassilev [Tue, 10 Sep 2013 10:41:41 +0000 (12:41 +0200)]
Spell out that we want only one wrapper per transaction.

7 days agoRemove unused code.
Vassil Vassilev [Tue, 10 Sep 2013 10:35:39 +0000 (12:35 +0200)]
Remove unused code.

7 days agoSpaces.
Vassil Vassilev [Tue, 10 Sep 2013 10:33:33 +0000 (12:33 +0200)]
Spaces.

7 days agoUse best argument match constructor.
Vassil Vassilev [Tue, 10 Sep 2013 09:38:38 +0000 (11:38 +0200)]
Use best argument match constructor.

7 days agoAdd support for int *p = 0; *p; at AST level.
Baozeng Ding [Tue, 10 Sep 2013 08:10:38 +0000 (10:10 +0200)]
Add support for int *p = 0; *p; at AST level.

7 days agoAdd tmp prefix.
Vassil Vassilev [Tue, 10 Sep 2013 08:10:24 +0000 (10:10 +0200)]
Add tmp prefix.

8 days agoFile renamed
Axel Naumann [Mon, 9 Sep 2013 15:51:32 +0000 (17:51 +0200)]
File renamed

8 days agoMake CompilationException public, (also) use new cling runtime exception as base.
Axel Naumann [Mon, 9 Sep 2013 12:32:37 +0000 (14:32 +0200)]
Make CompilationException public, (also) use new cling runtime exception as base.

8 days agoInstall fatal error handler throwing an exception. Yes that is dangerous.
Axel Naumann [Fri, 6 Sep 2013 19:36:03 +0000 (21:36 +0200)]
Install fatal error handler throwing an exception. Yes that is dangerous.

8 days agoFile was renamed.
Vassil Vassilev [Mon, 9 Sep 2013 15:25:38 +0000 (17:25 +0200)]
File was renamed.

8 days agoUpdate the Module.mk. (Sorry for the mess).
Vassil Vassilev [Mon, 9 Sep 2013 14:03:12 +0000 (16:03 +0200)]
Update the Module.mk. (Sorry for the mess).

8 days agoAdapt the test suite to the new warnings produced.
Baozeng Ding [Mon, 9 Sep 2013 13:32:53 +0000 (15:32 +0200)]
Adapt the test suite to the new warnings produced.

Disable the indirect calls. We don't support them yet on AST level.

8 days agoReduce the dependence from the IR. It will be soon replaced by the AST one.
Baozeng Ding [Mon, 9 Sep 2013 13:25:02 +0000 (15:25 +0200)]
Reduce the dependence from the IR. It will be soon replaced by the AST one.

8 days agoRuntimeExceptions got renamed.
Vassil Vassilev [Mon, 9 Sep 2013 13:19:33 +0000 (15:19 +0200)]
RuntimeExceptions got renamed.

8 days agoRename filename. We don't use plural in the names...
Vassil Vassilev [Mon, 9 Sep 2013 12:59:47 +0000 (14:59 +0200)]
Rename filename. We don't use plural in the names...

8 days agoPass in the Expr* instead of the SourceLocation.
Baozeng Ding [Mon, 9 Sep 2013 12:40:26 +0000 (14:40 +0200)]
Pass in the Expr* instead of the SourceLocation.

8 days agoSpell it syntactically correct.
Vassil Vassilev [Mon, 9 Sep 2013 12:28:19 +0000 (14:28 +0200)]
Spell it syntactically correct.

8 days agoTry silence an warning.
Vassil Vassilev [Mon, 9 Sep 2013 11:59:21 +0000 (13:59 +0200)]
Try silence an warning.

8 days agoFix doxygen warning.
Vassil Vassilev [Mon, 9 Sep 2013 10:08:36 +0000 (12:08 +0200)]
Fix doxygen warning.

8 days agoPropagate the new callback to our InterpreterCallbacks interface.
Vassil Vassilev [Mon, 9 Sep 2013 09:35:05 +0000 (11:35 +0200)]
Propagate the new callback to our InterpreterCallbacks interface.

10 days agoDon't use local type as template argument.
Vassil Vassilev [Sat, 7 Sep 2013 10:20:38 +0000 (12:20 +0200)]
Don't use local type as template argument.

10 days agoHandle better the exceptions.
Vassil Vassilev [Sat, 7 Sep 2013 08:44:01 +0000 (10:44 +0200)]
Handle better the exceptions.

10 days agoImprove the look&feel of the exception classes.
Vassil Vassilev [Sat, 7 Sep 2013 08:41:29 +0000 (10:41 +0200)]
Improve the look&feel of the exception classes.

10 days agoRemove the unused code.
Baozeng Ding [Sat, 7 Sep 2013 08:21:31 +0000 (10:21 +0200)]
Remove the unused code.

10 days agoCommit of storeState/compareState that now print lookup table and included files
Jerome Beclin [Fri, 6 Sep 2013 22:00:26 +0000 (00:00 +0200)]
Commit of storeState/compareState that now print lookup table and included files

Implementation of .files moved in the Interpreter.cpp

storeState now calls three functions: dumpAST(), dumpLookup(), printIncludedFiles().
compareState now calls three functions: compareAST(), compareLookup(), compareIncludedFiles().
It's working for the included files and the AST, and it needs a new patch for
being able to dump the lookup tables (we cannot use dumpLookups() for the moment).

10 days agoCommit Interpreter.cpp with dumpLookupTable() function not working yet.
Jerome Beclin [Fri, 6 Sep 2013 21:58:31 +0000 (23:58 +0200)]
Commit Interpreter.cpp with dumpLookupTable() function not working yet.

This will be fully operational after the LLVM/Clang update.

11 days agoHandle the default interpreter's runtime exception.
Vassil Vassilev [Fri, 6 Sep 2013 21:37:21 +0000 (23:37 +0200)]
Handle the default interpreter's runtime exception.

11 days agoAdd base class for the interpreter's runtime exceptions.
Vassil Vassilev [Fri, 6 Sep 2013 21:30:42 +0000 (23:30 +0200)]
Add base class for the interpreter's runtime exceptions.

11 days agoUse default cling style for naming classes.
Vassil Vassilev [Fri, 6 Sep 2013 21:23:45 +0000 (23:23 +0200)]
Use default cling style for naming classes.

11 days agoAdd missing header method declarations.
Vassil Vassilev [Fri, 6 Sep 2013 21:18:48 +0000 (23:18 +0200)]
Add missing header method declarations.

11 days agoAdd forgotten to commit file.
Baozeng Ding [Fri, 6 Sep 2013 21:18:14 +0000 (23:18 +0200)]
Add forgotten to commit file.

11 days agoSynthesize throwing of exception to handle the null deref.
Baozeng Ding [Fri, 6 Sep 2013 21:02:00 +0000 (23:02 +0200)]
Synthesize throwing of exception to handle the null deref.

12 days agoRemove dead code (coverity 52208)
Philippe Canal [Fri, 6 Sep 2013 02:36:00 +0000 (21:36 -0500)]
Remove dead code (coverity 52208)

12 days agoCopy the RuntimeExceptions.h over. Should fix the build.
Vassil Vassilev [Thu, 5 Sep 2013 18:59:46 +0000 (20:59 +0200)]
Copy the RuntimeExceptions.h over. Should fix the build.

12 days agoAdapt to _Bool -> bool Use reg expr, because when building cling standalone we should...
Vassil Vassilev [Thu, 5 Sep 2013 15:11:20 +0000 (17:11 +0200)]
Adapt to _Bool -> bool Use reg expr, because when building cling standalone we should still get _Bool.

12 days agoIf we know at compile time that something is wrong - throw without checks.
Baozeng Ding [Thu, 5 Sep 2013 14:49:19 +0000 (16:49 +0200)]
If we know at compile time that something is wrong - throw without checks.

12 days agoAdd proper handling of the runtime exception.
Vassil Vassilev [Thu, 5 Sep 2013 14:43:20 +0000 (16:43 +0200)]
Add proper handling of the runtime exception.

12 days agoAdd special exception type for the null deref exceptions.
Vassil Vassilev [Thu, 5 Sep 2013 14:32:02 +0000 (16:32 +0200)]
Add special exception type for the null deref exceptions.

12 days agoImplement the null deref checker on AST level.
Baozeng Ding [Thu, 5 Sep 2013 14:26:23 +0000 (16:26 +0200)]
Implement the null deref checker on AST level.

We need to throw an exception if null deref is done. If we continued to do that
generating IR it would be too difficult to get the exception semantics and
cleanups right. Thus we decided to do it on AST level and delegate to codegen
generate the concrete IR that we need.

12 days agoUpdate doxygen doc
Philippe Canal [Thu, 5 Sep 2013 11:46:54 +0000 (06:46 -0500)]
Update doxygen doc

13 days agoIn ParseProto register the addresses after the array is completely resized
Philippe Canal [Wed, 4 Sep 2013 20:56:42 +0000 (15:56 -0500)]
In ParseProto register the addresses after the array is completely resized

13 days agoAdd missing transaction (fix .class)
Philippe Canal [Wed, 4 Sep 2013 16:27:03 +0000 (11:27 -0500)]
Add missing transaction (fix .class)

13 days agoFix constness.
Axel Naumann [Wed, 4 Sep 2013 13:40:06 +0000 (15:40 +0200)]
Fix constness.

13 days agoAdd getter for dylib handle (against unused warning); remove unused kBitcode
Axel Naumann [Wed, 28 Aug 2013 11:29:01 +0000 (13:29 +0200)]
Add getter for dylib handle (against unused warning); remove unused kBitcode

2 weeks agoadapt to new interface
Philippe Canal [Tue, 3 Sep 2013 12:27:29 +0000 (07:27 -0500)]
adapt to new interface

2 weeks agoDo not desugar typedef pointing to compiler 'details'.
Philippe Canal [Tue, 3 Sep 2013 05:28:58 +0000 (00:28 -0500)]
Do not desugar typedef pointing to compiler 'details'.

Rather than skipping the desugaring of typedef pointing to anything in std, we
skip the desugaring of typedef pointing to a type starting with an underscore.

2 weeks agoIn GetPartiallyDesugaredType add ability to replace a type by a typedef.
Philippe Canal [Tue, 3 Sep 2013 04:44:24 +0000 (23:44 -0500)]
In GetPartiallyDesugaredType add ability to replace a type by a typedef.

Add struct cling::utils::Transform::Config to hold both the list of typedef to
avoid desugaring (m_toSkip) and the list of type to replace by a nicer typedef
(m_toReplace).

This is used to replace basic_string<...> by std::string.

2 weeks agoTry without 'blocking' desugaring of typedef to std entities
Philippe Canal [Fri, 30 Aug 2013 10:46:44 +0000 (05:46 -0500)]
Try without 'blocking' desugaring of typedef to std entities

2 weeks agoCheck if there were errors and only if there were not - run.
Vassil Vassilev [Sun, 1 Sep 2013 14:47:49 +0000 (16:47 +0200)]
Check if there were errors and only if there were not - run.

2 weeks agoWe must have a function implementation to take its address
Philippe Canal [Sat, 31 Aug 2013 18:33:30 +0000 (13:33 -0500)]
We must have a function implementation to take its address

2 weeks agoIn ReturnSynthesizer add better support for RecordType.
Philippe Canal [Sat, 31 Aug 2013 16:22:15 +0000 (11:22 -0500)]
In ReturnSynthesizer add better support for RecordType.

When we dectect that the last expression is a record type and is not
a temporary, we now return it by reference, hence avoiding an unnecessary
and sometimes impossible (cout) copy.   If it is a temporary we still
return a 'copy'.

2 weeks agoSupport function to function pointer decay in return value.
Paul Russo [Fri, 30 Aug 2013 22:37:03 +0000 (17:37 -0500)]
Support function to function pointer decay in return value.

2 weeks agoAdd newline; (some?) fwd decls do not have one.
Axel Naumann [Fri, 30 Aug 2013 08:39:06 +0000 (10:39 +0200)]
Add newline; (some?) fwd decls do not have one.

2 weeks agoRemove unused variable.
Vassil Vassilev [Thu, 29 Aug 2013 07:33:17 +0000 (09:33 +0200)]
Remove unused variable.

2 weeks agoFix ROOT-5442, wrong normalization of std::vector<myNamespace::myClass1*>::const_iterator
Philippe Canal [Wed, 28 Aug 2013 22:02:57 +0000 (17:02 -0500)]
Fix ROOT-5442, wrong normalization of std::vector<myNamespace::myClass1*>::const_iterator

GetPartiallyDesugaredType was 'forgetting' to add full qualification of the
template parameters in some case (where the template paramter in the
QualType was not yet an elaborated type).  Extend the internal interface to
distinguish when we need to add full qualification to the type itself or its
template parameters.

2 weeks agoAdd missing operators in ParseWithShortcuts.
Philippe Canal [Tue, 27 Aug 2013 03:41:45 +0000 (22:41 -0500)]
Add missing operators in ParseWithShortcuts.

2 weeks agoDon't play smart* use proper empty str as default arg.
Vassil Vassilev [Wed, 28 Aug 2013 09:12:44 +0000 (11:12 +0200)]
Don't play smart* use proper empty str as default arg.

2 weeks agoFinally fix that infinite const recursion.
Vassil Vassilev [Wed, 28 Aug 2013 07:36:06 +0000 (09:36 +0200)]
Finally fix that infinite const recursion.

2 weeks agoMove codegenning of deserialized declarations in the IncrementalParser.
Vassil Vassilev [Mon, 26 Aug 2013 15:59:33 +0000 (17:59 +0200)]
Move codegenning of deserialized declarations in the IncrementalParser.

We had two different codepath for codegeneration. The first one was for
declarations that came from text and the second one for declarations that came
from 'ExternalSource' such as PCH. In the latter case we had to do some
extra equilibristics to emulate a PCM and ignore generating code for decls with
static storage, because it will clash with the loading of the library that already
contains them.

The advantage of the new implementation is that instead of communicating the
deserialized decls to ROOT via some fishy deserialization listeners we can use
the cling::Transaction as we use it for decls that came from code.

2 weeks agoPrint the decls coming from deserialization, too.
Vassil Vassilev [Mon, 26 Aug 2013 15:57:33 +0000 (17:57 +0200)]
Print the decls coming from deserialization, too.

2 weeks agoThere is no need of checking the size of the transaction.
Vassil Vassilev [Mon, 26 Aug 2013 15:57:08 +0000 (17:57 +0200)]
There is no need of checking the size of the transaction.

2 weeks agoFix getters, ending up in infinite recursion...
Vassil Vassilev [Mon, 26 Aug 2013 15:56:09 +0000 (17:56 +0200)]
Fix getters, ending up in infinite recursion...

2 weeks agoImplement pretty print of DelayCallInfo. Constify.
Vassil Vassilev [Mon, 26 Aug 2013 15:30:20 +0000 (17:30 +0200)]
Implement pretty print of DelayCallInfo. Constify.

2 weeks agoOrder.
Vassil Vassilev [Mon, 26 Aug 2013 15:24:42 +0000 (17:24 +0200)]
Order.

2 weeks agoAdd another sanity check. It will cry whenever we extend the enum.
Vassil Vassilev [Mon, 26 Aug 2013 15:23:30 +0000 (17:23 +0200)]
Add another sanity check. It will cry whenever we extend the enum.

2 weeks agoIterating over the AST might trigger deserialization.
Vassil Vassilev [Mon, 26 Aug 2013 15:21:49 +0000 (17:21 +0200)]
Iterating over the AST might trigger deserialization.

2 weeks agoConstify.
Vassil Vassilev [Mon, 26 Aug 2013 15:21:07 +0000 (17:21 +0200)]
Constify.

2 weeks agoThe ASTContext is a ref.
Vassil Vassilev [Fri, 23 Aug 2013 07:35:11 +0000 (09:35 +0200)]
The ASTContext is a ref.

2 weeks agoUse the ASTContext stored in the Transaction.
Vassil Vassilev [Fri, 23 Aug 2013 07:34:40 +0000 (09:34 +0200)]
Use the ASTContext stored in the Transaction.

2 weeks agoForward to the const getter.
Vassil Vassilev [Fri, 23 Aug 2013 07:34:14 +0000 (09:34 +0200)]
Forward to the const getter.

2 weeks agoUserInterface must be compiled with -fexceptions.
Axel Naumann [Wed, 28 Aug 2013 07:34:28 +0000 (09:34 +0200)]
UserInterface must be compiled with -fexceptions.

3 weeks agoAdd support for TClingCallFunc function wrappers to transactions.
Paul Russo [Tue, 27 Aug 2013 22:25:37 +0000 (17:25 -0500)]
Add support for TClingCallFunc function wrappers to transactions.

3 weeks agoSupport returning values of arbitrary class type.
Paul Russo [Tue, 27 Aug 2013 22:12:02 +0000 (17:12 -0500)]
Support returning values of arbitrary class type.

This restriction prevents us from evaluating function argument
expressions of class type (by value), and prevents us from
returning values with a class type (by value), if that class
has a non-trivial constructor or copy constructor.

For now we will allow the StoredValue to do a bit copy, with
the expectation that in the future StoredValue will hold
values of class type by pointer or reference instead of making
a copy.

3 weeks agoAdd support for member data pointer type.
Paul Russo [Tue, 27 Aug 2013 22:06:17 +0000 (17:06 -0500)]
Add support for member data pointer type.

Given:

class A {
private:
   int fInt;
};

We need to support storing the return value of
a function like this:

int A::*
f()
{
   return &A::fInt;
}