stage3/stage3.cc
changeset 984 634269b0f104
parent 959 8bfcc8e62bd6
child 986 2064a22cc1f2
--- a/stage3/stage3.cc	Tue Dec 30 22:58:52 2014 +0000
+++ b/stage3/stage3.cc	Tue Dec 30 23:31:36 2014 +0000
@@ -71,10 +71,10 @@
 /* Constant folding assumes that flow control analysis has been completed!
  * so be sure to call flow_control_analysis() before calling this function!
  */
-static int constant_folding(symbol_c *tree_root){
-    constant_folding_c constant_folding(tree_root);
-    tree_root->accept(constant_folding);
-    return constant_folding.get_error_count();
+static int constant_propagation(symbol_c *tree_root){
+    constant_propagation_c constant_propagation(tree_root);
+    tree_root->accept(constant_propagation);
+    return constant_propagation.get_error_count();
 }
 
 
@@ -140,7 +140,7 @@
 	error_count += enum_declaration_check(tree_root);
 	error_count += declaration_safety(tree_root);
 	error_count += flow_control_analysis(tree_root);
-	error_count += constant_folding(tree_root);
+	error_count += constant_propagation(tree_root);
 	error_count += type_safety(tree_root);
 	error_count += lvalue_check(tree_root);
 	error_count += array_range_check(tree_root);