[gclist] GC FAQ & uncooperative environments
Marcin 'Qrczak' Kowalczyk
Thu, 10 Jul 2003 20:33:21 +0200
Dnia czw 10. lipca 2003 19:54, Fergus Henderson napisał:
> You don't need to resort to "almost legal C" to find pointers;
> if the C code is automatically generated by your compiler, then
> you can use strictly conforming standard C code to find all the
Well, I meant that the runtime in general is almost legal C. Violations of the
standard are not related to finding pointers.
For example I assume that there exists an integer type with the same alignment
constraints as a pointer (and thus don't bother to align those integers
differently than pointers), that structs consisting of pointers and such
integers can be aligned to pointer size, I don't care whether a pointer is
read from its representation using the same pointer type every time, I assume
that structs which contain only pointers have no padding, etc.
I bet this will work on all realistic platforms except those which have
different pointer representations depending on pointer type (Crays?).
And I will use GMP - perhaps the only *required* external library.
Another non-standard asumption is that many characters are significant
in external names, and that their case is distinguished. I.e. if the C
implementation has unreasonable restrictions here, programs using long
identifiers or identifiers which differ only in case may experience name
Other crimes are entirely optional, e.g. I plan to postprocess assembly output
of a C compiler replacing trampolined tail calls with direct jumps, and use
two global register variables on gcc.
__("< Marcin Kowalczyk