The Voodoo of Inlined Methods

Wolfgang Eder eder.wolfgang at aon.at
Fri Jun 28 10:14:00 UTC 2002


Hi rthappe,
Inlining means that the compiler uses special bytecodes
instead of a regular message send/method lookup.
(You probably know that anyway).
I suggest you make a Rectangle from your points
(upLeft corner: bottomRight) and implement a method
#pointsDo: there. You could name the method #do:,
but I recomment calling it something different...
Cheers
Wolfgang

----- Original Message ----- 
From: "Richard A. O'Keefe" <ok at cs.otago.ac.nz>
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Friday, June 28, 2002 12:10 AM
Subject: Re: The Voodoo of Inlined Methods


> My question:  What's right?
> 
> Squeak does not (yet) do type inference, so it *can't* make inlining
> decisions based on the type of the receiver.  If it sees
> a to: b do: [:each | ... ] and the expression a is not some kind
> of literal, it hasn't a clue whether a is a number or a numbat.
> [A numbat is a small Australian marsupial carnivore.]
> 
> (*) By the way, the intended ``upLeft to: bottomRight do: aBlock''
> iterates over the obvious rectangular grid consisting of all points p:
> upLeft <= p <= bottomRight (with step 1 in each component and <= in the
> sense defined by Point).  For the time being, I've resigned myself to
> using another selector.
> 
> It's not _that_ obvious. 
> From the argument order I guess that up...bottom and left..right are the
> orders for the dimensions, but is it row major, column major, or some
> kind of diagonal?
> What does it do when the coordinates are floating-point numbers?
> 
> 
> 
> 





More information about the Squeak-dev mailing list