imported_init_fns_(),
unique_prefix_(),
unique_prefix_specified_(false),
+ verify_types_(),
interface_types_(),
specific_type_functions_(),
specific_type_functions_are_written_(false),
}
}
+// Add a type to verify. This is used for types of sink variables, in
+// order to give appropriate error messages.
+
+void
+Gogo::add_type_to_verify(Type* type)
+{
+ this->verify_types_.push_back(type);
+}
+
// Traversal class used to verify types.
class Verify_types : public Traverse
{
Verify_types traverse;
this->traverse(&traverse);
+
+ for (std::vector<Type*>::iterator p = this->verify_types_.begin();
+ p != this->verify_types_.end();
+ ++p)
+ (*p)->verify();
+ this->verify_types_.clear();
}
// Traversal class used to lower parse tree.
Named_object*
add_sink();
+ // Add a type which needs to be verified. This is used for sink
+ // types, just to give appropriate error messages.
+ void
+ add_type_to_verify(Type* type);
+
// Add a named object to the current namespace. This is used for
// import . "package".
void
std::string unique_prefix_;
// Whether an explicit unique prefix was set by -fgo-prefix.
bool unique_prefix_specified_;
+ // A list of types to verify.
+ std::vector<Type*> verify_types_;
// A list of interface types defined while parsing.
std::vector<Interface_type*> interface_types_;
// Type specific functions to write out.