Skip to content

Commit ce76298

Browse files
MakDonrandall77
authored andcommitted
Update oudated comment
Update comment cause gc/select.go has been moved to walk/select.go and gc/reflect.go has been moved to reflectdata/reflect.go Change-Id: I6894527e1e9dbca50ace92a51bf942f9495ce88c GitHub-Last-Rev: 6d6a447 GitHub-Pull-Request: #45976 Reviewed-on: https://go-review.googlesource.com/c/go/+/317191 Reviewed-by: Keith Randall <khr@golang.org> Trust: Michael Pratt <mpratt@google.com>
1 parent 2ca44fe commit ce76298

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

src/cmd/compile/internal/reflectdata/reflect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ var kinds = []int{
669669
// tflag is documented in reflect/type.go.
670670
//
671671
// tflag values must be kept in sync with copies in:
672-
// cmd/compile/internal/gc/reflect.go
672+
// cmd/compile/internal/reflectdata/reflect.go
673673
// cmd/link/internal/ld/decodesym.go
674674
// reflect/type.go
675675
// runtime/type.go

src/cmd/link/internal/ld/decodesym.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ import (
1616

1717
// Decoding the type.* symbols. This has to be in sync with
1818
// ../../runtime/type.go, or more specifically, with what
19-
// cmd/compile/internal/gc/reflect.go stuffs in these.
19+
// cmd/compile/internal/reflectdata/reflect.go stuffs in these.
2020

2121
// tflag is documented in reflect/type.go.
2222
//
2323
// tflag values must be kept in sync with copies in:
24-
// cmd/compile/internal/gc/reflect.go
24+
// cmd/compile/internal/reflectdata/reflect.go
2525
// cmd/link/internal/ld/decodesym.go
2626
// reflect/type.go
2727
// runtime/type.go

src/internal/reflectlite/type.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type Type interface {
6868
}
6969

7070
/*
71-
* These data structures are known to the compiler (../../cmd/internal/gc/reflect.go).
71+
* These data structures are known to the compiler (../../cmd/internal/reflectdata/reflect.go).
7272
* A few are known to ../runtime/type.go to convey to debuggers.
7373
* They are also known to ../runtime/type.go.
7474
*/
@@ -111,7 +111,7 @@ const (
111111
// available in the memory directly following the rtype value.
112112
//
113113
// tflag values must be kept in sync with copies in:
114-
// cmd/compile/internal/gc/reflect.go
114+
// cmd/compile/internal/reflectdata/reflect.go
115115
// cmd/link/internal/ld/decodesym.go
116116
// runtime/type.go
117117
type tflag uint8

src/reflect/type.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ type Type interface {
228228
// See https://golang.org/issue/4876 for more details.
229229

230230
/*
231-
* These data structures are known to the compiler (../../cmd/internal/gc/reflect.go).
231+
* These data structures are known to the compiler (../../cmd/internal/reflectdata/reflect.go).
232232
* A few are known to ../runtime/type.go to convey to debuggers.
233233
* They are also known to ../runtime/type.go.
234234
*/
@@ -271,7 +271,7 @@ const (
271271
// available in the memory directly following the rtype value.
272272
//
273273
// tflag values must be kept in sync with copies in:
274-
// cmd/compile/internal/gc/reflect.go
274+
// cmd/compile/internal/reflectdata/reflect.go
275275
// cmd/link/internal/ld/decodesym.go
276276
// runtime/type.go
277277
type tflag uint8
@@ -1910,7 +1910,7 @@ func MapOf(key, elem Type) Type {
19101910

19111911
// Make a map type.
19121912
// Note: flag values must match those used in the TMAP case
1913-
// in ../cmd/compile/internal/gc/reflect.go:writeType.
1913+
// in ../cmd/compile/internal/reflectdata/reflect.go:writeType.
19141914
var imap interface{} = (map[unsafe.Pointer]unsafe.Pointer)(nil)
19151915
mt := **(**mapType)(unsafe.Pointer(&imap))
19161916
mt.str = resolveReflectName(newName(s, "", false))
@@ -2841,7 +2841,7 @@ func runtimeStructField(field StructField) (structField, string) {
28412841

28422842
// typeptrdata returns the length in bytes of the prefix of t
28432843
// containing pointer data. Anything after this offset is scalar data.
2844-
// keep in sync with ../cmd/compile/internal/gc/reflect.go
2844+
// keep in sync with ../cmd/compile/internal/reflectdata/reflect.go
28452845
func typeptrdata(t *rtype) uintptr {
28462846
switch t.Kind() {
28472847
case Struct:
@@ -2865,7 +2865,7 @@ func typeptrdata(t *rtype) uintptr {
28652865
}
28662866
}
28672867

2868-
// See cmd/compile/internal/gc/reflect.go for derivation of constant.
2868+
// See cmd/compile/internal/reflectdata/reflect.go for derivation of constant.
28692869
const maxPtrmaskBytes = 2048
28702870

28712871
// ArrayOf returns the array type with the given length and element type.

src/runtime/runtime2.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ type funcinl struct {
895895
// layout of Itab known to compilers
896896
// allocated in non-garbage-collected memory
897897
// Needs to be in sync with
898-
// ../cmd/compile/internal/gc/reflect.go:/^func.WriteTabs.
898+
// ../cmd/compile/internal/reflectdata/reflect.go:/^func.WriteTabs.
899899
type itab struct {
900900
inter *interfacetype
901901
_type *_type
@@ -940,7 +940,7 @@ func extendRandom(r []byte, n int) {
940940

941941
// A _defer holds an entry on the list of deferred calls.
942942
// If you add a field here, add code to clear it in freedefer and deferProcStack
943-
// This struct must match the code in cmd/compile/internal/gc/reflect.go:deferstruct
943+
// This struct must match the code in cmd/compile/internal/reflectdata/reflect.go:deferstruct
944944
// and cmd/compile/internal/gc/ssa.go:(*state).call.
945945
// Some defers will be allocated on the stack and some on the heap.
946946
// All defers are logically part of the stack, so write barriers to

src/runtime/select.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const debugSelect = false
1515

1616
// Select case descriptor.
1717
// Known to compiler.
18-
// Changes here must also be made in src/cmd/internal/gc/select.go's scasetype.
18+
// Changes here must also be made in src/cmd/compile/internal/walk/select.go's scasetype.
1919
type scase struct {
2020
c *hchan // chan
2121
elem unsafe.Pointer // data element

src/runtime/type.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import "unsafe"
1111
// tflag is documented in reflect/type.go.
1212
//
1313
// tflag values must be kept in sync with copies in:
14-
// cmd/compile/internal/gc/reflect.go
14+
// cmd/compile/internal/reflectdata/reflect.go
1515
// cmd/link/internal/ld/decodesym.go
1616
// reflect/type.go
1717
// internal/reflectlite/type.go
@@ -25,7 +25,7 @@ const (
2525
)
2626

2727
// Needs to be in sync with ../cmd/link/internal/ld/decodesym.go:/^func.commonsize,
28-
// ../cmd/compile/internal/gc/reflect.go:/^func.dcommontype and
28+
// ../cmd/compile/internal/reflectdata/reflect.go:/^func.dcommontype and
2929
// ../reflect/type.go:/^type.rtype.
3030
// ../internal/reflectlite/type.go:/^type.rtype.
3131
type _type struct {
@@ -383,7 +383,7 @@ type maptype struct {
383383
}
384384

385385
// Note: flag values must match those used in the TMAP case
386-
// in ../cmd/compile/internal/gc/reflect.go:writeType.
386+
// in ../cmd/compile/internal/reflectdata/reflect.go:writeType.
387387
func (mt *maptype) indirectkey() bool { // store ptr to key instead of key itself
388388
return mt.flags&1 != 0
389389
}

0 commit comments

Comments
 (0)