runtime: convert hash functions to Go calling convention.

Create proper closures so hash functions can be called
directly from Go.  Rearrange calling convention so return
value is directly accessible.

LGTM=dvyukov
R=golang-codereviews, dvyukov, dave, khr
CC=golang-codereviews
https://golang.org/cl/119360043
This commit is contained in:
Keith Randall 2014-07-31 15:07:05 -07:00
parent 5a3336096f
commit a2a9768414
13 changed files with 197 additions and 417 deletions

View file

@ -71,12 +71,6 @@ func testSchedLocalQueueSteal()
var TestSchedLocalQueue1 = testSchedLocalQueue
var TestSchedLocalQueueSteal1 = testSchedLocalQueueSteal
func haveGoodHash() bool
func stringHash(s string, seed uintptr) uintptr
func bytesHash(b []byte, seed uintptr) uintptr
func int32Hash(i uint32, seed uintptr) uintptr
func int64Hash(i uint64, seed uintptr) uintptr
var HaveGoodHash = haveGoodHash
var StringHash = stringHash
var BytesHash = bytesHash