Deoptimized calls fail in Cog (was Re: [squeak-dev] The Trunk:
Compiler-nice.189.mcz)
Juan Vuletich
juan at jvuletich.org
Wed Mar 2 21:52:34 UTC 2011
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 ]
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 at jvuletich.org
> <mailto:juan at jvuletich.org>> wrote:
>
> Hi Folks,
>
> commits at source.squeak.org <mailto:commits at 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
>
More information about the Squeak-dev
mailing list
|