Re: [whatwg/streams] Convert internal slot accesses in the reference implementation to use symbols (#443)

> So we have no real way to do things like "if object has slot FooBarBaz", because different object constants could make to the same integer.

Well, we do have that, by doing class checks internally. E.g. if the spec has us do things such as `If x does not have a [[PromiseState]] internal slot, return false`, we don't just check if the object has the right size, we check the (internal) class associated with it, which in turn means that it has the expected memory layout, too, so the integer index for a slot, combined with this check, is equivalent to v8's use of private symbols.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/443#issuecomment-223967491

Received on Monday, 6 June 2016 14:02:06 UTC