<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">&lt;<a href="mailto:smalltalk@stefan-marr.de" target="_blank">smalltalk@stefan-marr.de</a>&gt;</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 &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
<br>
&gt; thanks, lovely. &nbsp;i already addressed the getSystemParameter: issue.<br>
<br>
</div>In the StackInterpreterSimulator, the various #run&hellip; 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. &nbsp;This would be really nice. &nbsp;But alas the stack zone must be alloca&#39;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&#39;t understand the code well enough to fix it. &nbsp;But it seems a false error. &nbsp;if you proceed through the inconsistent value errors the system keeps on running. &nbsp;Is there anyone out there who understands the BalloonPlugin well enough to fix it? &nbsp;I&#39;ve tweaked out some of the errors (and not broken anything) but it is not something I understand.</div>
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&nbsp; InterpreterStackPage initialize.<br>
&nbsp; StackInterpreterSimulator initializeWithOptions: Dictionary new.<br>
&nbsp; sim := StackInterpreterSimulator new.<br>
&nbsp; sim openOn: &#39;Pharo.image&#39;.<br>
&nbsp; sim openAsMorph.<br>
&nbsp; sim initStackPages.<br>
&nbsp; sim loadInitialContext.<br>
&nbsp; 1 to: 500 do: [:i |<br>
&nbsp; &nbsp; &nbsp; &nbsp; sim runForNBytes: 100000.<br>
&nbsp; &nbsp; &nbsp; &nbsp; 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&rsquo;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>