<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 10, 2018 at 7:24 PM, tim Rowledge <span dir="ltr"><<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
<br>
> On 10-03-2018, at 4:27 AM, Clément Bera <<a href="mailto:bera.clement@gmail.com">bera.clement@gmail.com</a>> wrote:<br>
><br>
> Another thing you can do is to simulate the simulator itself, so you can look at the code, the execution from the outside and from the inside at the same time. See picture below<br>
><br>
> | cos |<br>
> cos := StackInterpreterSimulator newWithOptions: #(ObjectMemory Spur32BitMemoryManager).<br>
> cos desiredNumStackPages: 8.<br>
> cos openOn: 'SpurVMMaker.image'.<br>
> cos systemAttributes<br>
>               at: 2 put: '-doit';<br>
>               at: 3 put:      '| cos |<br>
> cos := StackInterpreterSimulator newWithOptions: #(ObjectMemory Spur32BitMemoryManager).<br>
> cos desiredNumStackPages: 8.<br>
> cos openOn: ''SpurVMMaker.image''.<br>
> cos openAsMorph; run'.<br>
><br>
> cos openAsMorph; run<br>
<br>
</span>That is rather more than a little bit cool. Even more fun - make one of the simulators be using the ARM cpu sim so you can simulate the simulation of simulating a different cpu whilst debugging the debugger debugger simulation. Or something like that; easy to get lost in the mirrors.<br>
<span class=""><br></span></blockquote><div><br></div><div>I tried, but primitiveNewCPU cannot be simulated, hence you can simulate only a StackVMSimulator ;-).</div><div><br></div><div>It takes a few hours to open inside the simulator window though.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
</span>Strange OpCodes: PBT: Prune Binary Tree<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="font-size:12.8px">Clément Béra</span><div style="font-size:12.8px">Pharo consortium engineer</div><span style="color:rgb(0,0,238)"><a href="https://clementbera.github.io/" target="_blank">https://clementbera.github.io/</a></span><div style="font-size:12.8px"><a href="https://clementbera.wordpress.com/" target="_blank">https://clementbera.wordpress.com/</a><br></div><div style="font-size:12.8px"><span style="line-height:16px">Bâtiment B 40, avenue Halley 59650 </span><span style="font-weight:bold;line-height:16px">Villeneuve d'Ascq</span></div></div></div></div></div>
</div></div>