On 20 March 2013 20:04, <[email protected]> wrote: > teeemcee > 2013-03-20 00:04:10 -0700 (Wed, 20 Mar 2013) > 818 > Fix Mac port; was broken by work for -gen gcc support. > > I mistakenly thought __FB_GCC__ is only defined when compiling with -gen gcc > but actually it's always defined to either 0 or 1. > > This caused the setjmp GOSUB hack to be used (on all platforms) instead of the > call/ret hack which we had been using. I hadn't realised it before, but the > setjmp GOSUB hack doesn't work on Mac because the tricky saving of the esp > register which the Mac port of FB's stack alignment hack uses is interfered > with by setjmp's register saving/loading. > > This patch goes back to using the call/ret hack as intended. > > I also made the same mistake with __FB_GCC__ in vector.bi, so the alternative > function declarations were always being used. And it turns out that the 'main' > declarations didn't work with a recent testcase, so I fixed that. > --- > U wip/config.bi > U wip/vector.bi > U wip/vectortest.bas
Changing which GOSUB implementation we are using right before a stable release concerns me a little, but really we're going back to the well tested (minus various reports of data corruption in the map editor which we've had over the years) implementation. And at least the setjmp hack got some testing (not sure if we've ever had it enabled before) and aside from the Mac port no one has complained. I want to switch from the fork of Mac port fork of FB 0.21 that we are using to FB 0.25 with -gen gcc. (FB 0.21 is getting quite old; this will allow us to use inheritance and polymorphism!) Now we know that we have to completely eradicate GOSUBs from the source to do that. We've got lots of GOSUBs remaining in the sprite editor, but I feel that cleaning those up is a waste of time, since I want to see the sprite editor rewritten for Chalcedony* anyway. *Because we've got lots of good names but only one release to make, I am going to cycle through codenames _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
