Is it possible this will work?
If so, the programmer's responsibility is to ensure App.initialize_globals() has no side-effects besides initializing global bindings.
FFFJ54GJ3A2HNKZEHO7RHUZ2YWT67EK4B3Y2YJVYCEUANGY6BQQAC endendfunction live.shallow_copy_all_globals()local result = {}for k,v in pairs(_G) doresult[k] = vendreturn resultendfunction live.restore_all_globals(x)-- delete extra bindingsfor k,v in pairs(_G) doif x[k] == nil then_G[k] = nilendend-- restore previous bindingsfor k,v in pairs(x) do_G[k] = v