Mappings got generation counters yesterday. Although the overhead is fairly small (poking a flag on every change, and added storage in each mapping_data for a 32 bit counter), so is the utility; it at least deserves some discussion whether it should be there or not.
Aside from that, I got a couple of remarks on the implementation:
o The new builtin function m_generation isn't critical enough to deserve a place on the global level imho.
o If this is the way to go, it's not far fetched that generation counters will be added to the other data types too. Thus the names "m_generation" and "_m_generation" (for the lfun) aren't generic enough. Simply "generation" and "_generation" seems better.