Jason Gloudon wrote: > ... By default both compilers align stack variables at their natural > alignment, so PMC pointers would normally fall on 4 byte boundaries. > > However, it is also possible that someone might save a PMC pointer to an > unaligned address on the stack (I can't imagine why). We could always say > "don't do that!" for performance reasons. So, this "someone" are we (parrot itself) + language extensions (PXS) which have to be compiled with the same compiler options, parrot is compiled with. Using packed structures with PMCs/Buffers inside is a strict "don't do that!". Now, given above rules and _if_ each machine parrot is running on, aligns a (PMC *)p at sizeof(PMC*) on the stack, we can safely define our {lo,hi}_var_ptrs as PMC** and just iterate the $stack_p++. If there are machines/compilers out there, that don't follow above rule, we put some #ifdefs in trace_system_stack for these. This part is too time critical to program for the LCD. leoThread Previous | Thread Next