[Vm-dev] ObjectMemory>initBytesPerWord: not called correctly

David T. Lewis lewis at mail.msen.com
Fri Jul 5 02:15:03 UTC 2013


On Thu, Jul 04, 2013 at 05:01:46PM -0700, tim Rowledge wrote:
> 
> Whilst getting back to generating sources to make the stack vm for Pi, I stumbled across this problem; during VMMaker>generateInterpreterFile the #buildCodeGeneratorForInterpreter method did not result in initBytesPerWord: running. Thus when actually generating code for ObjectMemory>byteSwapped: which uses Byte3ShiftNegated we get a dNu because Byte3ShiftNegated is actually nil.
> 
> It's a bit of a rat's nest in there these days so following the code is a bit tricky. In the debugger at VMMaker>generateInterpreterFile I did a restart and went to trace things but it then actually did the job perfectly. Weird. Anybody else been bitten?
> 
> I'm using VMMaker.oscog-tpr.301
> 

ObjectMemory class>>initBytesPerWord: is obsolete in VMM trunk. I have not encountered
the error you describe in the oscog branch, but I would expect that if you reinitialize
the ObjectMemory et al, then all will be well. Many of the VMM class constants have been
moved into pool variables, and I have occasionally seen issues with these not being
initialized properly, so maybe you are seeing that sort of problem.

Dave



More information about the Vm-dev mailing list