Issue 6699 in pharo: Share binding of metaclass methods

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

Issue 6699 in pharo: Share binding of metaclass methods

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug

New issue 6699 by [hidden email]: Share binding of metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

#binding for classes returns the one true binding from Smalltalk globals.

But #binding on metaclasses creates a new binding each time.

Solution: reuse the binding if there is a method on the metaclass.




_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo
Updates:
        Status: HumanReviewNeeded
        Labels: Milestone-2.0

Comment #1 on issue 6699 by [hidden email]: Share binding of  
metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

attached as .st

Attachments:
        Metaclass-binding.st  409 bytes


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo

Comment #2 on issue 6699 by marianopeck: Share binding of metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

sounds like a good idea to me.  I wonder if it could have some bad side  
effects....


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo

Comment #3 on issue 6699 by [hidden email]: Share binding of  
metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

It shouldn't, and in that case it would only be exposing a bug in somewhere  
else :)


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo
Updates:
        Status: FixToInclude

Comment #4 on issue 6699 by [hidden email]: Share binding of  
metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

(No comment was entered for this change.)


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo

Comment #5 on issue 6699 by marianopeck: Share binding of metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

mmm weird...after this change and doing a Compiler recompileAll, shouldn't  
decrease the amoung of Associations ?  Association instanceCount  answers  
almost the same as before....


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo

Comment #6 on issue 6699 by marianopeck: Share binding of metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

mmm no, it should happen just as a recompileAll. However, we can force to  
do it if we want :)


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo
Updates:
        Cc: [hidden email]

Comment #7 on issue 6699 by marianopeck: Share binding of metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

Maybe it makes sense to execute the following?


| meta binding |
Smalltalk allClassesDo: [:each |
        meta := each classSide.
        binding := nil -> meta.
        meta methods do: [:aMethod | aMethod methodClassAssociation: binding]
].



_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo

Comment #8 on issue 6699 by [hidden email]: Share binding of  
metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

makes sense to me...


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo

Comment #9 on issue 6699 by [hidden email]: Share binding of  
metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

makes sense to me...


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo

Comment #10 on issue 6699 by [hidden email]: Share binding of  
metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

The reason why it does not get better is that
#compileAllFrom:

fixes the binding already when recompiling... but it then slowly  
degenerates when loading code, changing methods...

And yes, the postscript looks good.


_______________________________________________
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 6699 in pharo: Share binding of metaclass methods

pharo
Updates:
        Status: Integrated

Comment #11 on issue 6699 by [hidden email]: Share binding of  
metaclass methods
http://code.google.com/p/pharo/issues/detail?id=6699

in 2.0 301


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