diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-06-21 00:29:54 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-06-21 00:29:54 +0000 |
commit | bc6ad87f60c29b76fddc2a4c770c26291d399556 (patch) | |
tree | 9778045effaf2dec6b23437a25c9d6b68c569a45 /gcc/go | |
parent | 593bcbb8e43c07296325e167ba98bdc52ee3c8de (diff) | |
download | gcc-bc6ad87f60c29b76fddc2a4c770c26291d399556.tar.gz |
compiler: Really only make descriptors when needed.
From-SVN: r200280
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 18 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.h | 3 |
2 files changed, 0 insertions, 21 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 240e4558d9d..9f3b6f51848 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -1242,24 +1242,6 @@ Func_expression::do_traverse(Traverse* traverse) : Expression::traverse(&this->closure_, traverse)); } -// Lower a function reference. If this reference is not called -// directly, make sure there is a function descriptor. - -Expression* -Func_expression::do_lower(Gogo* gogo, Named_object*, Statement_inserter*, int) -{ - // Make sure that the descriptor exists. FIXME: If the function is - // only ever called, and is never referenced otherwise, then we - // don't need the descriptor. We could do that with another pass - // over the tree. - if (this->closure_ == NULL - && this->function_->is_function() - && !this->function_->func_value()->is_method()) - this->function_->func_value()->descriptor(gogo, this->function_); - - return this; -} - // Return the type of a function expression. Type* diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h index 133b23789b5..dd00286f4df 100644 --- a/gcc/go/gofrontend/expressions.h +++ b/gcc/go/gofrontend/expressions.h @@ -1524,9 +1524,6 @@ class Func_expression : public Expression int do_traverse(Traverse*); - Expression* - do_lower(Gogo*, Named_object*, Statement_inserter*, int); - Type* do_type(); |