<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Nicolas. :-)<div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">What Eliot is saying is simply that we should call a spade a spade.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Ah, right. I was wondering whether #sendsMessage: can make sense in CompiledCode or should be deprecated as Eliot suggested.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">There are the following classes in Squeak:</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Symbol</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">- can be a selector</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Message</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">- only appears via MNU?</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">- has no receiver stored because MNU callback has "self"</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">MessageSend</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">- like Message but no lookupClass</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">- has receiver stored</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">- alternative to simple BlockClosure such as [:arg | object foo: arg] </span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">CompiledCode (or CompiledMethod)</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">- has all the instructions</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">***</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Having a look at SystemNavigation >> #allSentMessagesWithout:, I wondered how to distinguish "symbol" from "selector" ... and there is also "messages" in the text. Sigh. ... some confusion going on there. :-)</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">... MethodFinder >> #findMessage ... then better called #findSelector ?! ... :-)</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 12.12.2019 11:27:49 schrieb Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr"><div>Hi Marcel, of course you already know all this :)<br></div><div>a message is composed of a receiver, a selector and arguments.</div><div>a (Compiled)Method holds the instructions to be executed in response to a message.</div><div>The methods are stored by object class (and superclasses...) in methodDictionary.</div><div>In response to a message, the appropriate method is selected by the receiver by looking up for the message selector in methodDictionary.</div><div>The instructions consist mostly of pushing/popping objects between the stack and object slots or method args/temps, and sending messages.</div><div><br></div><div>What Eliot is saying is simply that we should call a spade a spade.</div><div>So one could expect (self sendMessage: aMessage), (self sendSelector: aSelector), but not (self sendMessage: aSelector) nor (self sendSelector: aMessage).<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 12 déc. 2019 à 09:10, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex;border-left: 1px solid rgb(204,204,204);padding-left: 1ex;min-width: 500px"><div><div id="gmail-m_8645308190988709553__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)">
                                        Hi Eliot,<div><br></div><div>how would you define selector, message, (message) send, and method? It seems like a "message" is a very high-level concept. Selectors and methods seem to be more on the implementation side and thus the right names to use for such reflection over compiled code.</div><div><br></div><div>Project >> #addDeferredUIMessage:</div><div>CompiledCode >> #abstractBytecodeMessageAt:</div><div>SystemNavigation >> #allSentMessages</div><div>...</div><div><br></div><div>Best,</div><div>Marcel</div><div></div><blockquote type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 11.12.2019 20:50:30 schrieb <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">A new version of Kernel was added to project The Inbox:<br><a href="http://source.squeak.org/inbox/Kernel-eem.1285.mcz" target="_blank">http://source.squeak.org/inbox/Kernel-eem.1285.mcz</a><br><br>==================== Summary ====================<br><br>Name: Kernel-eem.1285<br>Author: eem<br>Time: 11 December 2019, 11:50:19.928718 am<br>UUID: 3dce70bd-9166-47fe-a86f-22456db9845a<br>Ancestors: Kernel-mt.1284<br><br>Commit my own take on sendsSelector: vs sendsMessage:, and selectorsDo: vs messagesDo:.  IMNERHO sendsMessage: messagesDo: are *wrong*!! :-)  c.f. Behavior>>selectorsDo:<br><br>=============== Diff against Kernel-mt.1284 ===============<br><br>Item was changed:<br>  ----- Method: CompiledCode>>messagesDo: (in category 'scanning') -----<br>  messagesDo: workBlock<br>+  "Evaluate aBlock with all the message selectors sent by me. Duplicate seletors are possible."<br>-      "Evaluate aBlock with all the message selectors sent by me. Duplicate sends possible."<br>  <br>+         "If anything should be deprecated it is messagesDo:; it can be an extension in AST/Refactoring.<br>+          This method enumerates over selectors, not messages.  c.f. Behavior>>selectorsDo: etc"<br>+   ^self selectorsDo: workBlock!<br>-        | scanner selector  |<br>-        self isQuick ifTrue: [^ self].<br>-       <br>-     self codeLiteralsDo: [:compiledCode | <br>-               scanner := InstructionStream on: compiledCode.<br>-               scanner scanFor: [ :x | <br>-                     (selector := scanner selectorToSendOrSelf) == scanner<br>-                                ifFalse: [workBlock value: selector].<br>-                        false "keep scanning" ] ].!<br><br>Item was added:<br>+ ----- Method: CompiledCode>>selectorsDo: (in category 'scanning') -----<br>+ selectorsDo: workBlock<br>+  "Evaluate aBlock with all the message selectors sent by me. Duplicate seletors are possible."<br>+ <br>+  self isQuick ifTrue: [^self].<br>+        <br>+     self codeLiteralsDo:<br>+                 [:compiledCode | | scanner |<br>+                 (scanner := InstructionStream on: compiledCode) scanFor:<br>+                     [:x| | selector |<br>+                    (selector := scanner selectorToSendOrSelf) ~~ scanner ifTrue:<br>+                                [workBlock value: selector].<br>+                         false "keep scanning"]]!<br><br>Item was changed:<br>  ----- Method: CompiledCode>>sendsMessage: (in category 'testing') -----<br>+ sendsMessage: aSelector<br>+  "eem: this should be deprecated. This method does not check if a method sends a message;<br>+         it checks if a method sends a message with a particular selector."<br>+     self flag: #todo.<br>- sendsMessage: aSelector <br>-        <br>      self messagesDo: [:selector |<br>                 selector = aSelector ifTrue: [^ true]].<br>       ^ false!<br><br>Item was changed:<br>  ----- Method: CompiledCode>>sendsSelector: (in category 'testing') -----<br>  sendsSelector: aSelector <br>+         "Answer if the receiver sends a message whose selector is aSelector."<br>  <br>+  self selectorsDo:<br>+            [:selector | selector = aSelector ifTrue: [^true]].<br>+  ^false!<br>-      self flag: #todo. "mt: Deprecate? AST/Refactoring project needs it..."<br>-     ^ self sendsMessage: aSelector!<br><br><br></div></blockquote>
                                        </div></div><br>
</blockquote></div>
</div></blockquote></div>