stage3/fill_candidate_datatypes.cc
changeset 470 d2cd05c5e01a
parent 467 4910eaa1206a
child 472 d26759a2274a
equal deleted inserted replaced
469:9fe6c4633ed6 470:d2cd05c5e01a
  1120 	if (debug) std::cout << "STN [" << prev_il_instruction->candidate_datatypes.size() << "," << il_operand->candidate_datatypes.size() << "] ==> "  << symbol->candidate_datatypes.size() << " result.\n";
  1120 	if (debug) std::cout << "STN [" << prev_il_instruction->candidate_datatypes.size() << "," << il_operand->candidate_datatypes.size() << "] ==> "  << symbol->candidate_datatypes.size() << " result.\n";
  1121 	return NULL;
  1121 	return NULL;
  1122 }
  1122 }
  1123 
  1123 
  1124 void *fill_candidate_datatypes_c::visit(NOT_operator_c *symbol) {
  1124 void *fill_candidate_datatypes_c::visit(NOT_operator_c *symbol) {
       
  1125 	/* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand>
       
  1126 	 *              NOT [<il_operand>]
       
  1127 	 *       However, it does not define the semantic of the NOT operation when the <il_operand> is specified.
       
  1128 	 *       We therefore consider it an error if an il_operand is specified!
       
  1129 	 */
       
  1130 	if (NULL == prev_il_instruction) return NULL;
       
  1131 	for (unsigned int i = 0; i < prev_il_instruction->candidate_datatypes.size(); i++) {
       
  1132 		if (is_ANY_BIT_compatible(prev_il_instruction->candidate_datatypes[i]))
       
  1133 			add_datatype_to_candidate_list(symbol, prev_il_instruction->candidate_datatypes[i]);
       
  1134 	}
       
  1135 	if (debug) std::cout <<  "NOT_operator [" << prev_il_instruction->candidate_datatypes.size() << "] ==> "  << symbol->candidate_datatypes.size() << " result.\n";
  1125 	return NULL;
  1136 	return NULL;
  1126 }
  1137 }
  1127 
  1138 
  1128 
  1139 
  1129 void *fill_candidate_datatypes_c::visit(S_operator_c *symbol) {
  1140 void *fill_candidate_datatypes_c::visit(S_operator_c *symbol) {