aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-02-03 11:54:11 +0300
committerDmitry Vyukov <dvyukov@google.com>2015-02-11 10:37:45 +0000
commit84e256753744e765e4a31b48e2a641eecd4d01f1 (patch)
treebeb0c54be1363acde865660a4a2e28a3b5138c95 /src
parente604c6e2935140ed6978f4df112a1e4a790760af (diff)
downloadgo-84e256753744e765e4a31b48e2a641eecd4d01f1.tar.xz
reflect: mark map access functions as go:noescape
benchmark old allocs new allocs delta BenchmarkSkipValue 14914 14202 -4.77% Change-Id: I40e1fe8843cc6a099a2abfcd814ecc2a2d6a5b1f Reviewed-on: https://go-review.googlesource.com/3744 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/reflect/value.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/reflect/value.go b/src/reflect/value.go
index 4060206eac..081c4d9d7b 100644
--- a/src/reflect/value.go
+++ b/src/reflect/value.go
@@ -2439,12 +2439,27 @@ func chansend(t *rtype, ch unsafe.Pointer, val unsafe.Pointer, nb bool) bool
func makechan(typ *rtype, size uint64) (ch unsafe.Pointer)
func makemap(t *rtype) (m unsafe.Pointer)
+
+//go:noescape
func mapaccess(t *rtype, m unsafe.Pointer, key unsafe.Pointer) (val unsafe.Pointer)
+
func mapassign(t *rtype, m unsafe.Pointer, key, val unsafe.Pointer)
+
+//go:noescape
func mapdelete(t *rtype, m unsafe.Pointer, key unsafe.Pointer)
+
+// m escapes into the return value, but the caller of mapiterinit
+// doesn't let the return value escape.
+//go:noescape
func mapiterinit(t *rtype, m unsafe.Pointer) unsafe.Pointer
+
+//go:noescape
func mapiterkey(it unsafe.Pointer) (key unsafe.Pointer)
+
+//go:noescape
func mapiternext(it unsafe.Pointer)
+
+//go:noescape
func maplen(m unsafe.Pointer) int
// call calls fn with a copy of the n argument bytes pointed at by arg.