fn_(fn), args_(args), type_(NULL), results_(NULL), call_(NULL),
call_temp_(NULL), expected_result_count_(0), is_varargs_(is_varargs),
varargs_are_lowered_(false), types_are_determined_(false),
- is_deferred_(false), issued_error_(false), is_multi_value_arg_(false),
- is_flattened_(false)
+ is_deferred_(false), is_concurrent_(false), issued_error_(false),
+ is_multi_value_arg_(false), is_flattened_(false)
{ }
// The function to call.
set_is_deferred()
{ this->is_deferred_ = true; }
+ // Whether this call is concurrently executed.
+ bool
+ is_concurrent() const
+ { return this->is_concurrent_; }
+
+ // Note that the call is concurrently executed.
+ void
+ set_is_concurrent()
+ { this->is_concurrent_ = true; }
+
// We have found an error with this call expression; return true if
// we should report it.
bool
bool types_are_determined_;
// True if the call is an argument to a defer statement.
bool is_deferred_;
+ // True if the call is an argument to a go statement.
+ bool is_concurrent_;
// True if we reported an error about a mismatch between call
// results and uses. This is to avoid producing multiple errors
// when there are multiple Call_result_expressions.
gogo->flatten_block(function, b);
- if (may_call_recover || recover_arg != NULL)
+ if (may_call_recover
+ || recover_arg != NULL
+ || this->classification() == STATEMENT_GO)
{
// Dig up the call expression, which may have been changed
// during lowering.
{
if (may_call_recover)
ce->set_is_deferred();
+ if (this->classification() == STATEMENT_GO)
+ ce->set_is_concurrent();
if (recover_arg != NULL)
ce->set_recover_arg(recover_arg);
}