let register_for_runtime env renv =
let rec process rmap =
StringMap.fold(fun k v _ ->
let (ind, uid) = v
in try
let value = (
try get_constant_value env uid with _ -> RUndefined)
in renv.heap.(ind) <- (uid, value)
with Not_found -> ()
) rmap.variable_map ();
match rmap.parent with
| None -> ()
| Some m -> process m
in process env.globals