@@ -1636,8 +1636,7 @@
Block* retblock = new Block(enclosing, loc);
retblock->set_end_location(loc);
- Temporary_statement* ts = Statement::make_temporary(retblock,
- Type::make_boolean_type(),
+ Temporary_statement* ts = Statement::make_temporary(Type::make_boolean_type(),
left, loc);
retblock->add_statement(ts);
@@ -1829,8 +1828,7 @@
break;
source_location loc = (*pexpr)->location();
- Temporary_statement* ts = Statement::make_temporary(block, NULL, *pexpr,
- loc);
+ Temporary_statement* ts = Statement::make_temporary(NULL, *pexpr, loc);
block->insert_statement_before(*pindex, ts);
++*pindex;
@@ -1872,8 +1870,7 @@
{
Expression** pexpr = *p;
source_location loc = (*pexpr)->location();
- Temporary_statement* ts = Statement::make_temporary(var->preinit_block(),
- NULL, *pexpr, loc);
+ Temporary_statement* ts = Statement::make_temporary(NULL, *pexpr, loc);
var->add_preinit_statement(ts);
*pexpr = Expression::make_temporary_reference(ts, loc);
}
@@ -403,7 +403,7 @@
// Make and initialize a temporary variable in BLOCK.
Temporary_statement*
-Statement::make_temporary(Block* block, Type* type, Expression* init,
+Statement::make_temporary(Type* type, Expression* init,
source_location location)
{
return new Temporary_statement(type, init, location);
@@ -571,8 +571,7 @@
if ((*pexpr)->must_eval_in_order())
{
source_location loc = (*pexpr)->location();
- Temporary_statement* temp = Statement::make_temporary(this->block_,
- NULL, *pexpr, loc);
+ Temporary_statement* temp = Statement::make_temporary(NULL, *pexpr, loc);
this->block_->add_statement(temp);
*pexpr = Expression::make_temporary_reference(temp, loc);
}
@@ -782,7 +781,7 @@
continue;
}
- Temporary_statement* temp = Statement::make_temporary(b, (*plhs)->type(),
+ Temporary_statement* temp = Statement::make_temporary((*plhs)->type(),
*prhs, loc);
b->add_statement(temp);
temps.push_back(temp);
@@ -894,17 +893,17 @@
// var key_temp KEY_TYPE = MAP_INDEX
Temporary_statement* key_temp =
- Statement::make_temporary(b, map_type->key_type(), map_index->index(), loc);
+ Statement::make_temporary(map_type->key_type(), map_index->index(), loc);
b->add_statement(key_temp);
// var val_temp VAL_TYPE
Temporary_statement* val_temp =
- Statement::make_temporary(b, map_type->val_type(), NULL, loc);
+ Statement::make_temporary(map_type->val_type(), NULL, loc);
b->add_statement(val_temp);
// var present_temp bool
Temporary_statement* present_temp =
- Statement::make_temporary(b, Type::lookup_bool_type(), NULL, loc);
+ Statement::make_temporary(Type::lookup_bool_type(), NULL, loc);
b->add_statement(present_temp);
// func mapaccess2(hmap map[k]v, key *k, val *v) bool
@@ -1029,19 +1028,19 @@
// Evaluate the map first to get order of evaluation right.
// map_temp := m // we are evaluating m[k] = v, p
- Temporary_statement* map_temp = Statement::make_temporary(b, map_type,
+ Temporary_statement* map_temp = Statement::make_temporary(map_type,
map_index->map(),
loc);
b->add_statement(map_temp);
// var key_temp MAP_KEY_TYPE = k
Temporary_statement* key_temp =
- Statement::make_temporary(b, map_type->key_type(), map_index->index(), loc);
+ Statement::make_temporary(map_type->key_type(), map_index->index(), loc);
b->add_statement(key_temp);
// var val_temp MAP_VAL_TYPE = v
Temporary_statement* val_temp =
- Statement::make_temporary(b, map_type->val_type(), this->val_, loc);
+ Statement::make_temporary(map_type->val_type(), this->val_, loc);
b->add_statement(val_temp);
// func mapassign2(hmap map[k]v, key *k, val *v, p)
@@ -1161,12 +1160,12 @@
// var val_temp ELEMENT_TYPE
Temporary_statement* val_temp =
- Statement::make_temporary(b, channel_type->element_type(), NULL, loc);
+ Statement::make_temporary(channel_type->element_type(), NULL, loc);
b->add_statement(val_temp);
// var success_temp bool
Temporary_statement* success_temp =
- Statement::make_temporary(b, Type::lookup_bool_type(), NULL, loc);
+ Statement::make_temporary(Type::lookup_bool_type(), NULL, loc);
b->add_statement(success_temp);
// func chanrecv2(c chan T, val *T) bool
@@ -1397,7 +1396,7 @@
source_location loc = this->location();
// var val_temp TYPE
- Temporary_statement* val_temp = Statement::make_temporary(b, this->type_,
+ Temporary_statement* val_temp = Statement::make_temporary(this->type_,
NULL, loc);
b->add_statement(val_temp);
@@ -2767,7 +2766,7 @@
// Return a tree defining this label.
tree
-Label_statement::do_get_tree(Translate_context* context)
+Label_statement::do_get_tree(Translate_context*)
{
return this->build_stmt_1(LABEL_EXPR, this->label_->get_decl());
}
@@ -3455,7 +3454,7 @@
else
{
// var val_temp VAL_TYPE = VAL
- val_temp = Statement::make_temporary(b, NULL, this->val_, loc);
+ val_temp = Statement::make_temporary(NULL, this->val_, loc);
b->add_statement(val_temp);
}
@@ -3775,7 +3774,7 @@
// var descriptor_temp DESCRIPTOR_TYPE
Type* descriptor_type = Type::make_type_descriptor_ptr_type();
Temporary_statement* descriptor_temp =
- Statement::make_temporary(b, descriptor_type, NULL, loc);
+ Statement::make_temporary(descriptor_type, NULL, loc);
b->add_statement(descriptor_temp);
if (val_type->interface_type() == NULL)
@@ -3897,7 +3896,7 @@
source_location loc = this->location_;
// Evaluate the channel before the select statement.
- Temporary_statement* channel_temp = Statement::make_temporary(b, NULL,
+ Temporary_statement* channel_temp = Statement::make_temporary(NULL,
this->channel_,
loc);
b->add_statement(channel_temp);
@@ -3908,7 +3907,7 @@
Temporary_statement* val_temp = NULL;
if (this->is_send_)
{
- val_temp = Statement::make_temporary(b, NULL, this->val_, loc);
+ val_temp = Statement::make_temporary(NULL, this->val_, loc);
b->add_statement(val_temp);
}
@@ -4472,20 +4471,18 @@
range_object = ve->named_object();
else
{
- range_temp = Statement::make_temporary(temp_block, NULL, this->range_,
- loc);
+ range_temp = Statement::make_temporary(NULL, this->range_, loc);
temp_block->add_statement(range_temp);
}
- Temporary_statement* index_temp = Statement::make_temporary(temp_block,
- index_type,
+ Temporary_statement* index_temp = Statement::make_temporary(index_type,
NULL, loc);
temp_block->add_statement(index_temp);
Temporary_statement* value_temp = NULL;
if (this->value_var_ != NULL)
{
- value_temp = Statement::make_temporary(temp_block, value_type, NULL, loc);
+ value_temp = Statement::make_temporary(value_type, NULL, loc);
temp_block->add_statement(value_temp);
}
@@ -4625,8 +4622,7 @@
Expression* ref = this->make_range_ref(range_object, range_temp, loc);
Expression* len_call = this->call_builtin(gogo, "len", ref, loc);
- Temporary_statement* len_temp = Statement::make_temporary(init,
- index_temp->type(),
+ Temporary_statement* len_temp = Statement::make_temporary(index_temp->type(),
len_call, loc);
init->add_statement(len_temp);
@@ -4715,7 +4711,7 @@
Block* init = new Block(enclosing, loc);
Temporary_statement* next_index_temp =
- Statement::make_temporary(init, index_temp->type(), NULL, loc);
+ Statement::make_temporary(index_temp->type(), NULL, loc);
init->add_statement(next_index_temp);
mpz_t zval;
@@ -4900,8 +4896,7 @@
Type* map_iteration_type = Type::make_array_type(ptr_type, iexpr);
Type* map_iteration_ptr = Type::make_pointer_type(map_iteration_type);
- Temporary_statement* hiter = Statement::make_temporary(init,
- map_iteration_type,
+ Temporary_statement* hiter = Statement::make_temporary(map_iteration_type,
NULL, loc);
init->add_statement(hiter);
@@ -134,7 +134,7 @@
// Either the type or the initialization expression may be NULL, but
// not both.
static Temporary_statement*
- make_temporary(Block*, Type*, Expression*, source_location);
+ make_temporary(Type*, Expression*, source_location);
// Make an assignment statement.
static Statement*