[squeak-dev] Immutability (was Re: About String vs Symbols)

Eliot Miranda eliot.miranda at gmail.com
Tue Jul 29 21:57:13 UTC 2008


On Tue, Jul 29, 2008 at 2:51 PM, tim Rowledge <tim at rowledge.org> wrote:

>
> On 29-Jul-08, at 1:24 PM, Eliot Miranda wrote:
>
>>  What I'd like to do is modify Slang so that one can mix and match
>> components to produce the VM you want.  In the StackVM I'm working on I
>> already have the ability to add a subclass that overrides methods in the
>> superclass so NewObjectMemory organizes the young generation differently to
>> ObjectMemory overriding a few methods.  It should be easy to extend this to
>> allow e.g. ImmutabilityInterpreter to override Interpreter and add
>> immutability without having to rewrite the entire Interpreter class.
>>
> I'm fairly sure that should have worked without any extra work since it is
> essentially how the codegen works anyway. What *doesn't* work is adding
>  subclass and being able to use 'super' to only slightly modify the
> superclass code. I tried to get it working some years ago in an attempt to
> make it easy to implement OS specific plugin classes more easily but it
> drove me too close to the edge of insanity for my liking. If you've got
> *that* working I'd be very pleased.


The code generator I started with complains if the subclass redefines a
method. Arguably this is a useful error check.  So I modified the code
generator to allow a subclass to explicitly remove superclass methods before
adding its own.  Trivial but effective.

Super is a different thing.  I don't think there's any conceptual
difficulty.  Its simply another invocation of inlining.  But the code
generator's dictionaries of selector to method would have to be elaborated
and its something I can do without for now.


Another aspect of pick'n'mix I'd like to see working is having all the parts
> of the vm in plugin (or plugin-like) modules. Why insist on having the GC
> irrevocably bound into the core (just for one example)? Why not have a
> system that can startup with no GC code; let the image's policy decide which
> GC plugin to load dependant upon need. An ephemeral app invoked to do a tiny
> job and quit may need no GC functionality at all so why waste space and
> setup time? A server app might want to use a much more sophisticated GC than
> our typical desktop system. Or perhaps the system should start up and run as
> a simple interpreter for a while until a policy has decided that Eliot's
> translator plugin should be loaded. And so on.


Yep.  Makes sense.



>
>
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Oxymorons: Soft rock
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080729/205e388d/attachment.htm


More information about the Squeak-dev mailing list