<br><br><div class="gmail_quote">On Sun, Jul 29, 2012 at 7:56 AM, Mateusz Grotek <span dir="ltr">&lt;<a href="mailto:unoduetre@poczta.onet.pl" target="_blank">unoduetre@poczta.onet.pl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
I have the following 3 questions:<br>
1. Why there is ContextPart&gt;&gt;releaseTo: ? What will happen if I don&#39;t<br>
use it?<br></blockquote><div><br></div><div>releaseTo: simulates the effect of doing a method return from a block, i.e. when a return exits more than the top context.  It sends singleRelease to each context exited, which sets the pc and sender to nil (and nils the stack, but this is excess to requirements).  releaseTo: is actually used when a method return from a block encounters an unwind-protect and control passes up to the image to run the unwind.  You don&#39;t need to use it.  It is used automatically as part of running unwinds.  In what situation do you think you do need to use it?</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. Is there a bytecode editor for Squeak?<br></blockquote><div><br></div><div>See Marcus Denker&#39;s Opal compiler.  This contains an assembler.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

3. Are there any issues concerning bytecode editing, contexts, closures<br>
and compiled methods I should be aware of, which may break the<br>
image/create uncollectable garbage?<br></blockquote><div><br></div><div>Invalid methods can easily crash the image, so one has to be careful to create valid methods.  Both the Interpreter, and especially Cog, cache information related to methods to optimize execution.  One must be careful to flush the VM caches appropriately when changing methods that are in use.</div>
</div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>