On Wed, Mar 2, 2011 at 1:52 PM, Juan Vuletich <juan@jvuletich.org> wrote:
Hi Eliot,

Thanks for caring!

The attached code fixed the case I reported first, but not this:

true ifTrue: [ 'was true' print ]; ifFalse: [ 'not true' print ]

Does the second one have to be unoptimized?  I guess that in this both are deoptimized right?
 
true ifTrue: [ 'was true' print ]; ifFalse: [ 'not true' print ]; yourself


Thanks,
Juan Vuletich

Eliot Miranda wrote:
Hi Juan,

    I think the deoptimize-after-the-fact approach has no hope of working given the transformations for ifFalse:ifTrue: (swap arguments and transform to ifTrue:ifFalse:), ifNil:ifNotNil: et al.  Better is to avoid transforming at all if in a cascade.  So the attached is a start.  It needs cleaning up, the older hack (ensureCanCascade:) removing and either all uses of receiver:selector:arguments:precedence:from:sourceRange: should use receiver:selector:arguments:precedence:from:sourceRange:canTransform:, or implement receiver:selector:arguments:precedence:from:sourceRange in terms of receiver:selector:arguments:precedence:from:sourceRange:canTransform.  Anyway, test this and see how you get on.

cheers,
Eliot

On Wed, Mar 2, 2011 at 11:46 AM, Juan Vuletich <juan@jvuletich.org <mailto:juan@jvuletich.org>> wrote:

   Hi Folks,

   commits@source.squeak.org <mailto:commits@source.squeak.org> wrote:

       Nicolas Cellier uploaded a new version of Compiler to project
       The Trunk:
       http://source.squeak.org/trunk/Compiler-nice.189.mcz

       ==================== Summary ====================

       Name: Compiler-nice.189
       Author: nice
       Time: 13 February 2011, 7:44:38.363 pm
       UUID: 3f6f02cd-1acf-48de-a388-b5ac55e27055
       Ancestors: Compiler-nice.188

       Enable cascading of special messages by deoptimizing, thanks
       Eliot.
       This is mostly useless, but it removes an arbitrary limitation
       of the language.

       =============== Diff against Compiler-nice.188 ===============
       
   I integrated this nice code in Cuis, and tried:

   true ifTrue: [ Transcript cr; show: 'was true' ]; yourself

   I found that this works ok with the interpreter but does nothing
   in Cog. A bug, right?

   Cheers,
   Juan Vuletich


------------------------------------------------------------------------


 
------------------------------------------------------------------------

No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 10.0.1204 / Virus Database: 1435/3477 - Release Date: 03/02/11