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

tim Rowledge tim at rowledge.org
Fri Jul 5 18:48:53 UTC 2013

On 04-07-2013, at 7:15 PM, "David T. Lewis" <lewis at mail.msen.com> wrote:

> 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. 

The weird part is that the initBytesPerWord: appears to be called correctly  the first time but still leaves those values undefined. When I restart and proceed from the buildCodeGenerator… it goes ok.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- One sandwich short of a picnic.

More information about the Vm-dev mailing list