[squeak-dev] Package Hierarchy Map

tim Rowledge tim at rowledge.org
Mon Jul 29 18:28:48 UTC 2013


On 29-07-2013, at 10:41 AM, Tobias Pape <Das.Linux at gmx.de> wrote:

> 
> 
> Am 29.07.2013 um 18:52 schrieb tim Rowledge <tim at rowledge.org>:
> 
>> 
>> On 29-07-2013, at 7:00 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
>>> 
>>> pulling ByteArray and such into Kernel (because ByteArray subclass:
>>> #CompiledMethod).
>> 
>> Sigh. That should have gone away 15 years ago.
>> 
> 
> What do you mean exactly?

Waaaaaay back when I was at Interval Research (along with Craig and several other longtimer Smalltalkers) we came up with a cleaner Method format. The 'old' way is to mangle reality cruelly by making a byte object and storing your bytecodes in it - but treat the latter part of it as a pointer object and store assorted stuff there - source pointer object etc. This complicates the gc, makes for some awkward prims and so on. I don't like it much. The newer format simpy made a CompiledMethod object that was a'proper' pointer object, split the bytecodes out to a bytearray and got rid of some complications.

It costs maybe 8 bytes per method in the image to pay for the extra object and saves some ugliness in code that ought to save a little time. As a side effect, it became very easy to handle source code access via any old object that you wanted to stick in the relevant instance var. Not that it is all that difficult the older way, but it encouraged experimentation. IIRC Eliot looked at it when firing up Cog and decided the space cost wasn't worth it in his opinion; since he was writing the code he got to make the call.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: EBO: Emulate Brown-Out




More information about the Squeak-dev mailing list