// identity function which gets nothing but a pointer to the value
// and a size.
bool
- compare_is_identity() const
- { return this->do_compare_is_identity(); }
+ compare_is_identity(Gogo* gogo) const
+ { return this->do_compare_is_identity(gogo); }
// Return a hash code for this type for the method hash table.
// Types which are equivalent according to are_identical will have
// Whether the backend size is known.
bool
- is_backend_type_size_known(Gogo*) const;
+ is_backend_type_size_known(Gogo*);
// Get the hash and equality functions for a type.
void
{ return false; }
virtual bool
- do_compare_is_identity() const = 0;
+ do_compare_is_identity(Gogo*) const = 0;
virtual unsigned int
do_hash_for_method(Gogo*) const;
protected:
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return true; }
unsigned int
protected:
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return false; }
unsigned int
protected:
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return false; }
unsigned int
{ return true; }
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return false; }
Btype*
{ return true; }
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return false; }
unsigned int
{ return true; }
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return true; }
unsigned int
Location) const;
// Return the total number of fields, including embedded fields.
- // This is the number of values which can appear in a conversion to
+ // This is the number of values that can appear in a conversion to
// this type.
unsigned int
total_field_count() const;
do_has_pointer() const;
bool
- do_compare_is_identity() const;
+ do_compare_is_identity(Gogo*) const;
unsigned int
do_hash_for_method(Gogo*) const;
array_has_hidden_fields(const Named_type* within, std::string* reason) const
{ return this->element_type_->has_hidden_fields(within, reason); }
- // Build the hash and equality functions if necessary.
- void
- finalize_methods(Gogo*);
-
// Return a tree for the pointer to the values in an array.
tree
value_pointer_tree(Gogo*, tree array) const;
}
bool
- do_compare_is_identity() const
- {
- return (this->length_ != NULL
- && this->element_type_->compare_is_identity());
- }
+ do_compare_is_identity(Gogo*) const;
unsigned int
do_hash_for_method(Gogo*) const;
{ return true; }
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return false; }
unsigned int
{ return true; }
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return true; }
unsigned int
{ return true; }
bool
- do_compare_is_identity() const
+ do_compare_is_identity(Gogo*) const
{ return false; }
unsigned int
location_(location), named_btype_(NULL), dependencies_(),
is_visible_(true), is_error_(false), is_placeholder_(false),
is_converted_(false), is_circular_(false), seen_(false),
- seen_in_get_backend_(false)
+ seen_in_compare_is_identity_(false), seen_in_get_backend_(false)
{ }
// Return the associated Named_object. This holds the actual name.
do_has_pointer() const;
bool
- do_compare_is_identity() const;
+ do_compare_is_identity(Gogo*) const;
unsigned int
do_hash_for_method(Gogo*) const;
// This is mutable because it is always reset to false when the
// function exits.
mutable bool seen_;
+ // Like seen_, but used only by do_compare_is_identity.
+ mutable bool seen_in_compare_is_identity_;
// Like seen_, but used only by do_get_backend.
bool seen_in_get_backend_;
};
{ return this->real_type()->has_pointer(); }
bool
- do_compare_is_identity() const
- { return this->real_type()->compare_is_identity(); }
+ do_compare_is_identity(Gogo* gogo) const
+ { return this->real_type()->compare_is_identity(gogo); }
unsigned int
do_hash_for_method(Gogo* gogo) const