stage3/constant_folding.cc
changeset 945 477393b00f95
parent 890 499486ece119
child 963 e3d4dca7520b
equal deleted inserted replaced
943:566414d7ba1f 945:477393b00f95
   786 /***        The constant_folding_c                                   ***/
   786 /***        The constant_folding_c                                   ***/
   787 /***********************************************************************/
   787 /***********************************************************************/
   788 /***********************************************************************/
   788 /***********************************************************************/
   789 /***********************************************************************/
   789 /***********************************************************************/
   790 
   790 
   791 
   791 #if 0
   792 
   792 // not currently needed, so comment it out!...
       
   793 // returns true if both symbols have the same value in all the cvalues
       
   794 bool constant_folding_c::is_equal_cvalue(symbol_c *symbol_1, symbol_c *symbol_2) {
       
   795 	if (VALID_CVALUE  (real64, symbol_1) != VALID_CVALUE  (real64, symbol_2)) return false;
       
   796 	if (VALID_CVALUE  (uint64, symbol_1) != VALID_CVALUE  (uint64, symbol_2)) return false;
       
   797 	if (VALID_CVALUE  ( int64, symbol_1) != VALID_CVALUE  ( int64, symbol_2)) return false;
       
   798 	if (VALID_CVALUE  (  bool, symbol_1) != VALID_CVALUE  (  bool, symbol_2)) return false;
       
   799 	if (VALID_CVALUE  (real64, symbol_1) && !ISEQUAL_CVALUE(real64, symbol_1, symbol_2)) return false;
       
   800 	if (VALID_CVALUE  (uint64, symbol_1) && !ISEQUAL_CVALUE(uint64, symbol_1, symbol_2)) return false;
       
   801 	if (VALID_CVALUE  ( int64, symbol_1) && !ISEQUAL_CVALUE( int64, symbol_1, symbol_2)) return false;
       
   802 	if (VALID_CVALUE  (  bool, symbol_1) && !ISEQUAL_CVALUE(  bool, symbol_1, symbol_2)) return false;
       
   803 	return true;
       
   804 }
       
   805 #endif
   793 
   806 
   794 
   807 
   795 
   808 
   796 constant_folding_c::constant_folding_c(symbol_c *symbol) {
   809 constant_folding_c::constant_folding_c(symbol_c *symbol) {
   797     error_count = 0;
   810     error_count = 0;