search for: framemap

Displaying 5 results from an estimated 5 matches for "framemap".

2008 Apr 22
3
[LLVMdev] getting closer!
...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! I might be getting this. The shadow stack plugin assumes I have struct StackEntry { StackEntry *Next; // Caller's stack entry. const FrameMap *Map; // Pointer to constant FrameMap. void *Roots[]; // Stack roots (in-place array). }; as my stack item layout and I must provide a shadow stack head. From that, it will push/pop in functions? If so, that's easy enough. :) What I was/am missing is the explicit link bet...
2008 Apr 22
0
[LLVMdev] getting closer!
...starts with a pointer to object metadata, which should naturally include GC tracing information. • If you have a type forest (as in C or C++) with optional vtables, then no such assumption is possible, and you can include type layout information in the %metadata parameter to @llvm.gcroot. The FrameMap type includes this data. • You can tag values, as in lisp or many functional languages. (e.g., integer values have the low bit set, pointers do not.) All fields in a block must be of a uniform size, and you'll still need to know how many words in a block. This decision is completely ag...
2008 Apr 22
2
[LLVMdev] getting closer!
...ow-stack" adds a preamble/postamble snippet 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 { Stac...
2008 Apr 22
0
[LLVMdev] getting closer!
...et 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 Stack...
2008 Apr 23
2
[LLVMdev] getting closer!
...ting everything from Java... >>> >>> • If you have a type forest (as in C or C++) with optional >>> vtables, then no such assumption is possible, and you can include >>> type layout information in the %metadata parameter to >>> @llvm.gcroot. The FrameMap type includes this data. >> >> Ok, so I pass it an arbitrary struct pointer and it just gives it >> back later for me to peruse, right? > > Yep! You can use any constant pointer (which means: any global > variable, alias, or function). For example, something like this...