search for: numroots

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

2008 Apr 22
0
[LLVMdev] getting closer!
On Apr 21, 2008, at 20:09, Terence Parr wrote: > Ok, I *might* be getting this from the assembly code. ... From > that, it will push/pop in functions? If so, that's easy enough. :) Yup! Sounds like you've got it. > What I was/am missing is the explicit link between types and > variables in a GC.c file and the generated machine code. If I can > get that last
2008 Apr 22
2
[LLVMdev] getting closer!
...to each function that must bind with StackEntry *llvm_gc_root_chain; wherever you choose to define it. I put into my GC.c file. Further, that shadow-stack snippet generation assumes the following structures for tracking roots: typedef struct FrameMap FrameMap; struct FrameMap { int32_t NumRoots; // Number of roots in stack frame. int32_t NumMeta; // Number of metadata descriptors. May be < NumRoots. void *Meta[]; // May be absent for roots without metadata. }; typedef struct StackEntry StackEntry; struct StackEntry { StackEntry *Next; // Caller's stack entry....
2008 Apr 22
3
[LLVMdev] getting closer!
Ok, I *might* be getting this from the assembly code. The assembly code has: L_llvm_gc_root_chain$non_lazy_ptr: .indirect_symbol _llvm_gc_root_chain .long 0 and I see it being used in the function preamble. Is that a ref to an extern symbol or the def? I.e., is it referring to StackEntry *llvm_gc_root_chain; that I must have in my GC C code? (semispace.c has it) SO!
2006 Mar 14
0
[LLVMdev] Re: Garbage collection questions
...---------------------------------------------===** * FIXME: This should be in a code-generator specific library, but for now this * will work for all code generators. */ typedef struct GCRoot { void **RootPtr; void *Meta; } GCRoot; typedef struct GCRoots { struct GCRoots *Next; unsigned NumRoots; GCRoot RootRecords[]; } GCRoots; GCRoots *llvm_gc_root_chain; void llvm_cg_walk_gcroots(void (*FP)(void **Root, void *Meta)) { GCRoots *R = llvm_gc_root_chain; for (; R; R = R->Next) { unsigned i, e; for (i = 0, e = R->NumRoots; i != e; ++i) FP(R->RootRecords[i].RootP...
2006 Mar 14
3
[LLVMdev] Re: Garbage collection questions
Again, sorry for the delay. :( On Thu, 9 Mar 2006, Sandro Magi wrote: > I've written a reference-counting garbage collector for LLVM, but I'm > still unclear on a few things. Cool! > The following piece of code that appears on > http://llvm.cs.uiuc.edu/docs/GarbageCollection.html is unclear: > > ;; As the pointer goes out of scope, store a null value into > ;;
2008 Apr 22
0
[LLVMdev] getting closer!
...StackEntry *llvm_gc_root_chain; > > wherever you choose to define it. I put into my GC.c file. > > Further, that shadow-stack snippet generation assumes the following > structures for tracking roots: > > typedef struct FrameMap FrameMap; > struct FrameMap { > int32_t NumRoots; // Number of roots in stack frame. > int32_t NumMeta; // Number of metadata descriptors. May be < > NumRoots. > void *Meta[]; // May be absent for roots without metadata. > }; > > typedef struct StackEntry StackEntry; > struct StackEntry { > StackEntry *Next;...