Issue 4814 in pharo: CompiledMethod equality broken for class side methods

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 4814 in pharo: CompiledMethod equality broken for class side methods

pharo
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=4814

This 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
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4814 in pharo: CompiledMethod equality broken for class side methods

pharo
Updates:
        Status: FixToInclude
        Labels: Milestone-1.4

Comment #1 on issue 4814 by marianopeck: CompiledMethod equality broken for  
class side methods
http://code.google.com/p/pharo/issues/detail?id=4814

Slice in inbox:

Name:  
SLICE-Issue-4814-CompiledMethod-equality-broken-for-class-side-methods-MarianoMartinezPeck.1
Author: MarianoMartinezPeck
Time: 17 September 2011, 11:28:05 am
UUID: 44a51127-deb5-472c-b6a3-f0447a5bb24b
Ancestors:
Dependencies: Kernel-MarianoMartinezPeck.936

Fix to issue 4814


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4814 in pharo: CompiledMethod equality broken for class side methods

pharo

Comment #2 on issue 4814 by [hidden email]: CompiledMethod equality  
broken for class side methods
http://code.google.com/p/pharo/issues/detail?id=4814

Thanks mariano.



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4814 in pharo: CompiledMethod equality broken for class side methods

pharo
Updates:
        Status: Closed

Comment #3 on issue 4814 by [hidden email]: CompiledMethod equality  
broken for class side methods
http://code.google.com/p/pharo/issues/detail?id=4814

Mariano could you write some tests?
I integrated your fix in 14148


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker