stage3/fill_candidate_datatypes.hh
changeset 438 744b125d911e
parent 421 840cb1e1e177
child 443 ff4d26b7e51d
equal deleted inserted replaced
437:0e09a8840c92 438:744b125d911e
    32  *
    32  *
    33  */
    33  */
    34 
    34 
    35 
    35 
    36 #include "../absyntax_utils/absyntax_utils.hh"
    36 #include "../absyntax_utils/absyntax_utils.hh"
       
    37 #include "datatype_functions.hh"
    37 
    38 
    38 class fill_candidate_datatypes_c: public iterator_visitor_c {
    39 class fill_candidate_datatypes_c: public iterator_visitor_c {
    39 
    40 
    40   private:
    41   private:
    41     search_varfb_instance_type_c *search_varfb_instance_type;
    42     search_varfb_instance_type_c *search_varfb_instance_type;
    78     /* the current IL operand being analyzed - its symbol and its data type */
    79     /* the current IL operand being analyzed - its symbol and its data type */
    79     symbol_c *il_operand_type;
    80     symbol_c *il_operand_type;
    80     symbol_c *il_operand;
    81     symbol_c *il_operand;
    81     symbol_c *widening_conversion(symbol_c *left_type, symbol_c *right_type, const struct widen_entry widen_table[]);
    82     symbol_c *widening_conversion(symbol_c *left_type, symbol_c *right_type, const struct widen_entry widen_table[]);
    82 
    83 
    83   public:
       
    84     fill_candidate_datatypes_c(symbol_c *ignore);
       
    85     virtual ~fill_candidate_datatypes_c(void);
       
    86 
       
    87     /* Match a function declaration with a function call through their parameters.*/
    84     /* Match a function declaration with a function call through their parameters.*/
    88     /* returns true if compatible function/FB invocation, otherwise returns false */
    85     /* returns true if compatible function/FB invocation, otherwise returns false */
    89     bool match_nonformal_call(symbol_c *f_call, symbol_c *f_decl);
    86     bool match_nonformal_call(symbol_c *f_call, symbol_c *f_decl);
    90     bool match_formal_call   (symbol_c *f_call, symbol_c *f_decl);
    87     bool match_formal_call   (symbol_c *f_call, symbol_c *f_decl);
    91 
    88     void handle_function_call(symbol_c *fcall, generic_function_call_t fcall_data);
    92     void *compute_standard_function_default(function_invocation_c *st_symbol, il_formal_funct_call_c *il_symbol);
       
    93     void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_data_type);
       
    94 
    89 
    95     /* a helper function... */
    90     /* a helper function... */
    96     symbol_c *base_type(symbol_c *symbol);
    91     symbol_c *base_type(symbol_c *symbol);
       
    92     
       
    93     
       
    94   public:
       
    95     fill_candidate_datatypes_c(symbol_c *ignore);
       
    96     virtual ~fill_candidate_datatypes_c(void);
       
    97 
    97 
    98 
    98     /*********************/
    99     /*********************/
    99     /* B 1.2 - Constants */
   100     /* B 1.2 - Constants */
   100     /*********************/
   101     /*********************/
   101     /******************************/
   102     /******************************/