diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-06-29 12:53:02 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-06-29 13:44:37 -0700 |
commit | 13c906f43f473ee9ff16d80590789d719f2190a4 (patch) | |
tree | 1ace75a3584762f6a3768dbf27b6e02d0df80279 /gcc/go/gofrontend/expressions.h | |
parent | cca7eb8f7cc157ed1b351cbaa10a4066f8065c3a (diff) | |
download | gcc-13c906f43f473ee9ff16d80590789d719f2190a4.zip gcc-13c906f43f473ee9ff16d80590789d719f2190a4.tar.gz gcc-13c906f43f473ee9ff16d80590789d719f2190a4.tar.bz2 |
compiler: don't generate temporaries for composite literals
We were generating temporaries for composite literals when a
conversion to interface type was required. However, Cherry's
https://golang.org/cl/176459 changed the compiler to insert explicit
type conversions. And those explicit type conversions insert the
required temporaries in Type_conversion_expression::do_flatten.
So in practice the composite literal do_flatten methods would never
insert temporaries, as the values they see would always be multi_eval_safe.
So just remove the unnecessary do_flatten methods.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/331691
Diffstat (limited to 'gcc/go/gofrontend/expressions.h')
-rw-r--r-- | gcc/go/gofrontend/expressions.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h index e3747cc..57c974d 100644 --- a/gcc/go/gofrontend/expressions.h +++ b/gcc/go/gofrontend/expressions.h @@ -3806,9 +3806,6 @@ class Struct_construction_expression : public Expression, Expression* do_copy(); - Expression* - do_flatten(Gogo*, Named_object*, Statement_inserter*); - Bexpression* do_get_backend(Translate_context*); @@ -3881,9 +3878,6 @@ protected: indexes() { return this->indexes_; } - Expression* - do_flatten(Gogo*, Named_object*, Statement_inserter*); - // Get the backend constructor for the array values. Bexpression* get_constructor(Translate_context* context, Btype* btype); |