LLVM defines how things are layed out in structures, and that is fixed - we don't change it. So unless LLVM has some LTO optimization that reorders structures (there might be in theory; but we don't run LTO by default anyhow), what you are doing is safe.
- Alon On Tue, Apr 15, 2014 at 7:47 PM, Joshua Litt <[email protected]> wrote: > I would like to take advantage of the layout of member variables in my > Javascript layer. It would be nice to just return pointers to simple > objects, and use dataviews / typed arrays and offsets to read the necessary > data instead of copying or making a ton of calls into asm.js > > I am taking advantage of this already in my program, but is this behavior > actually defined or am I getting lucky? > > If reordering is occurring, it would be really nice to disable it > optionally. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
