diff options
| author | Keith Randall <khr@golang.org> | 2014-07-31 15:07:05 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2014-07-31 15:07:05 -0700 |
| commit | a2a97684146d63cbde77b5c95b4403da53b79459 (patch) | |
| tree | a1cd100c7579213520ac8db4beb48c5868537cf3 /src/pkg/runtime/runtime.h | |
| parent | 5a3336096f19c7c813305f548e054b86391874ff (diff) | |
| download | go-a2a97684146d63cbde77b5c95b4403da53b79459.tar.xz | |
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
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 22551bda36..e6354d7e9c 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -633,7 +633,7 @@ enum typedef struct Alg Alg; struct Alg { - void (*hash)(uintptr*, uintptr, void*); + FuncVal* hash; void (*equal)(bool*, uintptr, void*, void*); void (*print)(uintptr, void*); void (*copy)(uintptr, void*, void*); @@ -651,15 +651,19 @@ enum { }; void runtime·hashinit(void); -void runtime·memhash(uintptr*, uintptr, void*); -void runtime·nohash(uintptr*, uintptr, void*); -void runtime·strhash(uintptr*, uintptr, void*); -void runtime·interhash(uintptr*, uintptr, void*); -void runtime·nilinterhash(uintptr*, uintptr, void*); -void runtime·aeshash(uintptr*, uintptr, void*); -void runtime·aeshash32(uintptr*, uintptr, void*); -void runtime·aeshash64(uintptr*, uintptr, void*); -void runtime·aeshashstr(uintptr*, uintptr, void*); +uintptr runtime·memhash(void*, uintptr, uintptr); +uintptr runtime·nohash(void*, uintptr, uintptr); +uintptr runtime·strhash(void*, uintptr, uintptr); +uintptr runtime·interhash(void*, uintptr, uintptr); +uintptr runtime·nilinterhash(void*, uintptr, uintptr); +uintptr runtime·f32hash(void*, uintptr, uintptr); +uintptr runtime·f64hash(void*, uintptr, uintptr); +uintptr runtime·c64hash(void*, uintptr, uintptr); +uintptr runtime·c128hash(void*, uintptr, uintptr); +uintptr runtime·aeshash(void*, uintptr, uintptr); +uintptr runtime·aeshash32(void*, uintptr, uintptr); +uintptr runtime·aeshash64(void*, uintptr, uintptr); +uintptr runtime·aeshashstr(void*, uintptr, uintptr); void runtime·memequal(bool*, uintptr, void*, void*); void runtime·noequal(bool*, uintptr, void*, void*); |
