sq 3.9 compiledmethod #sourceClass and #methodClass
tim Rowledge
tim at rowledge.org
Tue Oct 10 18:46:24 UTC 2006
On 10-Oct-06, at 3:03 AM, Marcus Denker wrote:
[snip]
>
> But right now (when there is no super in it) those are all the same
> method. (Methods are shared for saving
> space).
>
> So the solution would be to never share, allways copy. The
> machinary now used for super send methods should
> be used for all methods, and we are done.
I concur - this seems like the proper answer for now.
>
> Space saving then can be added again after we make CompiledMethods
> normal objects (with a ByteArray containing
> the Bytecode another array for the literals). Then these can be
> shared to save space, while the Method itself will be
> a copy.
Yup.
>
> The fun thing is that the CompiledMethod special treatment was done
> to save space (rightly, there are lots of methods!).
> But then, when there is more RAM, people tend to like the idea of
> trading RAM for more powerful abstractions. e.g having
> classes now their class and name. In the end, we are soon at a
> point where the specia treatment of CompiledMethod does
> not save memory, but it costs memory for all the hacks build around
> it to support what we would get for free if it would be
> a standard object... so having CompiledMethods be normal Objects is
> definitly the right thing (which it was in 1998 already,
> I might add).
Definitely. I think we got stuck in analysis paralysis back then and
never got organised enough to escape it.
>
> What should have been in in the 90ties would have been a "Squeak
> revisited", a simplifcation and generalisation pass, based
> on the fact that the world was different in 1997 than it was in
> 1977. A more simple and general system of course makes it much
> easier then to re-start hacking and experimenting (e.g. for eToys),
> thus it is even the right thing to do from a "Kids first" perspective.
> That sadly never was done, work done in that direction was even
> completely ignored and rejected.
Too true. But there's nothing (aside from real life...) getting in
the way of doing it now. All we need is about $5m a year.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
"How many Kdatlyno does it take to change a lightbulb?" "None. It
sounds perfectly OK to them."
More information about the Squeak-dev
mailing list
|