<div dir="ltr">Hi Tobias,<div><br></div><div>    it&#39;s potentially a tricky issue for the RPython VM.  I finally fixed the source of the issues with the BalloonPlugin under simulation.  Bastian had changed it from</div><div><br></div><div><div>BalloonEngineSimulation&gt;&gt;#loadWordTransformFrom: transformOop into: destPtr length: n</div><div><span class="" style="white-space:pre">        </span>&quot;Load a float array transformation from the given oop&quot;</div><div><br></div><div><span class="" style="white-space:pre">        </span>| srcPtr wordDestPtr |</div><div><br></div><div><span class="" style="white-space:pre">        </span>false ifTrue:</div><div><span class="" style="white-space:pre">                </span>[^super loadWordTransformFrom: transformOop into: destPtr length: n].</div><div><br></div><div><span class="" style="white-space:pre">        </span>srcPtr := interpreterProxy firstIndexableField: transformOop.</div><div><span class="" style="white-space:pre">        </span>wordDestPtr := destPtr as: CArrayAccessor.  &quot;Remove float conversion shell&quot;</div><div><span class="" style="white-space:pre">        </span>0 to: n-1 do: [:i | wordDestPtr at: i put: (srcPtr floatAt: i)]</div></div><div><br></div><div>to</div><div><br></div><div><div>BalloonEngineSimulation&gt;&gt;#loadWordTransformFrom: transformOop into: destPtr length: n </div><div><span class="" style="white-space:pre">        </span>&quot;Load a float array transformation from the given oop&quot;</div><div><span class="" style="white-space:pre">        </span>| srcPtr wordDestPtr |</div><div><span class="" style="white-space:pre">        </span>false</div><div><span class="" style="white-space:pre">                </span>ifTrue: [^ super</div><div><span class="" style="white-space:pre">                                </span>loadWordTransformFrom: transformOop</div><div><span class="" style="white-space:pre">                                </span>into: destPtr</div><div><span class="" style="white-space:pre">                                </span>length: n].</div><div><span class="" style="white-space:pre">        </span>srcPtr := interpreterProxy firstIndexableField: transformOop.</div><div><span class="" style="white-space:pre">        </span>wordDestPtr := destPtr as: CArrayAccessor.</div><div><span class="" style="white-space:pre">        </span>&quot;Remove float conversion shell&quot;</div><div><span class="" style="white-space:pre">        </span>0 to: n - 1</div><div><span class="" style="white-space:pre">                </span>do: [:i | wordDestPtr at: i put: (srcPtr floatAt: i) asIEEE32BitWord]</div></div><div><br></div><div>i.e. he changed</div><div><span style="white-space:pre">                </span>wordDestPtr at: i put: (srcPtr floatAt: i)<br></div><div>to</div><div><span style="white-space:pre">                </span>wordDestPtr at: i put: (srcPtr floatAt: i) asIEEE32BitWord<br></div><div><br></div><div>This breaks some hidden optimization in the simulator where a BalloonArray has a handle on the &quot;object&quot; in the memory array and a cache of object values in a parallel simArray.  Unless the simArray&#39;s values correctly mirror those in the underlying heap object in the simulator&#39;s byte array, there are errors in the BalloonPluginSimulation.  I finally fixed these today, changing Bastian&#39;s code to</div><div><br></div><div><div>BalloonEngineSimulation&gt;&gt;#loadWordTransformFrom: transformOop into: destPtr length: n </div><div><span class="" style="white-space:pre">        </span>&quot;Load a float array transformation from the given oop&quot;</div><div><span class="" style="white-space:pre">        </span>| srcPtr |</div><div><span class="" style="white-space:pre">        </span>srcPtr := interpreterProxy firstIndexableField: transformOop.</div><div><span class="" style="white-space:pre">        </span>&quot;Use BalloonArray&#39;s float conversion shell.  It stores both the float bits into</div><div><span class="" style="white-space:pre">        </span> the heap object, and the float object into the simArray.  This is needed for</div><div><span class="" style="white-space:pre">        </span> correct simulation, otherwise there will be errors in BalloonArray&gt;&gt;floatAt:&quot;</div><div><span class="" style="white-space:pre">        </span>0 to: n - 1 do: [:i| destPtr at: i put: (srcPtr floatAt: i)]</div></div><div><br></div><div>i.e. nuking the unneeded &quot;wordDestPtr := destPtr as: CArrayAccessor.&quot; and changing the code to not send asIEEE32BitWord it the float ti be stored, because this is done inside the BalloonArray that is referred to via destPtr.</div><div><br></div><div>So.  I&#39;m strongly confident my code above is correct for simulation but it may break the Python VM.  If it does then I think the RPython VM needs to avoid conflict with simulation subclasses of plugins, such as the BalloonEngineSimulation subclass of BalloonEnginePlugin, e.g. by using a subclassing naming scheme such as BalloonEngineForRPython or some such.  The simulator needs to work :-).</div><div><br></div><div>Hope this makes sense.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 30, 2015 at 2:12 PM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.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,<br>
<br>
On 30.09.2015, at 22:57, Balázs Kósi &lt;<a href="mailto:kosi.balazs@ezomer.hu">kosi.balazs@ezomer.hu</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; It&#39;s not me. Most probably you are looking for Bastian Kruck: <a href="http://www.bkruck.de/" rel="noreferrer" target="_blank">http://www.bkruck.de/</a><br>
&gt; ​<br>
<br>
Yes, It is Bastian. He worked on this stuff earlier this year, So Eliot, you<br>
can also talk to Tim or me on that matter :)<br>
<br>
Best regards<br>
<span class="HOEnZb"><font color="#888888">        -Tobias<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div>