stage3/constant_folding.hh
changeset 988 3b12a6cf9fbd
parent 984 634269b0f104
child 990 4c235d65afdd
equal deleted inserted replaced
987:562b67922966 988:3b12a6cf9fbd
   208     virtual ~constant_propagation_c(void);
   208     virtual ~constant_propagation_c(void);
   209     typedef symtable_c<const_value_c> map_values_t;
   209     typedef symtable_c<const_value_c> map_values_t;
   210   private:
   210   private:
   211     symbol_c *current_resource;
   211     symbol_c *current_resource;
   212     symbol_c *current_configuration;
   212     symbol_c *current_configuration;
   213     map_values_t values;
   213     map_values_t *values;
   214     map_values_t var_global_values;
   214     map_values_t var_global_values;
   215     void *handle_var_list_decl(symbol_c *var_list, symbol_c *type_decl);
   215     void *handle_var_list_decl(symbol_c *var_list, symbol_c *type_decl, bool is_global_var = false);
   216     void *handle_var_decl     (symbol_c *var_list, bool fixed_init_value);
   216     void *handle_var_decl     (symbol_c *var_list, bool fixed_init_value);
   217     // Flag to indicate whether the variables in the variable declaration list will always have a fixed value when the POU is executed!
   217     // Flag to indicate whether the variables in the variable declaration list will always have a fixed value when the POU is executed!
   218     // VAR CONSTANT ... END_VAR will always be true
   218     // VAR CONSTANT ... END_VAR will always be true
   219     // VAR          ... END_VAR will always be true for functions (who initialise local variables every time they are called), but false for FBs and PROGRAMS
   219     // VAR          ... END_VAR will always be true for functions (who initialise local variables every time they are called), but false for FBs and PROGRAMS
   220     bool fixed_init_value_; 
   220     bool fixed_init_value_; 
   249     void *visit( external_var_declarations_c *symbol);
   249     void *visit( external_var_declarations_c *symbol);
   250     void *visit(   global_var_declarations_c *symbol);
   250     void *visit(   global_var_declarations_c *symbol);
   251     void *visit(  external_declaration_c     *symbol);
   251     void *visit(  external_declaration_c     *symbol);
   252     void *visit(global_var_decl_c            *symbol);
   252     void *visit(global_var_decl_c            *symbol);
   253     void *visit( var1_init_decl_c            *symbol);
   253     void *visit( var1_init_decl_c            *symbol);
       
   254     void *visit(   fb_name_decl_c            *symbol);
   254 
   255 
   255     /**************************************/
   256     /**************************************/
   256     /* B.1.5 - Program organization units */
   257     /* B.1.5 - Program organization units */
   257     /**************************************/
   258     /**************************************/
   258     /***********************/
   259     /***********************/