This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Go patch committed: Convert named types before flattening
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Thu, 23 Jan 2014 17:01:49 -0800
- Subject: Go patch committed: Convert named types before flattening
- Authentication-results: sourceware.org; auth=none
This patch to the Go frontend from Chris Manghane converts named types
before the flattening pass. This will permit the flattening pass to get
the size of types where necessary. Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu. Committed to mainline.
Ian
diff -r 124e26b93f79 go/go.cc
--- a/go/go.cc Wed Jan 22 11:10:28 2014 -0800
+++ b/go/go.cc Thu Jan 23 17:00:16 2014 -0800
@@ -119,6 +119,9 @@
// Use temporary variables to force order of evaluation.
::gogo->order_evaluations();
+ // Convert named types to backend representation.
+ ::gogo->convert_named_types();
+
// Flatten the parse tree.
::gogo->flatten();
diff -r 124e26b93f79 go/gogo-tree.cc
--- a/go/gogo-tree.cc Wed Jan 22 11:10:28 2014 -0800
+++ b/go/gogo-tree.cc Thu Jan 23 17:00:16 2014 -0800
@@ -755,7 +755,6 @@
void
Gogo::write_globals()
{
- this->convert_named_types();
this->build_interface_method_tables();
Bindings* bindings = this->current_bindings();