Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
reflect, runtime: gofmt
Browse files Browse the repository at this point in the history
Change-Id: I5437b3a36181373d8ff33225d7520ab321459de9
Reviewed-on: https://go-review.googlesource.com/2084
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
mattn authored and bradfitz committed Dec 26, 2014
1 parent 1c0c611 commit e26e3fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/reflect/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ func FuncLayout(t Type, rcvr Type) (frametype Type, argSize, retOffset uintptr,
for i := uint32(0); i < s.n; i += 2 {
stack = append(stack, s.data[i/8]>>(i%8)&3)
}
if ft.kind & kindGCProg != 0 {
if ft.kind&kindGCProg != 0 {
panic("can't handle gc programs")
}
gcdata := (*[1000]byte)(ft.gc[0])
for i := uintptr(0); i < ft.size/ptrSize; i++ {
gc = append(gc, gcdata[i/2] >> (i%2*4+2) & 3)
gc = append(gc, gcdata[i/2]>>(i%2*4+2)&3)
}
ptrs = ft.kind & kindNoPointers == 0
ptrs = ft.kind&kindNoPointers == 0
return
}
6 changes: 3 additions & 3 deletions src/runtime/hashmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ type hmap struct {

// A bucket for a Go map.
type bmap struct {
tophash [bucketCnt]uint8
tophash [bucketCnt]uint8
// Followed by bucketCnt keys and then bucketCnt values.
// NOTE: packing all the keys together and then all the values together makes the
// code a bit more complicated than alternating key/value/key/value/... but it allows
Expand Down Expand Up @@ -150,10 +150,10 @@ func evacuated(b *bmap) bool {
}

func (b *bmap) overflow(t *maptype) *bmap {
return *(**bmap)(add(unsafe.Pointer(b), uintptr(t.bucketsize) - regSize))
return *(**bmap)(add(unsafe.Pointer(b), uintptr(t.bucketsize)-regSize))
}
func (b *bmap) setoverflow(t *maptype, ovf *bmap) {
*(**bmap)(add(unsafe.Pointer(b), uintptr(t.bucketsize) - regSize)) = ovf
*(**bmap)(add(unsafe.Pointer(b), uintptr(t.bucketsize)-regSize)) = ovf
}

func makemap(t *maptype, hint int64) *hmap {
Expand Down

0 comments on commit e26e3fa

Please sign in to comment.