diff mbox

Go patch committed: Convert named types before flattening

Message ID mcrsiseqjk2.fsf@iant-glaptop.roam.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor Jan. 24, 2014, 1:01 a.m. UTC
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 mbox

Patch

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();