Status: Accepted
Owner: marianopeck
New issue 4814 by marianopeck: CompiledMethod equality broken for class
side methods
http://code.google.com/p/pharo/issues/detail?id=4814This problem appear because of the issue
http://code.google.com/p/pharo/issues/detail?id=4538.
Eliot reported a problem:
class side method have non unique (nil -> a Metaclass) as literal and
cannot be compared equal...
This literal serves one purpose: identifying the class where the
compiledMethod is defined. It is used
- by VM for invoking super,
- by some tools for browsing cross references.
There is not much advantage to use a literal Association instead of just
the class, except:
- that the CompiledMethod is already prepared to handle Association literals
- it enables ClassBuilder to perform a cheap mutation by just changing the
value
Using an Association raises some problems, we can easily break super by
just changing a value in a SystemDictionary...
In the long term, we should better use direct reference to class rather
than an Association.
In the short term, we can place workarounds in method comparison for the
last literal, and for example test the special case of Association with nil
key.
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker