2 Aug 2012 00:10
Re[7]: [Gc] cc under mac os x
Hi Hans and Daniel, You're right. Done another commit (a group of). Please check it once more. I finally realized that GC_approx_sp not only clarifies but also fixes (this is not related to compiler optimizations) the algorithm of GC_clear_stack_inner for STACK_GROWS_UP case. Regards, Ivan Wed, 1 Aug 2012 17:12:23 +0000 "Boehm, Hans" <hans.boehm@...>: > Ivan - > > > > Since it's the address, and not the value of dummy that's used, I wouldn't have expected that to have any impact. I think that switching to GC_approx_sp() clarifies the code and avoids the problem. It does so at a tiny performance cost, but I doubt that's ever noticeable. > > > > I didn't look carefully at the other changes, but I think they have similar issues. I don't see how volatile helps either. The problem here is that I think C officially disallows comparisons of pointers to different objects. Hence GC_clear_stack() doesn't play by the rules. But so long as the compiler doesn't know where the pointers are coming from, it has to generate the expected code, and things will work. > > > > An alternative would be to write more of this in assembly code, but that's a pain to maintain.(Continue reading)
RSS Feed