[Vm-dev] [squeak-dev] VM 4.4 build nastinesses - part 1 of probably many

tim Rowledge tim at rowledge.org
Thu Feb 14 02:59:22 UTC 2013


The Tale of Two Schmott Guyz vid Reeely Big Hatz[1]

A Long Time Ago… I had to do a hack on the RISC OS file plugin code to keep careful track of the open files, and make sure that the insane habit Squeak has of opening a file several times could be faked adequately. To do this I keep a table of full filenames and relevant details, and keep the filePtr for each individual filestream in the SQFile structs 'lastOp' field. You won't be surprised that a typical filePtr needs to be at least 32bit.

A while ago another Schmott Guy decided to clean up the SQFile struct to save a few bytes, including making the lastOp field a char instead of int. You can see where this is leading, right? So I recompile FilePlugin for the 4.4 level VMMaker code, where I assume the use of lastOp. But it's a char in the new FilePlugin.h version so the compiler nicely truncates my nice 32bit number to 8bits. And when the browser wanted some method source at say position 524 it actually got to point to byte 12. 

So for now I've simply special cased the SQFile struct layout for ACORN but if someone can suggest a cleaner implementation I'd be thrilled.

tim
[1] Read The Girl Genius http://www.girlgeniusonline.com/comic.php if you don't already.
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Nice computers don't go down.




More information about the Vm-dev mailing list