Commit Graph

1912 Commits

Author SHA1 Message Date
Axel Naumann
c8e2740861 Implement value printing of a long double. 2014-02-19 14:55:00 +01:00
Axel Naumann
b27e430c89 Implement setValueNoAlloc() for long double. 2014-02-19 14:55:00 +01:00
Axel Naumann
6b3e713217 Test evaluation of long double. 2014-02-19 14:55:00 +01:00
Bertrand Bellenot
2927b40462 Add /EHsc exception handling compiler flag for MSVC 2014-02-19 14:32:57 +01:00
Vassil Vassilev
e92088a41e If RHS is dependent - skip value extraction. Add a testcase for auto vars. 2014-02-19 14:22:58 +01:00
Axel Naumann
2a58b82ebe Update tests to new interfaces. 2014-02-19 12:55:00 +01:00
Vassil Vassilev
2309fc097e Rename ExecutionContext -> IncrementalExecutor 2014-02-19 12:55:00 +01:00
Vassil Vassilev
4c8ca2b50b More merge fixups. 2014-02-19 12:55:00 +01:00
Vassil Vassilev
59c0989087 Remove leftovers from merge 2014-02-19 12:55:00 +01:00
Vassil Vassilev
72a089652f Remove llvm::Type from the cling::Value 2014-02-19 12:54:59 +01:00
Vassil Vassilev
5120e219d5 Remove more redundant code 2014-02-19 12:54:59 +01:00
Axel Naumann
8b151c893e Remove now unused Interpreter::getLLVMType(). 2014-02-19 10:53:58 +01:00
Axel Naumann
71cadd6ad2 Remove remaining traces of llvm::Type from cling::Value. 2014-02-19 10:53:58 +01:00
Vassil Vassilev
ca4fd9eb3a Improve encapsulation. Move ValueExtractionSynthesizer specifics to its implementation. Get rid of references to the interpreter class in the ExecutionContext. 2014-02-19 10:43:00 +01:00
Vassil Vassilev
1598872fce Second try to silence warning cast from pointer-to-object to pointer-to-function. 2014-02-19 10:18:03 +01:00
Axel Naumann
789648df2d Add switch for lookup diags; enable it for gDebug>5 (ROOT-6070, ROOT-6044).
Use enum to avoid ambiguities between consecutive bollean args.
Use less default args to avoid Type* -> bool conversion.
2014-02-19 08:39:58 +01:00
Vassil Vassilev
77ae505186 Silence 'cast between pointer-to-function and pointer-to-object' 2014-02-18 18:35:01 +01:00
Vassil Vassilev
9ba4c591c6 Update cmake. 2014-02-18 18:19:09 +01:00
Vassil Vassilev
6435fb8ad1 Remove unused var. 2014-02-18 18:19:07 +01:00
Vassil Vassilev
19c381562d Update all references of ReturnSynthesizer. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
ca5db8bcce Use a bit better (more descriptive) name. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
4a62769b38 Return early in case of empty wrappers for example. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
9749af417c The test should be run on 32 bit finally. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
460b8b43b1 We have more accurate results so adjust the test. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
03a0159cc4 Assign if not RS. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
980a1813cf typo. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
d65a3ff810 Typo. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
36618c9b94 Remove redundant fwd declaration. 2014-02-18 17:22:58 +01:00
Vassil Vassilev
1f85d7b725 Handle returns, temporary results, independent on JIT's runFunction.
Here we don't want to depend on the JIT runFunction, because of its limitations,
when it comes to return value handling. There it is not clear who provides the
storage and who cleans it up in a  platform independent way.

Depending on the type we need to synthesize a call to cling:
  0) void : do nothing;
  1) enum, integral, float, double, referece, pointer types :
       call to cling::internal::setValueNoAlloc(...);
  2) object type (alloc on the stack) :
       cling::internal::setValueWithAlloc
     2.1) constant arrays:
         call to cling::runtime::internal::copyArray(...)

We need to synthesize later (see RuntimeUniverse.h)
 Wrapper has signature: void w(cling::StoredValueRef SVR)
