[KCP] about VM

Tim Rowledge tim at sumeru.stanford.edu
Sat Jun 28 20:48:09 UTC 2003


Stephane Ducasse <ducasse at iam.unibe.ch> wrote:

> Hi
> 
> I'm extracting the class VM from SystemDictionary. It is attached for 
> review and feedback.
> 
> VM has right now the following methods:
> 
>   a Set(#endianness #isLittleEndian #listBuiltinModules 
> #specialObjectsArray #setPlatformPreferences #stopProfiling 
> #getSystemAttribute: #quitPrimitive #externalObjects 
> #vmParameterAt:put: #unregisterExternalObject: 
> #unbindExternalPrimitives #specialSelectors #listLoadedModules 
> #compactClassesArray #profile: #dumpProfile #version #platformName 
> #platformSubtype #isBigEndian #recreateSpecialObjectsArray 
> #startProfiling #osVersion #registerExternalObject: #vmParameterAt: 
> #specialNargsAt: #getVMParameters #clearExternalObjects 
> #specialSelectorAt: #unloadModule: #clearProfile #specialSelectorSize 
> #listLoadedModule: #listBuiltinModule: #extraVMMemory 
> #hasSpecialSelector:ifTrueSetByte: #extraVMMemory:)
> 
> We planned to have finally a class responsible for image management 
> (GC, sources files, ...all the rest)
I'm sorry to say that I really don't like the way some of this is going.
Certainly cleaning up SystemDictionary is a Good Thing but I'm having
trouble swallowing splitting code into so many places on a tenuous
basis.

Many of the items in the list above are not particularly to do with
the VM anyway - they are related to the _system_ as a whole.

In particular (for an example) #specialSelectors is nothing to do with
the VM - in fact the 'SpecialSelectors' object seems t be pretty much
unused and responsibility for the special selectors is delegated to
the specialObjectsArray. Oh, and an instvar with a capital letter is a
capital crime....
#hasSpecialSelector:ifTrueSetByte: certainly doesn't belong anywhere
near VM stuff; it's more plausibly something to do with
SystemNavigation.

No, I'd claim that a class named something relatively simple
like 'System' is the place for most of this, along with many of the
things I've seen in discussions of 'Image'. And again, I'd go for
class-side code since there is really only a single System around at any
one time. 


tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Cursor's flashing but there's no response.



More information about the Squeak-dev mailing list