read-only literals

Lex Spoon lex at cc.gatech.edu
Fri Dec 5 21:19:22 UTC 2003


"Andreas Raab" <andreas.raab at gmx.de> wrote:
> Why is this useful? It means that we can finally think about providing
> "alternative implementations" for class Array which can be helpful in
> various circumstances (such as immutable literal arrays which I always
> wanted to have). Before these changes such array-like objects couldn't be
> used since the VM would have hardcoded refs to class Array instead of
> testing the format. Now this is will actually work.

Odd, it seemed to work fine in Islands without this change.  I just tested
in this image, and it also worked okay.  For the curious, download
the zip file of Islands and look at the changesets "immutLit1" and
"immutLit2".

	http://minnow.cc.gatech.edu/squeak/2074


Note that to load Islands changesets into a regular image, you must have a
dummy method such as this:

	Behavior>>makeSelector:  ignored1  privilaged: ignore2
		^self 



-Lex



More information about the Squeak-dev mailing list