Displaying 4 results from an estimated 4 matches for "thunk_item_m_new".
Did you mean:
thunk_item_m_new_i
2012 Mar 23
0
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
...w does the C++ implementation "know" to run the d'tors for me since the C++ objects that were created on the stack were created by JIT'd code, first via alloca to allocate StructTypes of the right size (char[sizeof(T)]) then calling a thunk of the form:
extern "C" void thunk_item_M_new( void *addr ) {
new( addr ) item;
}
where "addr" is the address returned by alloca? To me, it would seem that if you're right, that I shouldn't need any try/catch at all.
When I put tracer print statements in my class's destructors, I can see that they are called only i...
2012 Mar 23
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Mar 22, 2012, at 11:40 AM, Paul J. Lucas <paul at lucasmail.org> wrote:
> On Mar 22, 2012, at 12:28 AM, Bill Wendling wrote:
>
>> On Mar 20, 2012, at 7:38 PM, Paul J. Lucas wrote:
>>
>>> I've read the docs on LLVM exceptions, but I don't see any examples. A little help?
>>
>> I don't think this has anything to do with LLVM's
2012 Mar 23
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
...C++ implementation "know" to run the d'tors for me since the C++ objects that were created on the stack were created by JIT'd code, first via alloca to allocate StructTypes of the right size (char[sizeof(T)]) then calling a thunk of the form:
>
> extern "C" void thunk_item_M_new( void *addr ) {
> new( addr ) item;
> }
>
> where "addr" is the address returned by alloca? To me, it would seem that if you're right, that I shouldn't need any try/catch at all.
>
> When I put tracer print statements in my class's destructors, I can s...
2012 Mar 15
3
[LLVMdev] Using JIT code to code a program to call C++
...result ) = 0;
};
class singleton_iterator : public item_iterator {
public:
singleton_iterator( item const &i );
// ...
};
I'm aware that LLVM doesn't know anything about C++ and that one way to call C++ functions is to wrap them in C thunks:
extern "C" {
void thunk_item_M_new( item *addr ) {
new( addr ) item;
}
void thunk_singleton_iterator_M_new( singleton_iterator *addr, item *i ) {
new( addr ) singleton_iterator( *i );
}
bool thunk_iterator_M_next( item_iterator *that, item *result ) {
return that->next( result );
}
} // extern &q...