Rewrite conversion of named types to backend representation.
[gcc.git] / gcc / go / gofrontend / gogo.h
index cb3fe67f39e1a713015f781340417cfe46a19886..8db802ea53e34881dc8ba645423f9dd5450bd052 100644 (file)
@@ -112,6 +112,10 @@ class Gogo
   void
   set_package_name(const std::string&, source_location);
 
+  // Return whether this is the "main" package.
+  bool
+  is_main_package() const;
+
   // If necessary, adjust the name to use for a hidden symbol.  We add
   // a prefix of the package name, so that hidden symbols in different
   // packages do not collide.
@@ -401,6 +405,20 @@ class Gogo
   void
   simplify_thunk_statements();
 
+  // Convert named types to the backend representation.
+  void
+  convert_named_types();
+
+  // Convert named types in a list of bindings.
+  void
+  convert_named_types_in_bindings(Bindings*);
+
+  // True if named types have been converted to the backend
+  // representation.
+  bool
+  named_types_are_converted() const
+  { return this->named_types_are_converted_; }
+
   // Write out the global values.
   void
   write_globals();
@@ -653,8 +671,12 @@ class Gogo
   std::set<Import_init> imported_init_fns_;
   // The unique prefix used for all global symbols.
   std::string unique_prefix_;
+  // Whether an explicit unique prefix was set by -fgo-prefix.
+  bool unique_prefix_specified_;
   // A list of interface types defined while parsing.
   std::vector<Interface_type*> interface_types_;
+  // Whether named types have been converted.
+  bool named_types_are_converted_;
 };
 
 // A block of statements.