On a related note:

class MouseEvent emptyShape
 id "isTrusted" g/s 0x7f0686017280/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f066db02cc0/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f0686017d40/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f0683541e00/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f0686017a80/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f068602cd40/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f068602ce80/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f066db02e80/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f0683541a80/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f06860176c0/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f06860311c0/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f0686031100/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 id "isTrusted" g/s 0x7f0686031240/(nil) slot -1 attrs 55 (enumerate
permanent getter shared) flags 0  nkids=0
 ...

And there are another 360-odd just like that. Lots of different
generated DOM bindings classes that have an isTrusted method,
basically. It's a little frustrating that we have so much generated
code that is really similar.

Nick


On Mon, Jul 14, 2014 at 6:08 PM, Nicholas Nethercote
<n.netherc...@gmail.com> wrote:
> Hi,
>
> I'm looking closely at shapes and property trees. I've been using the
> dump() and dumpSubtree() methods, among other things, and I'm seeing
> some strange things.
>
> Here's some reasonable-looking output:
>
> class Array emptyShape
>  id "length" g/s 0x7f06ae61fb10/0x7f06ae61fbf0 slot -1 attrs 44
> (permanent shared) flags 0  nkids=1
>   id "toSource" g/s (nil)/(nil) slot 0 attrs 0 flags 0  nkids=1
>    id "toString" g/s (nil)/(nil) slot 1 attrs 0 flags 0  nkids=1
>     id "toLocaleString" g/s (nil)/(nil) slot 2 attrs 0 flags 0  nkids=1
>      id "join" g/s (nil)/(nil) slot 3 attrs 0 flags 0  nkids=1
>       id "reverse" g/s (nil)/(nil) slot 4 attrs 0 flags 0  nkids=1
>        id "sort" g/s (nil)/(nil) slot 5 attrs 0 flags 0  nkids=1
>         id "push" g/s (nil)/(nil) slot 6 attrs 0 flags 0  nkids=1
>          id "pop" g/s (nil)/(nil) slot 7 attrs 0 flags 0  nkids=1
>           id "shift" g/s (nil)/(nil) slot 8 attrs 0 flags 0  nkids=1
>            id "unshift" g/s (nil)/(nil) slot 9 attrs 0 flags 0  nkids=1
>
> We have a property tree for |Array|, and it looks reasonable.
>
> Here's part of a stranger one:
>
> class Array emptyShape
>  id "length" g/s 0x7f06ae61fb10/0x7f06ae61fbf0 slot -1 attrs 44
> (permanent shared) flags 0  nkids=0
>  id "length" g/s 0x7f06ae61fb10/0x7f06ae61fbf0 slot -1 attrs 44
> (permanent shared) flags 0  nkids=1
>   id "toSource" g/s (nil)/(nil) slot 0 attrs 0 flags 0  nkids=1
>    id "toString" g/s (nil)/(nil) slot 1 attrs 0 flags 0  nkids=1
>     id "toLocaleString" g/s (nil)/(nil) slot 2 attrs 0 flags 0  nkids=1
>      id "join" g/s (nil)/(nil) slot 3 attrs 0 flags 0  nkids=1
>       id "reverse" g/s (nil)/(nil) slot 4 attrs 0 flags 0  nkids=1
>        id "sort" g/s (nil)/(nil) slot 5 attrs 0 flags 0  nkids=1
>         id "push" g/s (nil)/(nil) slot 6 attrs 0 flags 0  nkids=1
>          id "pop" g/s (nil)/(nil) slot 7 attrs 0 flags 0  nkids=1
>
> Two seemingly identical |length| shapes, both at depth 1. How does that 
> happen?
>
> Here's part of another strange one:
>
> class Function emptyShape
>  id "length" g/s (nil)/(nil) slot 0 attrs 6 (readonly permanent) flags
> 0  nkids=1
>   id "name" g/s (nil)/(nil) slot 1 attrs 6 (readonly permanent) flags 0  
> nkids=1
>    id "arguments" g/s 0x7f06ae9175b0/(nil) slot -1 attrs 44 (permanent
> shared) flags 0  nkids=2
>     id "caller" g/s 0x7f06ae9175b0/(nil) slot -1 attrs 44 (permanent
> shared) flags 0  nkids=0
>     id "caller" g/s 0x7f06ae9175b0/(nil) slot -1 attrs 44 (permanent
> shared) flags 0  nkids=0
>  id "join" g/s (nil)/(nil) slot 0 attrs 0 flags 0  nkids=1
>   id "reverse" g/s (nil)/(nil) slot 1 attrs 0 flags 0  nkids=1
>    id "sort" g/s (nil)/(nil) slot 2 attrs 0 flags 0  nkids=1
>     id "push" g/s (nil)/(nil) slot 3 attrs 0 flags 0  nkids=1
>      id "pop" g/s (nil)/(nil) slot 4 attrs 0 flags 0  nkids=1
>       id "shift" g/s (nil)/(nil) slot 5 attrs 0 flags 0  nkids=1
>        id "unshift" g/s (nil)/(nil) slot 6 attrs 0 flags 0  nkids=1
>
> The sub-tree containing |length|, |name|, |arguments| and |caller|
> seems reasonable (well, except for the duplication of |caller|). But
> the next subtree contains all the Array methods! And this tree goes on
> to include additional sub-trees containing methods for typed arrays,
> iterators, Math, RegExp, String, Date, and others. How does that
> happen?
>
> Thanks.
>
> Nick
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to