210 private: |
211 private: |
211 symbol_c *current_resource; |
212 symbol_c *current_resource; |
212 symbol_c *current_configuration; |
213 symbol_c *current_configuration; |
213 map_values_t *values; |
214 map_values_t *values; |
214 map_values_t var_global_values; |
215 map_values_t var_global_values; |
|
216 /* A stack of all the FB declarations currently being recursively constant propagated */ |
|
217 std::deque<function_block_declaration_c *> fbs_currently_being_visited; // We use a deque instead of stack, so we can search in the stack using direct access to its elements! |
|
218 |
215 void *handle_var_list_decl(symbol_c *var_list, symbol_c *type_decl, bool is_global_var = false); |
219 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); |
220 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! |
221 // 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 |
222 // 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 |
223 // VAR ... END_VAR will always be true for functions (who initialise local variables every time they are called), but false for FBs and PROGRAMS |