> OK, here is something that I would really like: > > http://llvm.org/devmtg/2012-11/Weber_TypeAwareMemoryProfiling.pdf > > Basically, this is a language extension that asks the compiler to store > type information for each object in memory, so that one can query at > runtime the type of what's stored at a given address. > > That would be useful e.g. for refgraph ( > https://github.com/bjacob/mozilla-central/wiki/Refgraph ) and, I suppose, > that also wouldn't hurt to know more about heap-unclassified in > about:memory. Basically, everything would be 'classified' at least by c++ > type name. And that would also be a nice tool to have around during long > debugging sessions. So, I would appreciate if you could figure if there is > any intention to add something like this in the standard.
I believe this falls under the purview of runtime reflection, which is being looked at by the Reflection Study Group. See my previous email about the progress of the Reflection Study Group. I've come across one paper in particular that seems to address this use case, called "Rich Pointers with Dynamic and Static Introspection" [1]. I believe the Study Group looked at this paper briefly last week and identified some serious problems with it, and the paper's author decided to withdraw it. I'm not sure what the issues were as I wasn't in that meeting (there were several groups meeting in parallel and only one of me :-) ). However, I believe that the objectives that the paper was aiming to achieve, such as determining what is the type of an object at a given memory location, are still desirable, and alternative proposals for achieving these objectives will probably be made. Botond [1] http://open-std.org/JTC1/SC22/WG21/docs/papers/2012/n3410.pdf _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform