search for: smart_ptr

Displaying 20 results from an estimated 20 matches for "smart_ptr".

Did you mean: salt_ptr
2013 Oct 14
3
[LLVMdev] A weird, reproducable problem with MCJIT
...pp:595 frame #3: 0x0000000107aca9c7 libLLVM-3.4svn.dylib`llvm::MCJIT::finalizeObject() + 775 at /Users/meister/Development/cando/brcl/externals/src/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp:226 frame #4: 0x0000000103da55d3 libllvmo_dbg.dylib`llvmo::ExecutionEngine_O::getCompiledFunction(mem::smart_ptr<core::Symbol_O>, mem::smart_ptr<llvmo::Function_O>, mem::smart_ptr<core::ActivationFrame_O>, mem::smart_ptr<core::Symbol_O>) + 115 at /Users/meister/Development/cando/brcl/src/llvmo/../../src/llvmo/llvmoExpose.cc:811 Here is the function that causes the crash (it's Com...
2013 Oct 14
0
[LLVMdev] A weird, reproducable problem with MCJIT
...pp:595 frame #3: 0x0000000107aca9c7 libLLVM-3.4svn.dylib`llvm::MCJIT::finalizeObject() + 775 at /Users/meister/Development/cando/brcl/externals/src/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp:226 frame #4: 0x0000000103da55d3 libllvmo_dbg.dylib`llvmo::ExecutionEngine_O::getCompiledFunction(mem::smart_ptr<core::Symbol_O>, mem::smart_ptr<llvmo::Function_O>, mem::smart_ptr<core::ActivationFrame_O>, mem::smart_ptr<core::Symbol_O>) + 115 at /Users/meister/Development/cando/brcl/src/llvmo/../../src/llvmo/llvmoExpose.cc:811 Here is the function that causes the crash (it's Com...
2014 Sep 25
5
[LLVMdev] New type of smart pointer for LLVM
...Briefly: consider a leaky example: { T* p = new T; if (condition1) { f(p); // takes ownership of p } p->SomeMethod(); if (condition2) { return nullptr; // Leak! } g(p); // don't take ownership of p return p; } The preferred solution would look like: { smart_ptr<T> p(new T); if (condition1) { f(p.StopOwn()); // takes ownership of p } p->SomeMethod(); if (condition2) { return nullptr; // } g(p.Get()); // don't take ownership of p return p.StopOwn(); } Neither unique_ptr nor shared_ptr can be used in the place...
2013 Oct 14
3
[LLVMdev] A weird, reproducable problem with MCJIT
...0x0000000107aca9c7 > libLLVM-3.4svn.dylib`llvm::MCJIT::finalizeObject() + 775 at > /Users/meister/Development/cando/brcl/externals/src/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp:226 > frame #4: 0x0000000103da55d3 > libllvmo_dbg.dylib`llvmo::ExecutionEngine_O::getCompiledFunction(mem::smart_ptr<core::Symbol_O>, > mem::smart_ptr<llvmo::Function_O>, mem::smart_ptr<core::ActivationFrame_O>, > mem::smart_ptr<core::Symbol_O>) + 115 at > /Users/meister/Development/cando/brcl/src/llvmo/../../src/llvmo/llvmoExpose.cc:811 > > > Here is the function that ca...
2006 Nov 06
2
[LLVMdev] LLVM code emittion and C++ compiler compatibily
...l C++ code. We will compile to your bytecode from our BSF format. The question is if it is possible this to works. I am concerned with calling conversions (especially member call and the return values. Thankfully, we only have to ensure that our internal string type, all native types and boost::smart_ptr type is returned correctly. First the calling conversion. The so called __thiscall conversion on VC++ passes arguments on stack, while this pointer is passed into ECX register. For GCC, as far as I am aware, the this pointer is pushed as if it were a special (first) argument. The fix would be pr...
2009 Jul 21
0
[LLVMdev] boost shared pointer & llvm
...run > with lli. I do not know if there's general mechanism in LLVM to answer your question, but you probably don't even need that. 1. Compiling with -save-temps will give you a preprocessed source, and you can grep it for "asm". 2. The assembler most likely comes from boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp. Defining either BOOST_SP_DISABLE_THREAD, or BOOST_SP_USE_PTHREADS will work around this problem. - Volodya
2006 Nov 06
0
[LLVMdev] LLVM code emittion and C++ compiler compatibily
On Mon, 6 Nov 2006, [ISO-8859-2] Žiga Osolin wrote: > The other thing are the return types. I don't know (it is probably even > not documented) how VC++ returns smart pointer (boost::smart_ptr), > or any other type (other basics types, such as int, float, ... are > probably returned into EAX as with GCC). Once again, we may > need specific return values per arhitecture. It is possible, but it would be extremely ugly. I strongly recommend sticking to C features when JITing cod...
2006 Nov 21
1
[LLVMdev] EH and C++ intergation
...omplex double' differently than a > struct with two doubles). LLVM types are not sufficient for making > ABI decisions, at least some part of the abi decision currently needs > to be made by the front-end. > > But you can (as I am aware) define struct in llvm, such as struct smart_ptr { void* px; void* py; } and if you want to return such struct in the llvm, you must pass it as a pointer to the struct in order to return in correctly. You could actually return such struct as: ret void* px, void* py and enable the backend to either return it by struct (if not enough registers)...
2009 Jul 21
1
[LLVMdev] boost shared pointer & llvm
...w if there's general mechanism in LLVM to answer your question, > but you probably don't even need that. > > 1. Compiling with -save-temps will give you a preprocessed source, and you > can grep it for "asm". > > 2. The assembler most likely comes from > boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp. Defining either > BOOST_SP_DISABLE_THREAD, or BOOST_SP_USE_PTHREADS will work around this > problem. > > - Volodya > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://l...
2015 Jan 17
2
[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
...r.cpp:40 frame #8: 0x00000001010cd4c8 clasp_boehm_d`core::IndirectVariadicMethoid<core::policies::policies_<>, llvmo::DIBuilder_O, void (this=0x000000010c6ea5b8, lcc_resultP=0x00007fff5fb9eb58, arg0=<unavailable>)()>::invoke(gctools::multiple_values<core::T_O>*, gctools::smart_ptr<core::T_O>) + 232 at external_wrappers_indirect_methoids.h:2704 frame #9: 0x00000001010cd1f1 clasp_boehm_d`core::IndirectVariadicMethoid<core::policies::policies_<>, llvmo::DIBuilder_O, void (this=0x000000010c6ea5b8, lcc_resultP=0x00007fff5fb9eb58, lcc_nargs=1, lcc_fixed_arg0=0x0...
2019 Oct 04
2
[MachineScheduler]: SchedBoundary trivially copiable, but "HazardRec" is raw pointer: a design issue?
...both the boundary objects, the original and the copy, hold  a pointer to the same object, a double "delete" is performed. I think this is an issue deriving from the design: if SchedBoundary is designed to be copiable, then solutions may be:     1. The pointer should be wrapped around a smart_ptr (a shared_ptr, since we want to hold a copy)     2.  Define a custom copy-constructor and assign-operator, such that the ScoreBoard object, and not        the pointer, is copied. If SchedBoundary was not designed to be copiable, then default copy-costructor/assign-operator should be marked as &qu...
2009 Jul 21
3
[LLVMdev] boost shared pointer & llvm
hi, when using the execution engine (no matter, if JIT or Interpreter) i get the following assertion as soon as i use boost::shared_ptr: /build/buildd/llvm-2.5/lib/Target/X86/X86CodeEmitter.cpp:522: void<unnamed>::Emitter::emitInstruction(const llvm::MachineInstr&, const llvm::TargetInstrDesc*): Assertion `0 && "JIT does not support inline asm!\n"' failed.
2014 Sep 25
2
[LLVMdev] New type of smart pointer for LLVM
On Thu, Sep 25, 2014 at 1:44 AM, Renato Golin <renato.golin at linaro.org> wrote: > On 25 September 2014 06:16, David Blaikie <dblaikie at gmail.com> wrote: > > I can go & dredge up some examples if we want to discuss the particular > > merits & whether each of those cases would be better solved in some other > > way, but it seemed pervasive enough in the
2015 Jan 19
2
[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
...0 >> frame #8: 0x00000001010cd4c8 clasp_boehm_d`core::IndirectVariadicMethoid<core::policies::policies_<>, llvmo::DIBuilder_O, void (this=0x000000010c6ea5b8, lcc_resultP=0x00007fff5fb9eb58, arg0=<unavailable>)()>::invoke(gctools::multiple_values<core::T_O>*, gctools::smart_ptr<core::T_O>) + 232 at external_wrappers_indirect_methoids.h:2704 >> frame #9: 0x00000001010cd1f1 clasp_boehm_d`core::IndirectVariadicMethoid<core::policies::policies_<>, llvmo::DIBuilder_O, void (this=0x000000010c6ea5b8, lcc_resultP=0x00007fff5fb9eb58, lcc_nargs=1, lcc_fixed_a...
2014 Sep 25
2
[LLVMdev] New type of smart pointer for LLVM
...> p->SomeMethod(); > > > > if (condition2) { > > return nullptr; // Leak! > > } > > > > g(p); // don't take ownership of p > > return p; > > } > > > > The preferred solution would look like: > > { > > smart_ptr<T> p(new T); > > if (condition1) { > > f(p.StopOwn()); // takes ownership of p > > So this takes ownership, but promises not to destroy the pointee in some > way? > > > } > > p->SomeMethod(); > > > > if (condition2) { > >...
2006 Nov 06
0
[LLVMdev] LLVM code emittion and C++ compiler compatibily
...s the stack, mirroring cdecl CC. 2. GCC Everything is much clearer :) Just standard cdecl CC with one hidden argument (the same as struct return on Darwin). > The other thing are the return types. I don't know (it is probably even > not documented) how VC++ returns smart pointer (boost::smart_ptr), I think it's the same as struct return. Some investigation will be needed. > or any other type (other basics types, such as int, float, ... are > probably returned into EAX as with GCC). They're definitely returned via EAX. -- With best regards, Anton Korobeynikov. Faculty of M...
2014 Oct 01
4
[LLVMdev] New type of smart pointer for LLVM
...ondition1) { > f(p); // takes ownership of p > } > p->SomeMethod(); > > if (condition2) { > return nullptr; // Leak! > } > > g(p); // don't take ownership of p > return p; > } > > The preferred solution would look like: > { > smart_ptr<T> p(new T); > if (condition1) { > f(p.StopOwn()); // takes ownership of p > } > p->SomeMethod(); > > if (condition2) { > return nullptr; // > } > > g(p.Get()); // don't take ownership of p > return p.StopOwn(); > } > > N...
2006 Nov 21
0
[LLVMdev] EH and C++ intergation
On Tue, 21 Nov 2006, [ISO-8859-2] Žiga Osolin wrote: >> Sure. Anton can give you ideas for this. >> > I think it should not be too difficult because you allow custom call > conversions and this is quite easy to add, we only have to garantee that > the backend will emit it. Right. >>> 2) the ret instruction should be able to return structs (as Chris has >>>
2006 Nov 21
2
[LLVMdev] EH and C++ intergation
Chris Lattner pravi: > On Tue, 21 Nov 2006, [ISO-8859-2] Žiga Osolin wrote: >> I was going through documentation and source lately, and I decided >> how to >> make llvm bytecode more compatible to C++: >> 1) thiscall sould be introduced, which would take N arguments and the >> first argument would always be the C++ "this" argument. This would >>
2006 Nov 06
2
[LLVMdev] LLVM code emittion and C++ compiler compatibily
> On Mon, 6 Nov 2006, [ISO-8859-2] Žiga Osolin wrote: >> The other thing are the return types. I don't know (it is probably even >> not documented) how VC++ returns smart pointer (boost::smart_ptr), >> or any other type (other basics types, such as int, float, ... are >> probably returned into EAX as with GCC). Once again, we may >> need specific return values per arhitecture. > > It is possible, but it would be extremely ugly. I strongly recommend > sticking to...