cmd/compile: make alg gen prologue/epilogue match

With this, the start and end of geneq and genhash
are parallel. This removes a few rare nilchecks
from generated hash functions, but nothing
to write home about.

Change-Id: I3b4836111d04daa6f6834a579bbec374a3f42c70
Reviewed-on: https://go-review.googlesource.com/20456
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2016-02-28 15:56:21 -08:00
parent cd6619d2e6
commit e0032df81e

View file

@ -289,7 +289,9 @@ func genhash(sym *Sym, t *Type) {
old_safemode := safemode
safemode = 0
Disable_checknil++
funccompile(fn)
Disable_checknil--
safemode = old_safemode
}
@ -357,6 +359,7 @@ func geneq(sym *Sym, t *Type) {
tfn.Rlist.Append(n)
funchdr(fn)
typecheck(&fn.Func.Nname.Name.Param.Ntype, Etype)
// geneq is only called for types that have equality but
// cannot be handled by the standard algorithms,