<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Marcel,<div dir="ltr"><br>On Jun 27, 2019, at 12:31 AM, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Eliot,<div><br></div><div>thanks for the reply. :-) </div><div><br></div><div>Do you think we need a way to not decend into Array literals and Pragmas *but* CompiledCode (i.e., SistaV1)? At the time of writing, my changeset offers #allLiteralsDo: to go all the way down and #literalsDo: to just enumerate the stuff between header and first bytecode.</div></div></div></blockquote><div><br></div>I don’t think we need a way not to descend.  The only circumstance I can think of where this would be essential is if someone constructed a recursive array literal.  Given that that’s not something that arises in everyday code, that large deeply nested array Kieran’s are few and far between and that contemporary performance is good I’d say that keeping it simple outweighs carrying the weight of a thorough: parameter, especially given all the extra machinery needed to support the two bytecode sets.<div><br><blockquote type="cite"><div dir="ltr"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000"><div><br></div><div>Best,</div><div>Marcel</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 27.06.2019 00:42:03 schrieb Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Marcel,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 24, 2019 at 5:32 AM Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex;border-left-width: 1px;border-left-style: solid;border-left-color: rgb(204,204,204);padding-left: 1ex;min-width: 500px"><div id="gmail-m_-8297468213761953301__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)">
                                        
                                        
                                            
                                        
                                        
                                        Hi all,<div><br></div><div>next round. Please find attached a changeset:</div></div></blockquote><div><br></div><div>thanks.  Sorry to be late to this party.</div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex;border-left-width: 1px;border-left-style: solid;border-left-color: rgb(204,204,204);padding-left: 1ex;min-width: 500px"><div id="gmail-m_-8297468213761953301__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)"><div><br></div><div>- senders browsing is only slightly slower but *thorough* all the time</div></div></blockquote><div><br></div><div>I think that's safe.  Thorough might be retained as a way of not descending into Array literals and Pragmas.  But if you're happy that we always traverse these (and avoid being caught by recursion in circular strucutres0 THEN FINE.</div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex;border-left-width: 1px;border-left-style: solid;border-left-color: rgb(204,204,204);padding-left: 1ex;min-width: 500px"><div id="gmail-m_-8297468213761953301__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)"><div>- #hasLiteral: now also works for #>= and other special literals, even though not enumerable</div><div>- #literalsDo: enumerates the *raw* literals (for copy etc.) in that byte array (i.e. after header, before first byte code)</div><div>- #allLiteralsDo: enumerates the *real* literals, that is, it is thorough but skips special objects such as outer scope, method selector, and class binding -- (for #hasLiteral:, tools etc.)</div><div><br></div><div><span style="font-size: 13.3333px">I just thought about writing some tests for it but those would have to account for V3 vs. SistaV1. Hmmm... maybe just tests for #hasLiteral: and #allLiteralsDo:. Not that low-level #literalsDo:.</span></div></div></blockquote><div><br></div><div>Alas yes.  ut there are some prototype tests you can use.  See LiteralRefLocatorTest.  These tests compile two versions of each tested method, in the primary and secondary bytecode sets.  So if you start there you'll find that testing both V3PlusClosures and SistaV1 is taken care of.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex;border-left-width: 1px;border-left-style: solid;border-left-color: rgb(204,204,204);padding-left: 1ex;min-width: 500px"><div id="gmail-m_-8297468213761953301__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)"><div><br></div><div>Best,</div><div>Marcel</div><div class="gmail-m_-8297468213761953301mb_sig"></div>
                                        
                                        <blockquote class="gmail-m_-8297468213761953301history_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:rgb(170,170,170);margin-top:10px">Am 24.06.2019 11:27:31 schrieb Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="gmail-m_-8297468213761953301__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)">
                                        Hi Nicolas,<div><br></div><div>thanks. :-) That's correct. It's an extension to high-level test and enumeration. I just discovered that I have to integrate (or update) CompiledCode >> #refersTo:bytecodeScanner:thorough: to respect those special selectors.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="gmail-m_-8297468213761953301mb_sig"></div><blockquote class="gmail-m_-8297468213761953301history_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:rgb(170,170,170);margin-top:10px">Am 24.06.2019 10:56:21 schrieb Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr"><div>Hi Marcel,</div><div>beware, there are specialSelectors and inlined selectors too (do: ifTrue: etc...), so it might happen that low level literals enumeration does not fit higher level...<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 24 juin 2019 à 10:48, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex;border-left-width: 1px;border-left-style: solid;border-left-color: rgb(204,204,204);padding-left: 1ex;min-width: 500px"><div id="gmail-m_-8297468213761953301gmail-m_8493271781242486928__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)">
                                        
                                        
                                            
                                        
                                        
                                        Hi, there.<div><br></div><div>Please find attached a new version of this refactoring.</div><div><br></div><div>I discovered more recent code for scanning literals (that seems to be at the <b>bytecode</b> level, not <b>object</b> level):</div><div><br></div><div>BytecodeEncoder class >> #scanBlockOrNilForLiteral:</div><div><span style="font-size: 13.3333px">EncoderForSistaV1 class >> #scanBlockOrNilForLiteral:</span></div><div><span style="font-size: 13.3333px">EncoderForV3 class >> #scanBlockOrNilForLiteral:</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">However, I could not see a way to <b>enumerate</b> literals this way. Did I miss something? Makes me wonder about the entire use of CompiledCode >> #literalsDo:. We could replace #hasLiteral: with an implementation similar to Behavior >> #whichSelectorsreferTo:thorough: using #scanBlockOrNilForLiteral:.</span></div><div><br></div><div><img width="auto" src="cid:"></div><div><br></div><div><span style="font-size: 13.3333px;line-height: 20px">Thoughts? Eliot? :-) How is the conceptional relationship between "has literal" and "literals do"?</span></div><div><span style="font-size: 13.3333px;line-height: 20px"><br></span></div><div><span style="font-size: 13.3333px;line-height: 20px">Best,</span></div><div><span style="font-size: 13.3333px;line-height: 20px">Marcel</span></div><div class="gmail-m_-8297468213761953301gmail-m_8493271781242486928mb_sig"></div>
                                        
                                        <blockquote class="gmail-m_-8297468213761953301gmail-m_8493271781242486928history_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:rgb(170,170,170);margin-top:10px">Am 28.05.2019 14:49:59 schrieb Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="gmail-m_-8297468213761953301gmail-m_8493271781242486928__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)">Hi, there.<div class="gmail-m_-8297468213761953301gmail-m_8493271781242486928mb_sig"></div><div><br></div><div>Please find attached a change set that (tries to) clean up everything related to enumerating or testing literals in CompiledCode, CompiledMethod, and CompiledBlock.</div><div><br></div><div>I have three important questions:</div><div><br></div><div>- The purpose of #hasLiteralThorough is not needed anymore because we enumerate and test always in a "thorough" way?</div><div><span style="font-size: 10pt;line-height: 1.5">- Are the enumeration boundaries in CompiledCode, CompiledMethod, CompiledBlock in #literalsDo: correct?</span></div><div><span style="font-size: 10pt;line-height: 1.5">- What is a literal as expected in #hasLiteral: etc. to answer true? Just symbols or also bindings (symbol-to-class) and classes themselves?</span></div><div><span style="font-size: 10pt;line-height: 1.5"><br></span></div><div><span style="font-size: 10pt;line-height: 1.5">Try exploring this result: "(Morph >> #fullDrawOn:) literals" or similar.</span></div><div><br></div><div><img width="auto" src="cid:"></div><div><br></div><div>Best,</div><div>Marcel</div></div></div></blockquote></div><br>
</blockquote></div>
</div></blockquote>
                                        </div></div></blockquote></div><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size: 10pt;border-collapse: separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div>
</div></blockquote></div></div></blockquote><blockquote type="cite"><div dir="ltr"><span></span><br></div></blockquote></div></body></html>