Commit e0032df8 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: default avatarDavid Crawshaw <crawshaw@golang.org>
parent cd6619d2
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment