mirror of
https://github.com/golang/go
synced 2024-11-19 10:44:47 -07:00
runtime: use right mask to extract type kind
Cleanup from recent malloc changes. LGTM=dvyukov R=dvyukov CC=golang-codereviews https://golang.org/cl/120960043
This commit is contained in:
parent
cecca43804
commit
1e0b378905
@ -34,7 +34,7 @@ func RaceSemrelease(s *uint32)
|
|||||||
const raceenabled = true
|
const raceenabled = true
|
||||||
|
|
||||||
func raceReadObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr) {
|
func raceReadObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr) {
|
||||||
kind := t.kind &^ kindNoPointers
|
kind := t.kind & kindMask
|
||||||
if kind == kindArray || kind == kindStruct {
|
if kind == kindArray || kind == kindStruct {
|
||||||
// for composite objects we have to read every address
|
// for composite objects we have to read every address
|
||||||
// because a write might happen to any subobject.
|
// because a write might happen to any subobject.
|
||||||
|
Loading…
Reference in New Issue
Block a user