case 1):
  setValueNoAlloc(gCling, &SVR, lastExprTy, lastExpr())
case 2):
  new (setValueWithAlloc(gCling, &SVR, lastExprTy)) (lastExpr)
  case 2.1):
    copyArray(src, placement, N)
2014-02-18 17:22:58 +01:00
Vassil Vassilev
c963d9f520 Add var returns test case. 2014-02-18 17:22:58 +01:00
Vassil Vassilev
ac4c77fe0a Add const to the void* so that the const overloads falls into this case too. 2014-02-18 17:22:58 +01:00
Vassil Vassilev
ad7054000c Improve implementation, shorter argument names, less overloads. 2014-02-18 17:22:58 +01:00
Axel Naumann
81c8c454b6 Keep constness of &; no need for const T* (folds into T*). 2014-02-18 17:22:58 +01:00
CristinaCristescu
9eb0ffbfcd Lay the foundations of return value alloc/noalloc. The JIT's runFunction is unreliable on 32 bit. Thus we provide a similar functionality in cling to deal with the cases where runFunction cannot.
The underlying issue is that the caller need to provide argument setup
and cleanup, which for 32bit is different than in 64, for example.
The approach we propose should be independent on the concrete platform
implementation, because we pass in the storage and depending on the
return result, we let cling runtime to deside whether and how to alloc
storage.
2014-02-18 17:22:58 +01:00
CristinaCristescu
0b3a2d5ef0 Correct comment. 2014-02-18 17:08:57 +01:00
CristinaCristescu
7605c85f5c Fix Cling Regression test. 2014-02-18 17:08:57 +01:00
Axel Naumann
363e6162ca Do not strip symbols; we need them for the JIT. 2014-02-18 17:08:57 +01:00
Axel Naumann
f3c71160a4 Add more runtime llvm headers. 2014-02-18 11:27:59 +01:00
Axel Naumann
60dc035207 Also copy Allocator.h into etc/cling. 2014-02-18 11:01:04 +01:00
Axel Naumann
fae0d4037f Follow changes in llvm/clang. 2014-02-18 08:29:38 +01:00
Axel Naumann
92fbe9671d Delay eval of CLINGCXXFLAGS: llvm-config is not yet built. 2014-02-14 18:06:52 +01:00
Axel Naumann
36bca89a5f Failure in template instantiation is a lookup failure (ROOT-6070).
(cherry picked from commit 4c32242c51a35c6e2f616457083927a68822a699)
(cherry picked from commit a0222efc70bd60a8c3bceb5e357630c81f5df3c8)
2014-02-14 12:12:55 +01:00
Axel Naumann
d599d45802 Must emit static variables from template instantiations (ROOT-6015).
This correpsonds to the call to CodeGen::HandleCXXStaticMemberVarInstantiation().
2014-02-14 10:25:08 +01:00
Bertrand Bellenot
0b5fb60b1e Add exception handling compiler flag on Windows 2014-02-13 10:49:56 +01:00
Vassil Vassilev
4dd2815f41 Fix warnings 2014-02-12 19:32:55 +01:00
Vassil Vassilev
bf57dc0424 Move isOnScopeChains to a common ground. Erase the decl from the resolver chain only if it existed there. 2014-02-12 15:30:59 +01:00
Vassil Vassilev
d2b6937161 Handle cases of var definition-function declaration ambiguities. 2014-02-12 15:30:59 +01:00
Vassil Vassilev
1be59d2ef5 Spaces instead of tabs 2014-02-12 15:30:59 +01:00
Bertrand Bellenot
d5784fd721 Fix command line warning D9002: ignoring unknown option '-fexceptions' on Windows 2014-02-12 11:29:55 +01:00
Vassil Vassilev
e44e08844e This check is ambiguous remove it.
When there are class specializations, and a concrete specialization is deleted
find will give back the less concrete one and the check will fail, signaling
a wrong behavior, which is incorrect.
2014-02-12 11:01:00 +01:00