[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]

Mark Shannon marks at dcs.gla.ac.uk
Mon Jul 20 07:57:24 PDT 2009


Eli Friedman wrote:
> On Mon, Jul 20, 2009 at 7:09 AM, Mark Shannon<marks at dcs.gla.ac.uk> wrote:
>> For languages with finalizers such as Python or Java, a special
>> finalizer thread can do the cleaning up lazily once the GC has collected
>> the dead objects.
> 
> Both Java and Python support "finally" clauses, which are roughly
> equivalent in this context.
> 
Equivalent to what?

The finally clause merely guarantees to execute whether or not an 
exception is thrown. They do not cause finalization of any objects.

Java, Python, etc. do not require instant finalization of objects, 
because objects exist on the heap, so they can outlive any stack 
references to them.

Unwinding the stack destroys stack-allocated objects so they must be 
finalised immediately *before* the frame in which they were allocated is 
destroyed. Heap allocated objects merely become unreachable.

Mark.

> -Eli
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 




More information about the llvm-dev mailing list