Hi Mariano,
Indeed, we intended to adopt that fix at first. Here's what we saw:
PointerFinder works by following pointers forward from the global dictionary.
PointerExplorer works by following pointers backward from the inspected object,
using #pointsTo:
Matthew's fix includes an adaptation of #pointsTo: to include the 'pointer'
from instances to their class, and renames the original #pointsTo: to
#instVarsInclude:
In essence, this means:
(#bar pointsTo: Symbol) == true
(#bar instVarInclude: Symbol) == false
But:
PointerFinder on: Symbol
-> opens an empty window...
Which makes the two tools pretty inconsistent, imho. In addition, PointerFinder
is rather weird in usage: showing you a single path at a time. So, we would
rather prefer to keep the instance-to-class pointer out of the #pointsTo:
implementation alltogether and only use PointerExplorer.
Thinking a bit more about this, it would make sense to improve PointerExplorer
such that the ideal use-case for PointerFinder is better supported: i.e. 'open
all paths to global dictionary'.
I hope I'm making sense here :-)
Johan
On 12 Jun 2010, at 15:29, Mariano Martinez Peck wrote:
> Hi Johan. Very nice you started with this. Once, I took that issue and
> understood what Mattew did in squeak: http://bugs.squeak.org/view.php?id=7158
>
> I liked his solution but I was not completly agree, I don't remember why,
> thus. Did you look at it? any thoughts about that?
>
> cheers
>
> Mariano
>
> On Sat, Jun 12, 2010 at 10:33 AM, Johan Brichau <[email protected]>
> wrote:
> Issue #156 (http://code.google.com/p/pharo/issues/detail?id=156) states that
> PointerFinder and PointerExplorer both have issues leaving out some pointers.
>
> Andy and I have been looking at the implementation of PointerFinder and
> PointerExplorer in Pharo1.1 to fix this.
>
> We came to the decision to throw out PointerFinder, replace its uses to uses
> of PointerExplorer and move PointerFinder's #pointersTo* class methods to
> ProtoObject because:
> - PointerFinder's (instance) behavior seems to be really old code that was
> not using the pointsTo: (primitive) method, while its #pointersTo* class
> methods were using the pointsTo: (primitive) method
> - It also seems the instance behavior of PointerFinder was wrong (it did not
> give us all pointers *at all*)
> - PointerExplorer offers the same functionality using a tree view and
> eventually used the #pointersTo* class methods of PointerFinder...
>
> The fix is in SLICE-PointerFinderRemove-AndyKellens.1 and should be for 1.2
>
> Maybe anyone has another opinion?
>
> ----------------------------
> Johan Brichau
> [email protected]
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
----------------------------
Johan Brichau
[email protected]
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project