[Vm-dev] Re: [Cog] Strange inliner behavior

Igor Stasenko siguctua at gmail.com
Sun Jul 31 03:53:03 UTC 2011


if instead i do like that:

size := self sizeBitsOf: op1.
sz2 := self sizeBitsOf: op2.
size = sz2 ifFalse: [	^ false ].


then it inlines both calls.

On 31 July 2011 05:49, Igor Stasenko <siguctua at gmail.com> wrote:
> Here the slang code:
>
>        size := self sizeBitsOf: op1.
>        size = (self sizeBitsOf: op2) ifFalse: [
>                ^ false ].
>
> And here translated code:
>
>        /* begin sizeBitsOf: */
>        header = longAt(op1);
>        size = ((header & TypeMask) == HeaderTypeSizeAndClass
>                ? (longAt(op1 - (BytesPerWord * 2))) & LongSizeMask
>                : header & SizeMask);
>        if (!(size == (sizeBitsOf(op2)))) {
>                return 0;
>        }
>
> as you can see it inlining first, but refuses to inline second one.
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list