Commit 1e0b3789 authored by Keith Randall's avatar Keith Randall

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
parent cecca438
...@@ -34,7 +34,7 @@ func RaceSemrelease(s *uint32) ...@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment