equal
deleted
inserted
replaced
53 tree_root->accept(flow_control_analysis); |
53 tree_root->accept(flow_control_analysis); |
54 return 0; |
54 return 0; |
55 } |
55 } |
56 |
56 |
57 |
57 |
58 /* Type safety analysis assumes that flow control analysis has already been completed, |
58 /* Type safety analysis assumes that |
59 * so be sure to call flow_control_analysis() before calling this function |
59 * - flow control analysis |
|
60 * - constant folding (constant check) |
|
61 * has already been completed, so be sure to call those semantic checkers |
|
62 * before calling this function |
60 */ |
63 */ |
61 static int type_safety(symbol_c *tree_root){ |
64 static int type_safety(symbol_c *tree_root){ |
62 fill_candidate_datatypes_c fill_candidate_datatypes(tree_root); |
65 fill_candidate_datatypes_c fill_candidate_datatypes(tree_root); |
63 tree_root->accept(fill_candidate_datatypes); |
66 tree_root->accept(fill_candidate_datatypes); |
64 narrow_candidate_datatypes_c narrow_candidate_datatypes(tree_root); |
67 narrow_candidate_datatypes_c narrow_candidate_datatypes(tree_root); |