On Aug 30, 2013, at 3:46 PM, David Herman <[email protected]> wrote:
> On Aug 30, 2013, at 12:46 PM, Filip Pizlo <[email protected]> wrote: > >> OK - by "sanepants" do you mean that there is no weirdo aliasing? Going >> back to my example of field 'a' aliasing field 'b' - is it possible? > > There is plenty of aliasing possible, but I'm trying to understand what you > mean specifically by "weirdo" aliasing. Do you mean that in a given struct > it's impossible for it to have two fields that alias each other? That's > definitely true. E.g., if I have a struct type > > var T = new StructType({ a: t1, b: t2, ... }); > > then for any given instance x of T, I know for sure that x.a and x.b do not > alias the same storage. Yup, that's what I was concerned about. And reading over the spec I agree. But just for sanity, we're guaranteeing this because you cannot create a struct type instance by pointing into an arbitrary offset of a buffer - you can only instantiate new ones, or alias structs nested as fields in other structs. Right? -Filip > > Dave
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

