Monticello bug; #class and #== optimalizations
squeak1 at continentalbrno.cz
Wed Jun 30 07:34:07 UTC 2004
Monticello has a problem with this class construction:
ProtoObject subclass: #MyClass
MyClass superclass: nil
It forgets the last line with superclass specification.
I'm using it for proxy objects. Instances of MyClass have one variable to
store a real receiver of messages. MyClass resends messages using
^ aMessage sendTo: object.
It works well but there is one problem - Squeak uses optimalization of some
message calls. For example, message #class is never called, because Squeak
uses special bytecode 199 (bytecodePrimClass). Real class of proxy object is
returned instead of receiver class.
Message #isVariable returns wrong value for arrays, large integers etc. So I
have made a variable subclass of MyClass and I use it for proxy object of
variable receivers. It works well too.
I used this proxy objects for a dictionary and its instance variables
including tally. This variable stores a size of dictionary. When Squeak
makes a copy of dictionary array, he sends tally like a parameter in
of new array, but primitive method fails. VM wants an integer instance
More information about the Squeak-dev