[Vm-dev] About SQFile's fileSize field

tim Rowledge tim at rowledge.org
Wed Oct 11 21:00:35 UTC 2017

> On 11-10-2017, at 1:40 PM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> I went ahead a bit, removed the field, updated the sources, and compiled a VM with the changes. It works fine on linux. I've updated the windows and mac files too, but I can't test those.
> There are some remaining references to the removed field in the RiscOS platforms file, but I don't really know what to do with that. The code seems to be using platform specific calls to implement the plugin, which is unusual, but may be more efficient than the generic C implementation.

It’s been a while since I had to write that code but it was a complete replacement for the plugin C code. Part of the problem is/was the use of separate position and read/write steps that I found could happen interleaved in some places thus writing complete nonsene into changes files etc. Part of it was the copying of file IDs and expecting that you could always read and write properly. So I had to implement an entire layer above the RISC OS file handling to track file opening/closing and … etc etc. The good news is nobody (and surprisingly quite a few people used Squeak on RISC OS) ever found a single bug.

Anyway, more to the point, I vaguely recall that I had to (ab)use the size field for something or other. 

Ah, nope, it was the lastOp field according to the comments in the C code. Wow, comments in C code - who’d ever expect that?

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: DNPG: Do Not Pass Go

More information about the Vm-dev mailing list