IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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.
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)
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/
#
On some platforms, global destructors are registered through a call to
__cxa_atexit(dtor, 0/*args*/, __dso_handle). While __cxa_atexit can be resolved
by the regular MemoryManager, __dso_handle (representing the "current shared
library" such that the corresponding atexit function can be called on its
dlclose) can not be resolved by MCJIT. Instead, we provide our own, poining to
the ExecutionEngine, which in turn holds a "current module" that corresponds in
spirit to the shared library handle.
__cxa_atexit, on the other hand, needs to be re-wired: the interpreter needs to
destruct globals upon its destruction, and those globals from a certain module
when that module is unloaded.
Both is done through a custom MemoryManager, significantly reducing the
complexity of the previous ("JIT without MC") implementation.
The custom MemoryManager also forwards in case of a unknown symbols to the LazyFunctionCreators instead of using the generic
ExecutionEngine::InstallLazyFunctionCreator() which has no effect with MCJIT.
MCJIT needs to finalize modules. To simplify the interface with MCJIT, each
transaction now has its own module. It gets created when the previous module
gets passed to the execution engine; the first one is created by
clang::CreateLLVMCodeGen(). CodeGen now releases the module such that it can be
added to the execution engine.
This enables simple use cases of cling with MCJIT; most notably cross-module
linking is still missing.
This gets rid of the messy pulling-SourceLocations-out-of-thin-air and instead simply
uses begin and end of the relevant memory buffer where diags are meant to be suppressed.
With the unique_ptr, we were crash due to the held over reference described
below. Trying to move the m_ExternalSemaSource deletion after the m_IncrParser
deletion also leads to crash due to the double deletion (once by the ASTContext,
once by m_ExternalSemaSource) of the ExternalSemaSource.
If m_Callbacks is declared after m_IncrParser, it will be deleted first
and if m_ExternalSemaSource is a unique_ptr, it willbe deleted before
m_IncrParser is delete.
During the Incremental parser deletion, there is a call to
CodeGenModule::Release, then EmitTargetMetdata is called and it tries to
get the most recent decl which calls
clang::LazyGenerationalUpdatePtr<...>::get
which has a LazyVal which has a cached pointer to the AST external
source. So this placement is necessary to solve a tear down crash.
#0 clang::LazyGenerationalUpdatePtr<clang::Decl const*, clang::Decl*, &(clang::ExternalASTSource::CompleteRedeclChain(clang::Decl const*))>::get (this=0x7fff5fbfe0e0, O=0x1069c3f90) at ExternalASTSource.h:428
428 (LazyVal->ExternalSource->*Update)(O);
(gdb) l
423 /// Get the value of this pointer, updating its owner if necessary.
424 T get(Owner O) {
425 if (LazyData *LazyVal = Value.template dyn_cast<LazyData*>()) {
426 if (LazyVal->LastGeneration != LazyVal->ExternalSource->getGeneration()) {
427 LazyVal->LastGeneration = LazyVal->ExternalSource->getGeneration();
428 (LazyVal->ExternalSource->*Update)(O);
429 }
430 return LazyVal->LastValue;
431 }
432 return Value.template get<T>();
#0 clang::LazyGenerationalUpdatePtr<clang::Decl const*, clang::Decl*, &(clang::ExternalASTSource::CompleteRedeclChain(clang::Decl const*))>::get (this=0x7fff5fbfe0e0, O=0x1069c3f90) at ExternalASTSource.h:428
#1 0x000000010005ce38 in clang::Redeclarable<clang::FunctionDecl>::DeclLink::getNext (this=0x1069c3ff0, D=0x1069c3f90) at Redeclarable.h:74
#2 0x000000010005cd81 in clang::Redeclarable<clang::FunctionDecl>::getNextRedeclaration (this=0x1069c3ff0) at Redeclarable.h:119
#3 0x000000010005d0b3 in clang::Redeclarable<clang::FunctionDecl>::getMostRecentDecl (this=0x1069c3ff0) at Redeclarable.h:161
#4 0x000000010137bfdc in clang::FunctionDecl::getMostRecentDeclImpl (this=0x1069c3f90) at Decl.h:1568
#5 0x00000001004b5346 in clang::Decl::getMostRecentDecl (this=0x1069c3f90) at DeclBase.h:806
#6 0x0000000100897128 in clang::CodeGen::CodeGenModule::EmitTargetMetadata (this=0x10689aa00) at /Users/pcanal/root_working/code/rootcling/interpreter/llvm/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:3271
#7 0x0000000100895237 in clang::CodeGen::CodeGenModule::Release (this=0x10689aa00) at /Users/pcanal/root_working/code/rootcling/interpreter/llvm/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:395
#8 0x0000000100981b3c in clang::CodeGeneratorImpl::ReleaseModule (this=0x106506d70) at /Users/pcanal/root_working/code/rootcling/interpreter/llvm/src/tools/clang/lib/CodeGen/ModuleBuilder.cpp:82
#9 0x00000001001c3f88 in ~IncrementalParser (this=0x1065047e0) at /Users/pcanal/root_working/code/rootcling/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:168
#10 0x00000001001c3f25 in ~IncrementalParser (this=0x1065047e0) at /Users/pcanal/root_working/code/rootcling/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:166
#11 0x00000001001d8905 in std::__1::default_delete<cling::IncrementalParser>::operator() () at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/memory:2426
#12 0x00000001001d8905 in ~unique_ptr [inlined] () at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/memory:2625
#13 0x00000001001d8905 in ~Interpreter (this=0x7fff5fbff020) at memory:2593
#14 0x00000001001d8355 in ~Interpreter (this=0x7fff5fbff020) at /Users/pcanal/root_working/code/rootcling/interpreter/cling/lib/Interpreter/Interpreter.cpp:229
#15 0x00000001002b0318 in main (argc=1, argv=0x7fff5fbff740) at /Users/pcanal/root_working/code/rootcling/interpreter/cling/tools/driver/cling.cpp:97