]> Cypherpunks repositories - gostls13.git/commitdiff
reflect, runtime: gofmt
authormattn <mattn.jp@gmail.com>
Fri, 26 Dec 2014 02:44:55 +0000 (11:44 +0900)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 26 Dec 2014 04:43:33 +0000 (04:43 +0000)
Change-Id: I5437b3a36181373d8ff33225d7520ab321459de9
Reviewed-on: https://go-review.googlesource.com/2084
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/reflect/export_test.go
src/runtime/hashmap.go

index 1ef63b034f6cc07c4477825253d0d5cc0272ee74..82a8a10930a816363603252500c7312ffa826656 100644 (file)
@@ -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
 }
index adaf65e419b20fd086e052f7d0692dc549c56d8a..077a4dfc986dd52f18960a19114c807d0d998829 100644 (file)
@@ -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
@@ -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 {