{
// General indicator that value is not used.
RFT_VOID,
- // Go type bool, C type _Bool.
+ // Go untyped bool, C type _Bool.
RFT_BOOL,
// Go type *bool, C type _Bool*.
RFT_BOOLPTR,
go_unreachable();
case RFT_BOOL:
- t = Type::lookup_bool_type();
+ t = Type::make_boolean_type();
break;
case RFT_BOOLPTR:
// var present_temp bool
Temporary_statement* present_temp =
- Statement::make_temporary(Type::lookup_bool_type(), NULL, loc);
+ Statement::make_temporary((this->present_->type()->is_sink_type())
+ ? Type::make_boolean_type()
+ : this->present_->type(),
+ NULL, loc);
b->add_statement(present_temp);
// present_temp = mapaccess2(DESCRIPTOR, MAP, &key_temp, &val_temp)
Expression* a4 = Expression::make_unary(OPERATOR_AND, ref, loc);
Expression* call = Runtime::make_call(Runtime::MAPACCESS2, loc, 4,
a1, a2, a3, a4);
-
ref = Expression::make_temporary_reference(present_temp, loc);
ref->set_is_lvalue();
Statement* s = Statement::make_assignment(ref, call, loc);
// var closed_temp bool
Temporary_statement* closed_temp =
- Statement::make_temporary(Type::lookup_bool_type(), NULL, loc);
+ Statement::make_temporary((this->closed_->type()->is_sink_type())
+ ? Type::make_boolean_type()
+ : this->closed_->type(),
+ NULL, loc);
b->add_statement(closed_temp);
// closed_temp = chanrecv2(type, channel, &val_temp)