stage3/constant_folding.cc
changeset 945 477393b00f95
parent 890 499486ece119
child 963 e3d4dca7520b
--- a/stage3/constant_folding.cc	Sat Oct 25 13:20:10 2014 +0100
+++ b/stage3/constant_folding.cc	Sun Nov 16 12:54:10 2014 +0000
@@ -788,8 +788,21 @@
 /***********************************************************************/
 /***********************************************************************/
 
-
-
+#if 0
+// not currently needed, so comment it out!...
+// returns true if both symbols have the same value in all the cvalues
+bool constant_folding_c::is_equal_cvalue(symbol_c *symbol_1, symbol_c *symbol_2) {
+	if (VALID_CVALUE  (real64, symbol_1) != VALID_CVALUE  (real64, symbol_2)) return false;
+	if (VALID_CVALUE  (uint64, symbol_1) != VALID_CVALUE  (uint64, symbol_2)) return false;
+	if (VALID_CVALUE  ( int64, symbol_1) != VALID_CVALUE  ( int64, symbol_2)) return false;
+	if (VALID_CVALUE  (  bool, symbol_1) != VALID_CVALUE  (  bool, symbol_2)) return false;
+	if (VALID_CVALUE  (real64, symbol_1) && !ISEQUAL_CVALUE(real64, symbol_1, symbol_2)) return false;
+	if (VALID_CVALUE  (uint64, symbol_1) && !ISEQUAL_CVALUE(uint64, symbol_1, symbol_2)) return false;
+	if (VALID_CVALUE  ( int64, symbol_1) && !ISEQUAL_CVALUE( int64, symbol_1, symbol_2)) return false;
+	if (VALID_CVALUE  (  bool, symbol_1) && !ISEQUAL_CVALUE(  bool, symbol_1, symbol_2)) return false;
+	return true;
+}
+#endif