<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 4:35 AM, Stefan Marr <span dir="ltr"><<a href="mailto:smalltalk@stefan-marr.de" target="_blank">smalltalk@stefan-marr.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Eliot:<br>
<div class="im"><br>
On 13 Feb 2014, at 21:04, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
<br>
> thanks, lovely. i already addressed the getSystemParameter: issue.<br>
<br>
</div>In the StackInterpreterSimulator, the various #run… methods do unconditionally the initialization of stack pages and initial context.<br>
This looks wrong to me, especially since the comment of #runForNBytes: says that I should be able to use it repeatedly.<br>
I would move the initialization to #initializeInterpreter: in StackInterpreterSimulator and remove it from all the run methods. See [1].<br></blockquote><div><br></div><div>I agree. This would be really nice. But alas the stack zone must be alloca'ed when first entering the interpreter :-(.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So, with all latest changes the code below gives you a StackInterpreterSimulator that executes the latest Pharo images.<br>
Until it runs into inconsistent values in the BalloonEngineSimulation. But for many cases this should already be more than sufficient.<br></blockquote><div><br></div><div>I see this occasionally and don't understand the code well enough to fix it. But it seems a false error. if you proceed through the inconsistent value errors the system keeps on running. Is there anyone out there who understands the BalloonPlugin well enough to fix it? I've tweaked out some of the errors (and not broken anything) but it is not something I understand.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> InterpreterStackPage initialize.<br>
StackInterpreterSimulator initializeWithOptions: Dictionary new.<br>
sim := StackInterpreterSimulator new.<br>
sim openOn: 'Pharo.image'.<br>
sim openAsMorph.<br>
sim initStackPages.<br>
sim loadInitialContext.<br>
1 to: 500 do: [:i |<br>
sim runForNBytes: 100000.<br>
World doOneCycleNow ].<br>
<br>
At the moment, there seem to be strange interactions going on between the simulator and the rest of the system.<br>
At least using `[sim run] fork` doesn’t work properly, and I suppose until the event handling is fixed #run will not work completely either.<br>
<br>
Please note, all changes I did is merely fixing bit rot, nothing really broken.<br>
I assume that the BalloonEngine issue would take a little more to debug, but I am not sure what it is in the first place. So interested parties could try it comment.<br>
<br>
<br>
Best regards<br>
Stefan<br>
<br>
[1] <a href="https://github.com/smarr/pharo-vm/commit/114f5b3db0ff2185ca5eac0d033eb95b99f524cb" target="_blank">https://github.com/smarr/pharo-vm/commit/114f5b3db0ff2185ca5eac0d033eb95b99f524cb</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
Stefan Marr<br>
INRIA Lille - Nord Europe<br>
<a href="http://stefan-marr.de/research/" target="_blank">http://stefan-marr.de/research/</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>