Commit Graph

256 Commits

Author SHA1 Message Date
Vassil Vassilev
9b4ea193c0 If cling::Value is provided turn result evaluation on. 2014-04-14 09:09:01 +02:00
Vassil Vassilev
ebad01a510 Simplify and extend the dynamic library manager.
Now it provides an interface which can lookup library names. It can unload a
library and the implementation of loading and resolving a library name is much
simpler.

The extensions are greatly used by the unloading facilities in cling its users.
2014-04-14 09:09:00 +02:00
Vassil Vassilev
0abad4f1ff Implement an interface for file/librarly lookup, given the interpreter and system inc paths. 2014-04-14 09:09:00 +02:00
Axel Naumann
895e8eaf51 Init member (thanks, valgrind). 2014-04-11 09:00:00 +02:00
Vassil Vassilev
76c4024d1d Polish the implementation. Each pragma equivalent must use different source location. 2014-04-02 15:29:58 +02:00
Axel Naumann
d00d9e8d54 Simplify; adapt to new Value. 2014-04-01 18:31:58 +02:00
Axel Naumann
93970e8c35 Replace StoredValueRef by Value. 2014-04-01 18:31:58 +02:00
Vassil Vassilev
ffc9fe50b5 Disable useless warnings only for the wrapper functions.
We simulate programatically:
void __cling_Unique {
  #pragma push
  #pragma ... ignore ...
  {code}
  #pragma pop
}
2014-04-01 17:09:58 +02:00
Vassil Vassilev
1f25fe3a00 CXX consistency. 2014-03-31 14:03:03 +02:00
Vassil Vassilev
73113c2c4b Reduce includes. 2014-03-31 14:03:02 +02:00
Vassil Vassilev
d86e86086f Use better, more accurate include. 2014-03-31 14:03:02 +02:00
Vassil Vassilev
5e3a83bd3b Set the ignored diags before the driver does parse from args.
This allows the driver to override our custom diagnostics if the user wants any
special treatment.
2014-03-31 14:03:01 +02:00
Vassil Vassilev
4d5e607256 Merge unloadTransaction and rollbackTransaction. 2014-03-24 14:25:58 +01:00
Axel Naumann
7390550dfe Add comment explaining (part of) the bootstrap sequencing. 2014-03-23 21:13:54 +01:00
CristinaCristescu
6422e03e30 Unloading of functions, enums, globals (ROOT-5701). 2014-03-17 14:48:07 +01:00
Vassil Vassilev
1b85e6e20d We may not have incr executor. 2014-03-14 10:52:29 +01:00
Vassil Vassilev
b371e33e23 We may not have code gen. 2014-03-14 10:52:29 +01:00
Axel Naumann
d27125d2e6 Extract git commit and use it to version cling. 2014-03-08 18:47:10 +01:00
Axel Naumann
ed1069786f Improve version string; adapt test. 2014-03-05 09:46:09 +01:00
Axel Naumann
297d6a0019 First step away from SVN versioning. 2014-03-04 19:55:00 +01:00
Axel Naumann
57a84ab394 Move some code around to chop Interpreter() into smaller pieces. 2014-03-04 19:55:00 +01:00
Axel Naumann
5045248a76 Dealy running static init until gCling is defined; local_cxa_atexit() needs it. 2014-03-04 19:55:00 +01:00
Axel Naumann
6325e7ed19 Keep trying to remap __cxa_atexit until succeeded.
__cxa_atexit is generated by clang::CodeGen upon seeing the first static
destructor. Instead of trying to provoke that we just continue to search for it.
2014-03-04 19:55:00 +01:00
Axel Naumann
baca204185 Simplify cxa_atexit(), first part.
Remove trigger__cxa_atexit(), we will just remap until successful.
Remove unused dso parameter.
Instead of friending just provide a function.
Pass a transaction, the typesafe way.
2014-03-04 19:54:59 +01:00
Axel Naumann
a2ccf158bd Remove stray semicolon. 2014-03-03 23:48:10 +01:00
Axel Naumann
5294658610 Update to llvm/clang r202469. 2014-03-03 18:45:21 +01:00
Axel Naumann
6b647a89cd Force symbol for ~__trigger__cxa_atexit (ROOT-6074); avoid reserved name. 2014-03-03 18:45:21 +01:00
Vassil Vassilev
d5abdd34f6 Remove unused variable. 2014-03-03 17:49:56 +01:00
Vassil Vassilev
c7e7156ce1 Remove Interpreter::getModule. 2014-03-03 15:27:05 +01:00
Vassil Vassilev
8d457e947f StringRef-y. 2014-03-03 15:27:05 +01:00
Vassil Vassilev
15918cd889 Remove unused interface. 2014-03-03 15:27:05 +01:00
Vassil Vassilev
e4383ecf7d Remove unused interface. 2014-03-03 15:27:05 +01:00
Vassil Vassilev
1851604b8c Rename printAST to printDebug. 2014-03-03 15:27:05 +01:00
Vassil Vassilev
c745dcc29c Remove useless flag. 2014-03-03 15:27:04 +01:00
Vassil Vassilev
f29b09e054 Remove .printIR and replace it with smarter debug class reusing the latest state tracker. 2014-03-03 15:27:04 +01:00
Vassil Vassilev
2ecd78a0aa Move the callback invocation in the interpreter. 2014-03-03 15:27:04 +01:00
Vassil Vassilev
71b05e8321 Use the new CodeGen debug printouts in .storeState 2014-02-27 15:57:11 +01:00
Vassil Vassilev
c22ea2a25e Run the dtors first, before they get unloaded and forgotten. 2014-02-27 12:49:12 +01:00
Vassil Vassilev
1bf7c49086 Move unloading of N transactions outside IncrementalParser 2014-02-27 12:49:11 +01:00
Vassil Vassilev
eea3bf1f3d This should be reimplemented. So far it is a nop. 2014-02-27 12:49:10 +01:00
Vassil Vassilev
4eeddf8a8c Bind cxa_atexit to the Transaction instead of the Decl. 2014-02-27 12:49:09 +01:00
Axel Naumann
9ef996db19 Keep -I unique: no need to add it if it already exists. 2014-02-20 18:05:58 +01:00
Vassil Vassilev
c992cf3047 Implement reloading on .L
We keep the FileEntry -> Transaction mapping so that next time there is .L
we can figure out that it was already loaded and unload it and reload it again.
2014-02-20 10:36:10 +01:00
Vassil Vassilev
2309fc097e Rename ExecutionContext -> IncrementalExecutor 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
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
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