compiler, runtime: drop size arguments to hash/equal functions
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 10 Jan 2017 03:59:20 +0000 (03:59 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 10 Jan 2017 03:59:20 +0000 (03:59 +0000)
commit0c22e4415fe9e88acaa99e72d33f4500d557ce68
treeab834b9b0b4730baa18d49e3c47ae5033b722809
parent8462d909a7439fb0bf7095144dbf36524c7e61ea
compiler, runtime: drop size arguments to hash/equal functions

    Drop the size arguments for the hash/equal functions stored in type
    descriptors.  Types know what size they are.  To make this work,
    generate hash/equal functions for types that can use an identity
    comparison but are not a standard size and alignment.

    Drop the multiplications by 33 in the generated hash code and the
    reflect package hash code.  They are not necessary since we started
    passing a seed value around, as the seed includes the hash of the
    earlier values.

    Copy the algorithms for standard types from the Go 1.7 runtime,
    replacing the C functions.

    Reviewed-on: https://go-review.googlesource.com/34983

From-SVN: r244256
19 files changed:
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/types.cc
gcc/go/gofrontend/types.h
libgo/Makefile.am
libgo/Makefile.in
libgo/go/reflect/type.go
libgo/go/runtime/alg.go
libgo/go/runtime/hashmap.go
libgo/go/runtime/hashmap_fast.go
libgo/go/runtime/type.go
libgo/runtime/go-type-complex.c [deleted file]
libgo/runtime/go-type-float.c [deleted file]
libgo/runtime/go-type-identity.c [deleted file]
libgo/runtime/go-type-string.c [deleted file]
libgo/runtime/go-type.h
libgo/runtime/go-unsafe-pointer.c