]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Fix capture of compiler-generated internal temp variables
authorLuca Bruno <lucabru@src.gnome.org>
Mon, 22 Oct 2012 14:12:31 +0000 (16:12 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 11 Mar 2019 12:52:38 +0000 (13:52 +0100)
Make variable_name_map be global instead of per EmitContext.

codegen/valaccodebasemodule.vala

index d407b0738a4ddb6e056587ac1afa514da021f3d4..5402828272839281f08479933c606b346ba5655c 100644 (file)
@@ -40,7 +40,6 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                public bool current_method_inner_error;
                public bool current_method_return;
                public int next_coroutine_state = 1;
-               public Map<string,string> variable_name_map = new HashMap<string,string> (str_hash, str_equal);
                public Map<string,int> closure_variable_count_map = new HashMap<string,int> (str_hash, str_equal);
                public Map<LocalVariable,int> closure_variable_clash_map = new HashMap<LocalVariable,int> ();
 
@@ -347,7 +346,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
        public Set<string> wrappers;
        Set<Symbol> generated_external_symbols;
 
-       public Map<string,string> variable_name_map { get { return emit_context.variable_name_map; } }
+       public Map<string,string> variable_name_map = new HashMap<string,string> (str_hash, str_equal);
 
        public static int ccode_attribute_cache_index = CodeNode.get_attribute_cache_index ();