stage4/generate_c/generate_c_il.cc
changeset 653 ea78924a1f60
parent 594 c8092e909886
child 665 50fca2d3abd9
equal deleted inserted replaced
652:7fe1533d2260 653:ea78924a1f60
  1876   }
  1876   }
  1877   else {ERROR;}
  1877   else {ERROR;}
  1878   return NULL;
  1878   return NULL;
  1879 }
  1879 }
  1880 
  1880 
  1881 void *visit(GT_operator_c *symbol)	{
  1881 void *visit(GT_operator_c *symbol)	{CMP_operator(this->current_operand, "GT_"); return NULL;}
  1882   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1882 void *visit(GE_operator_c *symbol)	{CMP_operator(this->current_operand, "GE_"); return NULL;}
  1883       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1883 void *visit(EQ_operator_c *symbol)	{CMP_operator(this->current_operand, "EQ_"); return NULL;}
  1884     CMP_operator(this->current_operand, "GT_");
  1884 void *visit(LT_operator_c *symbol)	{CMP_operator(this->current_operand, "LT_"); return NULL;}
  1885   } else {
  1885 void *visit(LE_operator_c *symbol)	{CMP_operator(this->current_operand, "LE_"); return NULL;}
  1886     ERROR;
  1886 void *visit(NE_operator_c *symbol)	{CMP_operator(this->current_operand, "NE_"); return NULL;}
  1887   }
       
  1888   return NULL;
       
  1889 }
       
  1890 
       
  1891 void *visit(GE_operator_c *symbol)	{
       
  1892   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
       
  1893       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
       
  1894     CMP_operator(this->current_operand, "GE_");
       
  1895   } else {
       
  1896     ERROR;
       
  1897   }
       
  1898   return NULL;
       
  1899 }
       
  1900 
       
  1901 void *visit(EQ_operator_c *symbol)	{
       
  1902   if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
       
  1903     CMP_operator(this->current_operand, "EQ_");
       
  1904   } else {
       
  1905     ERROR;
       
  1906   }
       
  1907   return NULL;
       
  1908 }
       
  1909 
       
  1910 void *visit(LT_operator_c *symbol)	{
       
  1911   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
       
  1912       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
       
  1913     CMP_operator(this->current_operand, "LT_");
       
  1914   } else {
       
  1915     ERROR;
       
  1916   }
       
  1917   return NULL;
       
  1918 }
       
  1919 
       
  1920 void *visit(LE_operator_c *symbol)	{
       
  1921   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
       
  1922       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
       
  1923     CMP_operator(this->current_operand, "LE_");
       
  1924   } else {
       
  1925     ERROR;
       
  1926   }
       
  1927   return NULL;
       
  1928 }
       
  1929 
       
  1930 void *visit(NE_operator_c *symbol)	{
       
  1931   if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
       
  1932     CMP_operator(this->current_operand, "NE_");
       
  1933   } else {
       
  1934     ERROR;
       
  1935   }
       
  1936   return NULL;
       
  1937 }
       
  1938 
  1887 
  1939 
  1888 
  1940 //SYM_REF0(CAL_operator_c)
  1889 //SYM_REF0(CAL_operator_c)
  1941 // This method will be called from within the il_fb_call_c visitor method
  1890 // This method will be called from within the il_fb_call_c visitor method
  1942 void *visit(CAL_operator_c *symbol) {return NULL;}
  1891 void *visit(CAL_operator_c *symbol) {return NULL;}