<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 6, 2015 at 10:38 AM, tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 06-06-2015, at 10:18 AM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Ha!  Turns out that at least for sends we&#39;re in the clear for out-of-line literal load.  i.e. from <a href="https://www.raspberrypi.org/forums/viewtopic.php?f=72&amp;t=78090" target="_blank">https://www.raspberrypi.org/forums/viewtopic.php?f=72&amp;t=78090</a><br>
<br>
</span>Excellent. So the only ‘fun’ is creating, managing and accessing the pools of out of line constants. Where should we place the pool though? My first thought was just in front of the ‘entry’ address but that would screw the assorted entry/nocheck offsets we have as constants. At the end, just before the metadata?<br></blockquote><div><br></div><div>The idea is to dump them somewhere inconspicuours.  The natural place is at the head of an else block, i.e. after an unconditional forward branch, or immediately following a return.  Here&#39;s Object&gt;&gt;printOn: as an example:</div><div><br></div><div>41 &lt;70&gt; self</div><div>42 &lt;C7&gt; send: class</div><div>43 &lt;D0&gt; send: name</div><div>44 &lt;69&gt; popIntoTemp: 1</div><div>45 &lt;10&gt; pushTemp: 0</div><div>46 &lt;88&gt; dup</div><div>47 &lt;11&gt; pushTemp: 1</div><div>48 &lt;D5&gt; send: first</div><div>49 &lt;D4&gt; send: isVowel</div><div>50 &lt;99&gt; jumpFalse: 53</div><div>51 &lt;23&gt; pushConstant: &#39;an &#39;</div><div>52 &lt;90&gt; jumpTo: 54</div><div><br></div><div>**put literals here**</div><div><br></div><div>53 &lt;22&gt; pushConstant: &#39;a &#39;</div><div>54 &lt;E1&gt; send: nextPutAll:</div><div>55 &lt;87&gt; pop</div><div>56 &lt;11&gt; pushTemp: 1</div><div>57 &lt;E1&gt; send: nextPutAll:</div><div>58 &lt;87&gt; pop</div><div>59 &lt;78&gt; returnSelf</div><div><br></div><div>**and put literals here**</div><div><br></div><div>The pushConstant: &#39;a &#39; at 53 is only reached from the jump at 50. So dumping literals after the jump at 52 is good, as is after the final return.</div><div><br></div><div>However, if code is jump-less and return-less and refers to lots of literals a jump past a run of literals can be inserted as an emergency measure.</div><div><br></div></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>