[LLVMdev] GC questions.
Chris Lattner
sabre at nondot.org
Wed Jul 21 11:16:53 PDT 2004
On Wed, 21 Jul 2004, Tobias Nurmiranta wrote:
> [1] I'm kind of newbie of cvs, but I did:
> "cvs -z3 -d :pserver:anon at llvm-cvs.cs.uiuc.edu:/var/cvs/llvm diff llvm > gcpatch"
That patch is well formed. You did exactly the right thing. :)
> Ok, a patch[1] is attached. I didn't care to coerce the offset, since I
> assume that it is an uint, but maybe I should? Hopefully I've understood
> the llvm source correctly.
This will work, but it would be better to take two pointers in instead of
a pointer and offset. This allows the front-end to emit target-generic
code instead of target-specific code (where it would have to know the
offset to the field). To be more specific, llvm_gc_read should look like
this by default:
void *llvm_gc_read(void *ObjPtr, void **FieldPtr) {
return *FieldPtr;
}
Also, please don't forget to update docs/GarbageCollection.html and
LangRef.html
Thanks for the help, sorry I didn't mention this before. :)
-Chris
--
http://llvm.cs.uiuc.edu/
http://nondot.org/sabre/
More information about the llvm-dev
mailing list