[squeak-dev] Anyone know the following about Slang?

Igor Stasenko siguctua at gmail.com
Fri Jul 4 02:39:16 UTC 2008


2008/7/4 Eliot Miranda <eliot.miranda at gmail.com>:
>>
>> GCC will inline your method anyways, so why bother?
>
> The current sources use the localIP localSP localHomeContext
> localReturnContext localReturnValue scheme to get important variables in
> registers.  The translator rips out methods it can't inline that refer to
> these.  So lots of methods end up getting deleted unless they're inlined.

Well, then i see no exit , other than use sqInt everywhere, and put
conversions at each place where it needs to be.

Or, you can rewrite the method above, to assign to localSP directly,
without returning a value (also declare localFP in same way as other
localFoes):

setCallerSP
"Set the SP of the caller provided localFP is not a base frame.
This points to the hottest item on the frame's stack."
self assert: (self isBaseFrame: localFP) not.
localSP :=  localFP + FoxCallerSavedIP + ((self frameNumArgs: localFP)
+ 2 * BytesPerWord)

>
> The localFoo scheme may or may not be important for performance.  I don't
> want to rip it out until I can measure in a working VM whether it has any
> effect or not.  I want to measure my new VM not the old one  The benefit of
> having localFP (the frame pointer) in a register in my VM is likely to be
> quite high.
>

localFoo along with gnuifier makes a lot difference - about 30% speedup.

> I only want the type declarations to eliminate warnings.  So its easier to
> do without the declarations.  But I'd like my cake and eat it too, dammit :)
>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>
> best
> Eliot
>
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list