[vala/wip/transform: 86/124] codegen: Fix capture of compiler-generated internal temp variables



commit 12ba1b6a0eb4d946ee48084e7201bfd1046d0d90
Author: Luca Bruno <lucabru src gnome org>
Date:   Mon Oct 22 16:12:31 2012 +0200

    codegen: Fix capture of compiler-generated internal temp variables
    
    Make variable_name_map be global instead of per EmitContext.

 codegen/valaccodebasemodule.vala | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index ac69f29ec..208869e47 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -39,7 +39,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> ();
 
@@ -339,7 +338,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 ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]