Looks good to me. Thanks, Nicolas!<br><br><div class="gmail_quote">On Wed, Mar 2, 2011 at 3:12 PM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Oops, I always forget to select changes before filing out...<br>
<br>
Nicolas<br>
<br>
2011/3/3 Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Then attached proof of concept may work.<br>
><br>
> Nicolas<br>
><br>
> 2011/3/3 Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>>:<br>
>><br>
>><br>
>> On Wed, Mar 2, 2011 at 3:02 PM, Nicolas Cellier<br>
>> <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br>
>>><br>
>>> One dumb way would be to retain a copy of<br>
>>> originalSelector & originalArguments in MethodNode ivar at creation,<br>
>>> then let #ensureCanCascade: restore the originals.<br>
>><br>
>> I like this. Not at all dumb.<br>
>><br>
>>><br>
>>> Nicolas<br>
>>><br>
>>> 2011/3/2 Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>>:<br>
>>> ><br>
>>> ><br>
>>> > On Wed, Mar 2, 2011 at 1:52 PM, Juan Vuletich <<a href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>><br>
>>> > wrote:<br>
>>> >><br>
>>> >> Hi Eliot,<br>
>>> >><br>
>>> >> Thanks for caring!<br>
>>> >><br>
>>> >> The attached code fixed the case I reported first, but not this:<br>
>>> >><br>
>>> >> true ifTrue: [ 'was true' print ]; ifFalse: [ 'not true' print ]<br>
>>> ><br>
>>> > Does the second one have to be unoptimized? I guess that in this both<br>
>>> > are<br>
>>> > deoptimized right?<br>
>>> ><br>
>>> > true ifTrue: [ 'was true' print ]; ifFalse: [ 'not true' print ];<br>
>>> > yourself<br>
>>> >><br>
>>> >> Thanks,<br>
>>> >> Juan Vuletich<br>
>>> >><br>
>>> >> Eliot Miranda wrote:<br>
>>> >>><br>
>>> >>> Hi Juan,<br>
>>> >>><br>
>>> >>> I think the deoptimize-after-the-fact approach has no hope of<br>
>>> >>> working<br>
>>> >>> given the transformations for ifFalse:ifTrue: (swap arguments and<br>
>>> >>> transform<br>
>>> >>> to ifTrue:ifFalse:), ifNil:ifNotNil: et al. Better is to avoid<br>
>>> >>> transforming<br>
>>> >>> at all if in a cascade. So the attached is a start. It needs<br>
>>> >>> cleaning up,<br>
>>> >>> the older hack (ensureCanCascade:) removing and either all uses of<br>
>>> >>> receiver:selector:arguments:precedence:from:sourceRange: should use<br>
>>> >>> receiver:selector:arguments:precedence:from:sourceRange:canTransform:,<br>
>>> >>> or<br>
>>> >>> implement receiver:selector:arguments:precedence:from:sourceRange in<br>
>>> >>> terms<br>
>>> >>> of<br>
>>> >>> receiver:selector:arguments:precedence:from:sourceRange:canTransform.<br>
>>> >>> Anyway, test this and see how you get on.<br>
>>> >>><br>
>>> >>> cheers,<br>
>>> >>> Eliot<br>
>>> >>><br>
>>> >>> On Wed, Mar 2, 2011 at 11:46 AM, Juan Vuletich <<a href="mailto:juan@jvuletich.org">juan@jvuletich.org</a><br>
>>> >>> <mailto:<a href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>>> wrote:<br>
>>> >>><br>
>>> >>> Hi Folks,<br>
>>> >>><br>
>>> >>> <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> <mailto:<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br>
>>> >>><br>
>>> >>> Nicolas Cellier uploaded a new version of Compiler to project<br>
>>> >>> The Trunk:<br>
>>> >>> <a href="http://source.squeak.org/trunk/Compiler-nice.189.mcz" target="_blank">http://source.squeak.org/trunk/Compiler-nice.189.mcz</a><br>
>>> >>><br>
>>> >>> ==================== Summary ====================<br>
>>> >>><br>
>>> >>> Name: Compiler-nice.189<br>
>>> >>> Author: nice<br>
>>> >>> Time: 13 February 2011, 7:44:38.363 pm<br>
>>> >>> UUID: 3f6f02cd-1acf-48de-a388-b5ac55e27055<br>
>>> >>> Ancestors: Compiler-nice.188<br>
>>> >>><br>
>>> >>> Enable cascading of special messages by deoptimizing, thanks<br>
>>> >>> Eliot.<br>
>>> >>> This is mostly useless, but it removes an arbitrary limitation<br>
>>> >>> of the language.<br>
>>> >>><br>
>>> >>> =============== Diff against Compiler-nice.188 ===============<br>
>>> >>><br>
>>> >>> I integrated this nice code in Cuis, and tried:<br>
>>> >>><br>
>>> >>> true ifTrue: [ Transcript cr; show: 'was true' ]; yourself<br>
>>> >>><br>
>>> >>> I found that this works ok with the interpreter but does nothing<br>
>>> >>> in Cog. A bug, right?<br>
>>> >>><br>
>>> >>> Cheers,<br>
>>> >>> Juan Vuletich<br>
>>> >>><br>
>>> >>><br>
>>> >>><br>
>>> >>> ------------------------------------------------------------------------<br>
>>> >>><br>
>>> >>><br>
>>> >>><br>
>>> >>><br>
>>> >>> ------------------------------------------------------------------------<br>
>>> >>><br>
>>> >>> No virus found in this message.<br>
>>> >>> Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a> <<a href="http://www.avg.com" target="_blank">http://www.avg.com</a>><br>
>>> >>> Version: 10.0.1204 / Virus Database: 1435/3477 - Release Date:<br>
>>> >>> 03/02/11<br>
>>> >>><br>
>>> >><br>
>>> >><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
><br>
</div></div><br><br>
<br></blockquote></div><br>