Branch: Tag:


2015-02-07 12:55:19 by Henrik Grubbström (Grubba) <>

Compiler: Clear local variables on pop.

Local variables may get reused after pop, and such code expects
getting clean variables. This also reduces the lifetime for
various locks and similar to the expected range.

Note that this reduces the quality of the generated code somewhat.

1041:   void gc_zap_ext_weak_refs_in_programs(void);   size_t gc_free_all_unreferenced_programs(void);   void push_compiler_frame(int lexical_scope); - void low_pop_local_variables(int level); - void pop_local_variables(int level); + node *low_pop_local_variables(int level, node *block); + node *pop_local_variables(int level, node *block);   void pop_compiler_frame(void);   PMOD_EXPORT void *get_inherit_storage(struct object *o, int inherit);   PMOD_EXPORT ptrdiff_t low_get_storage(struct program *o, struct program *p);