--- a/stage3/narrow_candidate_datatypes.cc Wed Aug 21 21:26:55 2013 +0100
+++ b/stage3/narrow_candidate_datatypes.cc Wed Aug 21 21:34:43 2013 +0100
@@ -1243,11 +1243,7 @@
-
-void *narrow_candidate_datatypes_c::visit( LD_operator_c *symbol) {return set_il_operand_datatype(il_operand, symbol->datatype);}
-void *narrow_candidate_datatypes_c::visit(LDN_operator_c *symbol) {return set_il_operand_datatype(il_operand, symbol->datatype);}
-
-void *narrow_candidate_datatypes_c::visit(ST_operator_c *symbol) {
+void *narrow_candidate_datatypes_c::narrow_store_operator(symbol_c *symbol) {
if (symbol->candidate_datatypes.size() == 1) {
symbol->datatype = symbol->candidate_datatypes[0];
/* set the desired datatype of the previous il instruction */
@@ -1263,22 +1259,13 @@
return NULL;
}
-void *narrow_candidate_datatypes_c::visit(STN_operator_c *symbol) {
- if (symbol->candidate_datatypes.size() == 1) {
- symbol->datatype = symbol->candidate_datatypes[0];
- /* set the desired datatype of the previous il instruction */
- set_datatype_in_prev_il_instructions(symbol->datatype, fake_prev_il_instruction);
- /* In the case of the ST operator, we must set the datatype of the il_instruction_c object that points to this ST_operator_c ourselves,
- * since the following il_instruction_c objects have not done it, as is normal/standard for other instructions!
- */
- current_il_instruction->datatype = symbol->datatype;
- }
-
- /* set the datatype for the operand */
- set_il_operand_datatype(il_operand, symbol->datatype);
- return NULL;
-}
-
+
+
+void *narrow_candidate_datatypes_c::visit( LD_operator_c *symbol) {return set_il_operand_datatype(il_operand, symbol->datatype);}
+void *narrow_candidate_datatypes_c::visit( LDN_operator_c *symbol) {return set_il_operand_datatype(il_operand, symbol->datatype);}
+
+void *narrow_candidate_datatypes_c::visit( ST_operator_c *symbol) {return narrow_store_operator(symbol);}
+void *narrow_candidate_datatypes_c::visit( STN_operator_c *symbol) {return narrow_store_operator(symbol);}
/* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand>