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.
D5KRDRYYRE577UK2HETVORW7HQQUI7ZGLDG6N56QLDDOX6GP4O5QC
end
end
function live.shallow_copy_all_globals()
local result = {}
for k,v in pairs(_G) do
result[k] = v
end
return result
end
function live.restore_all_globals(x)
-- delete extra bindings
for k,v in pairs(_G) do
if x[k] == nil then
_G[k] = nil
end
end
-- restore previous bindings
for k,v in pairs(x) do
_G[k] = v