Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(171)

Unified Diff: src/pkg/runtime/slice.go

Issue 140870044: code review 140870044: runtime: introduce, use funcPC to convert Go func to PC (Closed)
Patch Set: diff -r 2008238cdc04dc6419ab75310eb8e6ee17098481 https://code.google.com/p/go/ Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/runtime/select.go ('k') | src/pkg/runtime/string.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/slice.go
===================================================================
--- a/src/pkg/runtime/slice.go
+++ b/src/pkg/runtime/slice.go
@@ -48,9 +48,7 @@
if raceenabled {
callerpc := getcallerpc(unsafe.Pointer(&t))
- fn := growslice
- pc := **(**uintptr)(unsafe.Pointer(&fn))
- racereadrangepc(old.array, old.len*int(t.elem.size), callerpc, pc)
+ racereadrangepc(old.array, old.len*int(t.elem.size), callerpc, funcPC(growslice))
}
et := t.elem
@@ -105,8 +103,7 @@
if raceenabled {
callerpc := getcallerpc(unsafe.Pointer(&to))
- fn := slicecopy
- pc := **(**uintptr)(unsafe.Pointer(&fn))
+ pc := funcPC(slicecopy)
racewriterangepc(to.array, n*int(width), callerpc, pc)
racereadrangepc(fm.array, n*int(width), callerpc, pc)
}
@@ -133,8 +130,7 @@
if raceenabled {
callerpc := getcallerpc(unsafe.Pointer(&to))
- fn := slicestringcopy
- pc := **(**uintptr)(unsafe.Pointer(&fn))
+ pc := funcPC(slicestringcopy)
racewriterangepc(unsafe.Pointer(&to[0]), n, callerpc, pc)
}
« no previous file with comments | « src/pkg/runtime/select.go ('k') | src/pkg/runtime/string.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b