<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Nicolas,<br><br></div><div><br>On May 22, 2017, at 5:04 AM, Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-05-19 15:16 GMT+02:00 Rein, Patrick <span dir="ltr"><<a href="mailto:Patrick.Rein@hpi.de" target="_blank">Patrick.Rein@hpi.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Regarding the headerFlagForEncoder: method: I only wanted to make the </p>
<p>code easier to understand. I have no experience with the CompiledCode </p>
<p>and Encoder classes and did not want to break anything there.<br>
</p>
<p><br></p></div></blockquote><div>Nevermind, I overlooked the code.<br>There is no other way than isKindOf: because PrimaryBytecodeSetEncoderClass is a class variable that can be changed dynamically to point to another BytecodeEncoder class.<br></div><div>If we would want to support doing it by message sending, it would mean compiling and installing/uninstalling messages like isPrimaryEncoderClass dynamically.<br></div><div>Overkill.<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif"><p>
</p>
<p>Regarding the two commits: I should have ignored the change... I have now<br>
</p>
<p>moved the commit in the Inbox to the Treated Inbox. The change is still<br>
</p>
<p>open for discussion though :)​<br></p></div></blockquote></div></div></div></div></blockquote><div><br></div>One alternative would be to add a class instance variable to BytecodeEncoder and arrange that <div>- whenever the bytecode encoder classes are changed</div><div>- whenever a subclass of <span style="background-color: rgba(255, 255, 255, 0);">BytecodeEncoder is added</span></div><div>the variable is updated.</div><div><br></div><div>Better would be for the accessor to be lazy.  Then when a different t encoder class is installed all we do is flush the inst var in <span style="background-color: rgba(255, 255, 255, 0);">BytecodeEncoder and all its subclasses.</span></div><div><br></div><div>I do hate isKindOf: :-)</div><div><br></div><div><blockquote type="cite"> <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I have this selector in all my images for 30 years or so, if we think of biased as disqualified, I'm disqualified ;) </span></blockquote><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif"><p>
</p>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div id="gmail-m_3420290911782016358divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.<wbr>squeakfoundation.org</a>> on behalf of Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@<wbr>gmail.com</a>><br>
<b>Sent:</b> Friday, May 19, 2017 14:32<br>
<b>To:</b> The general-purpose Squeak developers list<br>
<b>Subject:</b> Re: [squeak-dev] The Trunk: Kernel-pre.1105.mcz</font>
<div> </div>
</div><div><div class="gmail-h5">
<div>
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">2017-05-19 14:22 GMT+02:00 <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Patrick Rein uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-pre.1105.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk<wbr>/Kernel-pre.1105.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-pre.1105<br>
Author: pre<br>
Time: 19 May 2017, 2:22:29.00196 pm<br>
UUID: 7e22498c-7586-584c-a2a9-81331c<wbr>572590<br>
Ancestors: Kernel-pre.1104<br>
<br>
Removes a redundancy in CompiledCode.<br>
<br>
=============== Diff against Kernel-nice.1103 ===============<br>
<br>
Item was changed:<br>
  ----- Method: CompiledCode class>>headerFlagForEncoder: (in category 'method encoding') -----<br>
  headerFlagForEncoder: anEncoder<br>
-       anEncoder class == PrimaryBytecodeSetEncoderClass ifTrue:<br>
-               [^0].<br>
-       anEncoder class == SecondaryBytecodeSetEncoderCla<wbr>ss ifTrue:<br>
-               [^SmallInteger minVal].<br>
        "This allows subclasses for compiler variants such as the ScriptEncoder in EToys<br>
         to continue to function."<br>
+       (anEncoder isKindOf: PrimaryBytecodeSetEncoderClass<wbr>) ifTrue:<br>
-       (anEncoder class inheritsFrom: PrimaryBytecodeSetEncoderClass<wbr>) ifTrue:<br>
                [^0].<br>
+       (anEncoder isKindOf: SecondaryBytecodeSetEncoderCla<wbr>ss) ifTrue:<br>
-       (anEncoder class inheritsFrom: SecondaryBytecodeSetEncoderCla<wbr>ss) ifTrue:<br>
                [^SmallInteger minVal].<br>
        self error: 'The encoder is not one of the two installed bytecode sets'!<br>
<br>
</blockquote>
<div>Then why not send a message back to anEncoder?<br>
</div>
<div>Way more efficient than testing classes sequentially and recursively...<br>
</div>
<div> <br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Item was added:<br>
+ ----- Method: Number>>** (in category 'mathematical functions') -----<br>
+ ** aNumber<br>
+<br>
+       ^ self raisedTo: aNumber!<br>
<br>
</blockquote>
<div>Above change can't both be waiting in inbox and be commited to trunk <br>
</div>
</div>
<br>
</div>
</div>
</div>
</div></div></div>
</div>

<br><br>
<br></blockquote></div><br></div></div>
</blockquote><blockquote type="cite"><div><span></span><br></div></blockquote></div></body></html>