-61b29a99dadf33c48a0a063f50f61e877fb419b8
+ddf3758e4a45ca2816fb68f3e4224501a3c4c438
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Expression*
Var_expression::do_lower(Gogo* gogo, Named_object* function,
- Statement_inserter* inserter, int)
+ Statement_inserter* inserter)
{
if (this->variable_->is_variable())
{
Expression*
Enclosed_var_expression::do_lower(Gogo* gogo, Named_object* function,
- Statement_inserter* inserter, int)
+ Statement_inserter* inserter)
{
gogo->lower_expression(function, inserter, &this->reference_);
return this;
// Lower a reference to an unknown name.
Expression*
-Unknown_expression::do_lower(Gogo*, Named_object*, Statement_inserter*, int)
+Unknown_expression::do_lower(Gogo*, Named_object*, Statement_inserter*)
{
if (this->is_error_expression())
return Expression::make_error(this->location());
// predeclared constant iota into an integer value.
Expression*
-Const_expression::do_lower(Gogo* gogo, Named_object*, Statement_inserter*, int)
+Const_expression::do_lower(Gogo* gogo, Named_object*, Statement_inserter*)
{
Location loc = this->location();
{ }
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int)
+ do_lower(Gogo*, Named_object*, Statement_inserter*)
{ go_unreachable(); }
// There should only ever be one of these.
Expression*
Type_conversion_expression::do_lower(Gogo* gogo, Named_object*,
- Statement_inserter* inserter, int)
+ Statement_inserter* inserter)
{
Type* type = this->type_;
Expression* val = this->expr_;
// instead.
Expression*
-Unary_expression::do_lower(Gogo* gogo, Named_object*, Statement_inserter*, int)
+Unary_expression::do_lower(Gogo* gogo, Named_object*, Statement_inserter*)
{
Location loc = this->location();
Expression*
Binary_expression::do_lower(Gogo* gogo, Named_object*,
- Statement_inserter* inserter, int)
+ Statement_inserter* inserter)
{
Location location = this->location();
do_issue_nil_check();
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_copy()
// Lower a selector expression to the resolved value.
Expression*
-Selector_expression::do_lower(Gogo*, Named_object*, Statement_inserter*, int)
+Selector_expression::do_lower(Gogo*, Named_object*, Statement_inserter*)
{
if (this->is_error_expression() || this->resolved_ == NULL)
return Expression::make_error(this->location());
Expression*
Builtin_call_expression::do_lower(Gogo* gogo, Named_object* function,
- Statement_inserter* inserter, int)
+ Statement_inserter* inserter)
{
if (this->is_error_expression())
return this;
Expression*
Call_expression::do_lower(Gogo* gogo, Named_object*,
- Statement_inserter* inserter, int)
+ Statement_inserter* inserter)
{
if (this->lowered_ != NULL)
return this->lowered_;
// expression into an array index, a string index, or a map index.
Expression*
-Index_expression::do_lower(Gogo*, Named_object*, Statement_inserter*, int)
+Index_expression::do_lower(Gogo*, Named_object*, Statement_inserter*)
{
if (this->is_error_expression())
return Expression::make_error(this->location());
Expression*
Field_reference_expression::do_lower(Gogo* gogo, Named_object* function,
- Statement_inserter* inserter, int)
+ Statement_inserter* inserter)
{
Struct_type* struct_type = this->expr_->type()->struct_type();
if (struct_type == NULL)
do_determine_type(Gogo*, const Type_context*);
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_copy()
Expression*
Composite_literal_key_expression::do_lower(Gogo*, Named_object*,
- Statement_inserter*, int)
+ Statement_inserter*)
{
if (this->is_error_expression())
return Expression::make_error(this->location());
Expression*
Composite_literal_expression::do_lower(Gogo* gogo, Named_object* function,
- Statement_inserter* inserter, int)
+ Statement_inserter* inserter)
{
if (this->is_error_expression() || this->type_->is_error())
return Expression::make_error(this->location());
// which could not be fully parsed into their final form. It
// returns the same Expression or a new one.
Expression*
- lower(Gogo* gogo, Named_object* function, Statement_inserter* inserter,
- int iota_value)
- { return this->do_lower(gogo, function, inserter, iota_value); }
+ lower(Gogo* gogo, Named_object* function, Statement_inserter* inserter)
+ { return this->do_lower(gogo, function, inserter); }
// Flatten an expression. This is called after order_evaluation.
// FUNCTION is the function we are in; it will be NULL for an
// Return a lowered expression.
virtual Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int)
+ do_lower(Gogo*, Named_object*, Statement_inserter*)
{ return this; }
// Return a flattened expression.
protected:
virtual Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int) = 0;
+ do_lower(Gogo*, Named_object*, Statement_inserter*) = 0;
Bexpression*
do_get_backend(Translate_context*)
do_traverse(Traverse*);
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
bool
do_is_constant() const
protected:
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Type*
do_type();
do_traverse(Traverse*);
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_flatten(Gogo*, Named_object*, Statement_inserter*);
do_traverse(Traverse* traverse);
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_flatten(Gogo*, Named_object*, Statement_inserter*);
{ return Expression::traverse(&this->expr_, traverse); }
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_flatten(Gogo*, Named_object*, Statement_inserter*);
do_traverse(Traverse* traverse);
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_flatten(Gogo*, Named_object*, Statement_inserter*);
{ return this->exprs_->traverse(traverse); }
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int)
+ do_lower(Gogo*, Named_object*, Statement_inserter*)
{ return this; }
Expression*
do_traverse(Traverse*);
virtual Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
virtual Expression*
do_flatten(Gogo*, Named_object*, Statement_inserter*);
protected:
// This overrides Call_expression::do_lower.
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_flatten(Gogo*, Named_object*, Statement_inserter*);
do_is_addressable() const;
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_copy()
do_is_addressable() const;
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*s);
Expression*
do_copy()
{ return Expression::traverse(&this->expr_, traverse); }
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Type*
do_type();
do_check_types(Gogo*);
Expression*
- do_lower(Gogo*, Named_object*, Statement_inserter*, int);
+ do_lower(Gogo*, Named_object*, Statement_inserter*);
Expression*
do_copy();
| traverse_functions
| traverse_statements
| traverse_expressions),
- gogo_(gogo), function_(function), iota_value_(-1), inserter_()
+ gogo_(gogo), function_(function), inserter_()
{ }
void
Gogo* gogo_;
// The function we are traversing.
Named_object* function_;
- // Value to use for the predeclared constant iota.
- int iota_value_;
// Current statement inserter for use by expressions.
Statement_inserter inserter_;
};
{
Expression* e = *pexpr;
Expression* enew = e->lower(this->gogo_, this->function_,
- &this->inserter_, this->iota_value_);
+ &this->inserter_);
if (enew == e)
break;
if (enew->traverse_subexpressions(this) == TRAVERSE_EXIT)