|
From: Andreas R. <and...@gm...> - 2004-04-09 12:41:57
|
> The instVarAt:put: primitive (and the at:put: primitive for indexed > access) can just check the immutability bit - the additional overhead > should be small. > The inst var assignments in methods are more complicated. > One possible optimization would be to allow immutability only for old > objects - when assigning into old objects, we need additional code anyway. > The beImmutable primitive would make sure that the receiver is either > old already, or it would move the oldspace boundary to point after the > objects. > Does that sound sane? Something disturbs me about this but I'm not sure what. Maybe it's that "bit" term - if we'd take the "immutability bit" literally it would mean we'd have some fairly generic stuff to be dealt with here. So here's another question: How important is it that *all* objects individually can be tagged immutable in this way? Would it be sufficient if there would be "certain kinds" of objects (say, classes which have a special format or similar) which could be used that way? Cheers, - Andreas |