On 07/25/2013 12:13 PM, Boris Zbarsky wrote:
On 7/25/13 8:51 AM, Josh Matthews wrote:
wrapper: 8 bytes
type_id: 16 bytes
abstract: 16 bytes
out_of_line: 8 bytes
layout_data: 8 bytes

Hmm.  That's a lot smaller than 128 bytes, right?  I guess the point is
that you could't put _all_ of parent/first/last/next/prev/ownerdoc
inline, which is why they're all out of line?

What are type_id and abstract?

Will 'wrapper' go away in the long term for jsmanaged stuff?

-Boris

type_id is an enum to distinguish between node types, with an inner enum in the element case to distinguish the kind of element. All enums are automatically 8 bytes, and if any variant contains another enum that automatically bumps it up to 16.

The wrapper field is a *JSObject essentially, which I suppose could conceivably go away if we dictated that the wrapper pointer could be determined by finding the memory position at self - (sizeof(JSObject) - sizeof(JSVal) * MAX_FIXED_SLOTS) when self is the root of a DOM hierarchy.
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to