stage3/constant_folding.cc
changeset 985 837c6532a9b8
parent 984 634269b0f104
child 988 3b12a6cf9fbd
equal deleted inserted replaced
984:634269b0f104 985:837c6532a9b8
   590 /***********************************************************************/
   590 /***********************************************************************/
   591 /***********************************************************************/
   591 /***********************************************************************/
   592 /***********************************************************************/
   592 /***********************************************************************/
   593 
   593 
   594 
   594 
       
   595 /* TODO: FIXME !!!!!
       
   596  *   The following operation is wrong - it does not handle the comparisons of all possible datatypes correctly.
       
   597  *   The result of comparig the bool, int64, and uint64 are overwritten by the comparison of the real64 type!
       
   598  */
   595 /* static void *handle_cmp(symbol_c *symbol, symbol_c *oper1, symbol_c *oper2, OPERATION) */
   599 /* static void *handle_cmp(symbol_c *symbol, symbol_c *oper1, symbol_c *oper2, OPERATION) */
   596 #define handle_cmp(symbol, oper1, oper2, operation) {               \
   600 #define handle_cmp(symbol, oper1, oper2, operation) {               \
   597 	if ((NULL == oper1) || (NULL == oper2)) return NULL;        \
   601 	if ((NULL == oper1) || (NULL == oper2)) return NULL;        \
   598 	DO_BINARY_OPER(  bool, operation, bool, oper1, oper2);     \
   602 	DO_BINARY_OPER(  bool, operation, bool, oper1, oper2);     \
   599 	DO_BINARY_OPER(uint64, operation, bool, oper1, oper2);     \
   603 	DO_BINARY_OPER(uint64, operation, bool, oper1, oper2);     \