search for: gc_read

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

2004 Jul 21
2
[LLVMdev] GC questions.
On Wed, 21 Jul 2004, Tobias Nurmiranta wrote: > > void *llvm_gc_read(void *ObjPtr, void **FieldPtr) { > > return *FieldPtr; > > } > > Hm, but doesn't FieldPtr need to be calculated target-specific in those > cases? For the field pointer, one could use the getelementptr instruction: %pairty = { sbyte, sbyte, int* } %pairPtr = ... %fi...
2004 Jul 21
0
[LLVMdev] GC questions.
...ta wrote: > > 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; > } Hm, but doesn't FieldPtr need to be calculated target-specific in those cases? My thoughts was that it's better to just have one pointer to the heap, and re...
2004 Jul 21
2
[LLVMdev] GC questions.
...d > 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/...
2004 Jul 21
0
[LLVMdev] GC questions.
Ok, that makes sense :). , Tobias On Wed, 21 Jul 2004, Chris Lattner wrote: > On Wed, 21 Jul 2004, Tobias Nurmiranta wrote: > > > void *llvm_gc_read(void *ObjPtr, void **FieldPtr) { > > > return *FieldPtr; > > > } > > > > Hm, but doesn't FieldPtr need to be calculated target-specific in those > > cases? > > For the field pointer, one could use the getelementptr instruction: > > %pairty = { s...
2004 Jul 22
2
[LLVMdev] GC questions.
...sic, which hides how the gcroots are implemented. , Tobias On Wed, 21 Jul 2004, Tobias Nurmiranta wrote: > > Ok, that makes sense :). > , Tobias > > On Wed, 21 Jul 2004, Chris Lattner wrote: > > > On Wed, 21 Jul 2004, Tobias Nurmiranta wrote: > > > > void *llvm_gc_read(void *ObjPtr, void **FieldPtr) { > > > > return *FieldPtr; > > > > } > > > > > > Hm, but doesn't FieldPtr need to be calculated target-specific in those > > > cases? > > > > For the field pointer, one could use the getelementptr i...