compiler: split writing of equal and hash functions for types
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 2 Jan 2020 21:51:07 +0000 (21:51 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 2 Jan 2020 21:51:07 +0000 (21:51 +0000)
commit9279b5ba4538da8041f074db3f5fcd9e8ecff93e
tree5791199f9234d308eaee94877178b863d50880c4
parent45b6395b202b637cae76c73dce846e5eb1954870
compiler: split writing of equal and hash functions for types

    Separate the generation of type equality and hash functions, rather
    than doing them in a single operation.

    This is almost entirely a pure refactoring in preparation for
    generating hash functions only for types that are map keys.  The only
    change in generated code is that for types that are the size of
    numeric types, but not aligned like numeric types, such as [8]byte,
    now use standard hash functions.  They previously used special-purpose
    hash functions because they required special-purpose equal functions.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212842

From-SVN: r279847
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/names.cc
gcc/go/gofrontend/types.cc
gcc/go/gofrontend/types.h