Commit e6d6ad47 authored by David Crawshaw's avatar David Crawshaw

cmd/compile: update some type names in comments

Change-Id: I741a1205bc6256c08b36efed43652bfbb75e4401
Reviewed-on: https://go-review.googlesource.com/19691Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 41eb5ca0
...@@ -329,8 +329,7 @@ const ( ...@@ -329,8 +329,7 @@ const (
const ( const (
// types of channel // types of channel
// must match ../../pkg/nreflect/type.go:/Chandir // must match ../../../../reflect/type.go:/ChanDir
Cxxx = 0
Crecv = 1 << 0 Crecv = 1 << 0
Csend = 1 << 1 Csend = 1 << 1
Cboth = Crecv | Csend Cboth = Crecv | Csend
......
...@@ -45,7 +45,7 @@ func siglt(a, b *Sig) bool { ...@@ -45,7 +45,7 @@ func siglt(a, b *Sig) bool {
// the given map type. This type is not visible to users - // the given map type. This type is not visible to users -
// we include only enough information to generate a correct GC // we include only enough information to generate a correct GC
// program for it. // program for it.
// Make sure this stays in sync with ../../runtime/hashmap.go! // Make sure this stays in sync with ../../../../runtime/hashmap.go!
const ( const (
BUCKETSIZE = 8 BUCKETSIZE = 8
MAXKEYSIZE = 128 MAXKEYSIZE = 128
...@@ -150,7 +150,7 @@ func mapbucket(t *Type) *Type { ...@@ -150,7 +150,7 @@ func mapbucket(t *Type) *Type {
} }
// Builds a type representing a Hmap structure for the given map type. // Builds a type representing a Hmap structure for the given map type.
// Make sure this stays in sync with ../../runtime/hashmap.go! // Make sure this stays in sync with ../../../../runtime/hashmap.go!
func hmap(t *Type) *Type { func hmap(t *Type) *Type {
if t.Hmap != nil { if t.Hmap != nil {
return t.Hmap return t.Hmap
...@@ -187,7 +187,7 @@ func hiter(t *Type) *Type { ...@@ -187,7 +187,7 @@ func hiter(t *Type) *Type {
} }
// build a struct: // build a struct:
// hash_iter { // hiter {
// key *Key // key *Key
// val *Value // val *Value
// t *MapType // t *MapType
...@@ -201,7 +201,7 @@ func hiter(t *Type) *Type { ...@@ -201,7 +201,7 @@ func hiter(t *Type) *Type {
// bucket uintptr // bucket uintptr
// checkBucket uintptr // checkBucket uintptr
// } // }
// must match ../../runtime/hashmap.go:hash_iter. // must match ../../../../runtime/hashmap.go:hiter.
var field [12]*Type var field [12]*Type
field[0] = makefield("key", Ptrto(t.Down)) field[0] = makefield("key", Ptrto(t.Down))
...@@ -474,7 +474,7 @@ func dgopkgpath(s *Sym, ot int, pkg *Pkg) int { ...@@ -474,7 +474,7 @@ func dgopkgpath(s *Sym, ot int, pkg *Pkg) int {
} }
// uncommonType // uncommonType
// ../../runtime/type.go:/uncommonType // ../../../../runtime/type.go:/uncommonType
func dextratype(sym *Sym, off int, t *Type, ptroff int) int { func dextratype(sym *Sym, off int, t *Type, ptroff int) int {
m := methods(t) m := methods(t)
if t.Sym == nil && len(m) == 0 { if t.Sym == nil && len(m) == 0 {
...@@ -514,7 +514,7 @@ func dextratype(sym *Sym, off int, t *Type, ptroff int) int { ...@@ -514,7 +514,7 @@ func dextratype(sym *Sym, off int, t *Type, ptroff int) int {
// methods // methods
for _, a := range m { for _, a := range m {
// method // method
// ../../runtime/type.go:/method // ../../../../runtime/type.go:/method
ot = dgostringptr(s, ot, a.name) ot = dgostringptr(s, ot, a.name)
ot = dgopkgpath(s, ot, a.pkg) ot = dgopkgpath(s, ot, a.pkg)
...@@ -711,21 +711,21 @@ func dcommontype(s *Sym, ot int, t *Type) int { ...@@ -711,21 +711,21 @@ func dcommontype(s *Sym, ot int, t *Type) int {
gcsym, useGCProg, ptrdata := dgcsym(t) gcsym, useGCProg, ptrdata := dgcsym(t)
// ../../pkg/reflect/type.go:/^type.commonType // ../../../../reflect/type.go:/^type.rtype
// actual type structure // actual type structure
// type commonType struct { // type rtype struct {
// size uintptr // size uintptr
// ptrsize uintptr // ptrdata uintptr
// hash uint32 // hash uint32
// _ uint8 // _ uint8
// align uint8 // align uint8
// fieldAlign uint8 // fieldAlign uint8
// kind uint8 // kind uint8
// alg unsafe.Pointer // alg *typeAlg
// gcdata unsafe.Pointer // gcdata *byte
// string *string // string *string
// *extraType // *uncommonType
// ptrToThis *Type // ptrToThis *rtype
// } // }
ot = duintptr(s, ot, uint64(t.Width)) ot = duintptr(s, ot, uint64(t.Width))
ot = duintptr(s, ot, uint64(ptrdata)) ot = duintptr(s, ot, uint64(ptrdata))
...@@ -1011,7 +1011,7 @@ ok: ...@@ -1011,7 +1011,7 @@ ok:
case TARRAY: case TARRAY:
if t.Bound >= 0 { if t.Bound >= 0 {
// ../../runtime/type.go:/ArrayType // ../../../../runtime/type.go:/arrayType
s1 := dtypesym(t.Type) s1 := dtypesym(t.Type)
t2 := typ(TARRAY) t2 := typ(TARRAY)
...@@ -1024,7 +1024,7 @@ ok: ...@@ -1024,7 +1024,7 @@ ok:
ot = dsymptr(s, ot, s2, 0) ot = dsymptr(s, ot, s2, 0)
ot = duintptr(s, ot, uint64(t.Bound)) ot = duintptr(s, ot, uint64(t.Bound))
} else { } else {
// ../../runtime/type.go:/SliceType // ../../../../runtime/type.go:/sliceType
s1 := dtypesym(t.Type) s1 := dtypesym(t.Type)
ot = dcommontype(s, ot, t) ot = dcommontype(s, ot, t)
...@@ -1032,7 +1032,7 @@ ok: ...@@ -1032,7 +1032,7 @@ ok:
ot = dsymptr(s, ot, s1, 0) ot = dsymptr(s, ot, s1, 0)
} }
// ../../runtime/type.go:/ChanType // ../../../../runtime/type.go:/chanType
case TCHAN: case TCHAN:
s1 := dtypesym(t.Type) s1 := dtypesym(t.Type)
...@@ -1091,7 +1091,7 @@ ok: ...@@ -1091,7 +1091,7 @@ ok:
dtypesym(a.type_) dtypesym(a.type_)
} }
// ../../../runtime/type.go:/InterfaceType // ../../../../runtime/type.go:/interfaceType
ot = dcommontype(s, ot, t) ot = dcommontype(s, ot, t)
xt = ot - 2*Widthptr xt = ot - 2*Widthptr
...@@ -1099,14 +1099,14 @@ ok: ...@@ -1099,14 +1099,14 @@ ok:
ot = duintxx(s, ot, uint64(n), Widthint) ot = duintxx(s, ot, uint64(n), Widthint)
ot = duintxx(s, ot, uint64(n), Widthint) ot = duintxx(s, ot, uint64(n), Widthint)
for _, a := range m { for _, a := range m {
// ../../../runtime/type.go:/imethod // ../../../../runtime/type.go:/imethod
ot = dgostringptr(s, ot, a.name) ot = dgostringptr(s, ot, a.name)
ot = dgopkgpath(s, ot, a.pkg) ot = dgopkgpath(s, ot, a.pkg)
ot = dsymptr(s, ot, dtypesym(a.type_), 0) ot = dsymptr(s, ot, dtypesym(a.type_), 0)
} }
// ../../../runtime/type.go:/MapType // ../../../../runtime/type.go:/mapType
case TMAP: case TMAP:
s1 := dtypesym(t.Down) s1 := dtypesym(t.Down)
...@@ -1141,20 +1141,20 @@ ok: ...@@ -1141,20 +1141,20 @@ ok:
case TPTR32, TPTR64: case TPTR32, TPTR64:
if t.Type.Etype == TANY { if t.Type.Etype == TANY {
// ../../runtime/type.go:/UnsafePointerType // ../../../../runtime/type.go:/UnsafePointerType
ot = dcommontype(s, ot, t) ot = dcommontype(s, ot, t)
break break
} }
// ../../runtime/type.go:/PtrType // ../../../../runtime/type.go:/ptrType
s1 := dtypesym(t.Type) s1 := dtypesym(t.Type)
ot = dcommontype(s, ot, t) ot = dcommontype(s, ot, t)
xt = ot - 2*Widthptr xt = ot - 2*Widthptr
ot = dsymptr(s, ot, s1, 0) ot = dsymptr(s, ot, s1, 0)
// ../../runtime/type.go:/StructType // ../../../../runtime/type.go:/structType
// for security, only the exported fields. // for security, only the exported fields.
case TSTRUCT: case TSTRUCT:
n := 0 n := 0
...@@ -1170,7 +1170,7 @@ ok: ...@@ -1170,7 +1170,7 @@ ok:
ot = duintxx(s, ot, uint64(n), Widthint) ot = duintxx(s, ot, uint64(n), Widthint)
ot = duintxx(s, ot, uint64(n), Widthint) ot = duintxx(s, ot, uint64(n), Widthint)
for t1 := t.Type; t1 != nil; t1 = t1.Down { for t1 := t.Type; t1 != nil; t1 = t1.Down {
// ../../runtime/type.go:/structField // ../../../../runtime/type.go:/structField
if t1.Sym != nil && t1.Embedded == 0 { if t1.Sym != nil && t1.Embedded == 0 {
ot = dgostringptr(s, ot, t1.Sym.Name) ot = dgostringptr(s, ot, t1.Sym.Name)
if exportname(t1.Sym.Name) { if exportname(t1.Sym.Name) {
...@@ -1350,7 +1350,7 @@ func dalgsym(t *Type) *Sym { ...@@ -1350,7 +1350,7 @@ func dalgsym(t *Type) *Sym {
ggloblsym(eqfunc, int32(Widthptr), obj.DUPOK|obj.RODATA) ggloblsym(eqfunc, int32(Widthptr), obj.DUPOK|obj.RODATA)
} }
// ../../runtime/alg.go:/typeAlg // ../../../../runtime/alg.go:/typeAlg
ot := 0 ot := 0
ot = dsymptr(s, ot, hashfunc, 0) ot = dsymptr(s, ot, hashfunc, 0)
......
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