diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2016-02-20 22:52:15 -0800 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2016-02-21 20:59:36 +0000 |
| commit | 8ffe496ae792a1cdc845c1c019323cf6c05fbb32 (patch) | |
| tree | 4ff61aff7fbc197e234a2d3a08d7fbc9f3498153 /src/runtime/alg.go | |
| parent | e960302410fafaf595c1ad92c28c61da3a254d63 (diff) | |
| download | go-8ffe496ae792a1cdc845c1c019323cf6c05fbb32.tar.xz | |
cmd/compile, runtime: eliminate unnecessary algorithm types
There's no need for 8 different ways to represent that a type is
non-comparable.
While here, move AMEM out of the runtime-known algorithm values since
it's not needed at run-time, and get rid of the unused AUNK constant.
Change-Id: Ie23972b692c6f27fc5f1a908561b3e26ef5a50e9
Reviewed-on: https://go-review.googlesource.com/19779
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'src/runtime/alg.go')
| -rw-r--r-- | src/runtime/alg.go | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go index 9ea0eb0187..541649c62d 100644 --- a/src/runtime/alg.go +++ b/src/runtime/alg.go @@ -16,24 +16,16 @@ const ( // type algorithms - known to compiler const ( - alg_MEM = iota + alg_NOEQ = iota alg_MEM0 alg_MEM8 alg_MEM16 alg_MEM32 alg_MEM64 alg_MEM128 - alg_NOEQ - alg_NOEQ0 - alg_NOEQ8 - alg_NOEQ16 - alg_NOEQ32 - alg_NOEQ64 - alg_NOEQ128 alg_STRING alg_INTER alg_NILINTER - alg_SLICE alg_FLOAT32 alg_FLOAT64 alg_CPLX64 @@ -77,24 +69,16 @@ func memhash128(p unsafe.Pointer, h uintptr) uintptr { func memhash_varlen(p unsafe.Pointer, h uintptr) uintptr var algarray = [alg_max]typeAlg{ - alg_MEM: {nil, nil}, // not used + alg_NOEQ: {nil, nil}, alg_MEM0: {memhash0, memequal0}, alg_MEM8: {memhash8, memequal8}, alg_MEM16: {memhash16, memequal16}, alg_MEM32: {memhash32, memequal32}, alg_MEM64: {memhash64, memequal64}, alg_MEM128: {memhash128, memequal128}, - alg_NOEQ: {nil, nil}, - alg_NOEQ0: {nil, nil}, - alg_NOEQ8: {nil, nil}, - alg_NOEQ16: {nil, nil}, - alg_NOEQ32: {nil, nil}, - alg_NOEQ64: {nil, nil}, - alg_NOEQ128: {nil, nil}, alg_STRING: {strhash, strequal}, alg_INTER: {interhash, interequal}, alg_NILINTER: {nilinterhash, nilinterequal}, - alg_SLICE: {nil, nil}, alg_FLOAT32: {f32hash, f32equal}, alg_FLOAT64: {f64hash, f64equal}, alg_CPLX64: {c64hash, c64equal}, |
