search for: add_iterator

Displaying 6 results from an estimated 6 matches for "add_iterator".

2012 Mar 23
0
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
...n, but a JIT'd function. Since LLVM knows nothing about C++ or destructors, I certainly have to call the destructor manually, e.g., obj->~Class();, for the case where no exception is thrown. My JIT'd code looks like: %item = type { [16 x i8] } %singleton_iterator = type { [24 x i8] } %add_iterator = type { [24 x i8] } define void @program(void* %result) { entry: ; alloc raw space for x on the stack %x = alloca %item, align 8 ; alloc raw space for y on the stack %y = alloca %item, align 8 ; call item::item(1) constructor for x as new(%0) item(1); %0 = bitcast %item* %x to void*...
2012 Apr 08
0
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
...Am I missing anything? > > This looks like roughly what I would expect the code to be. I'd have to see the LLVM IR it generated to be sure. But it looks okay to me. (And if it's working for you, all the better. ;-) ) A snippet of the IR code is: > entry: > %add_it = alloca %add_iterator, align 8 > %y_it = alloca %singleton_iterator, align 8 > %x_it = alloca %singleton_iterator, align 8 > %y = alloca %item, align 8 > %x = alloca %item, align 8 > %exception_caught_flag = alloca i8, align 1 > store i8 0, i8* %exception_caught_flag, align 1 > %caught...
2012 Apr 08
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Apr 4, 2012, at 9:32 PM, Paul J. Lucas wrote: > On Mar 23, 2012, at 4:46 PM, Bill Wendling wrote: [...] > This all seems to work just fine. I can throw a C++ exception either in a C++ object's constructor or in an ordinary member function and the stack unwinds correctly (the object's destructors are called) and the exception is propagated back up the C++ code that called the
2012 Mar 23
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Mar 23, 2012, at 6:27 AM, Paul J. Lucas wrote: > On Mar 22, 2012, at 5:29 PM, Bill Wendling wrote: > >> On Mar 22, 2012, at 11:40 AM, Paul J. Lucas <paul at lucasmail.org> wrote: >> >>> Unfortunately, I'm not following. How is having the code that catches all exceptions in a separate function different from what I proposed (putting the try/catch in the
2012 Mar 23
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
...unction. Since LLVM knows nothing about C++ or destructors, I certainly have to call the destructor manually, e.g., obj->~Class();, for the case where no exception is thrown. My JIT'd code looks like: > > %item = type { [16 x i8] } > %singleton_iterator = type { [24 x i8] } > %add_iterator = type { [24 x i8] } > > define void @program(void* %result) { > entry: > ; alloc raw space for x on the stack > %x = alloca %item, align 8 > > ; alloc raw space for y on the stack > %y = alloca %item, align 8 > > ; call item::item(1) constructor for x as new(%...
2012 Apr 09
5
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
...the code to be. I'd have to see the LLVM IR it generated to be sure. But it looks okay to me. (And if it's working for you, all the better. ;-) ) > > A snippet of the IR code is: > The code is good, except for one comment (see below). >> entry: >> %add_it = alloca %add_iterator, align 8 >> %y_it = alloca %singleton_iterator, align 8 >> %x_it = alloca %singleton_iterator, align 8 >> %y = alloca %item, align 8 >> %x = alloca %item, align 8 >> %exception_caught_flag = alloca i8, align 1 >> store i8 0, i8* %exception_caught_flag, alig...