aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2014-12-26 11:44:55 +0900
committerBrad Fitzpatrick <bradfitz@golang.org>2014-12-26 04:43:33 +0000
commite26e3fa25a2ab428ab04103757b08ed938b356ae (patch)
treec5a143db0e082bd19ba077dfcc026e3e73fafe65 /src
parent1c0c611fc2a7e1ce7eb39626ca7b120b62aac557 (diff)
downloadgo-e26e3fa25a2ab428ab04103757b08ed938b356ae.tar.xz
reflect, runtime: gofmt
Change-Id: I5437b3a36181373d8ff33225d7520ab321459de9 Reviewed-on: https://go-review.googlesource.com/2084 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/reflect/export_test.go6
-rw-r--r--src/runtime/hashmap.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/reflect/export_test.go b/src/reflect/export_test.go
index 1ef63b034f..82a8a10930 100644
--- a/src/reflect/export_test.go
+++ b/src/reflect/export_test.go
@@ -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
}
diff --git a/src/runtime/hashmap.go b/src/runtime/hashmap.go
index adaf65e419..077a4dfc98 100644
--- a/src/runtime/hashmap.go
+++ b/src/runtime/hashmap.go
@@ -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 {