go.tools/go/types: adjust comments for godoc

R=adonovan
CC=golang-codereviews
https://golang.org/cl/38560045
This commit is contained in:
Robert Griesemer 2014-01-07 10:03:15 -08:00
parent 26542a8bc5
commit b6eef48120
3 changed files with 21 additions and 22 deletions

View File

@ -24,19 +24,19 @@ const (
// A Selection describes a selector expression x.f. // A Selection describes a selector expression x.f.
// For the declarations: // For the declarations:
// //
// type T struct{ x int; E } // type T struct{ x int; E }
// type E struct{} // type E struct{}
// func (e E) m() {} // func (e E) m() {}
// var p *T // var p *T
// //
// the following relations exist: // the following relations exist:
// //
// Selector Kind Recv Obj Type Index Indirect // Selector Kind Recv Obj Type Index Indirect
// //
// p.x FieldVal T x int {0} true // p.x FieldVal T x int {0} true
// p.m MethodVal *T m func (e *T) m() {1, 0} true // p.m MethodVal *T m func (e *T) m() {1, 0} true
// T.m MethodExpr T m func m(_ T) {1, 0} false // T.m MethodExpr T m func m(_ T) {1, 0} false
// math.Pi PackageObj nil Pi untyped numeric nil false // math.Pi PackageObj nil Pi untyped numeric nil false
// //
type Selection struct { type Selection struct {
kind SelectionKind kind SelectionKind

View File

@ -24,13 +24,13 @@ type Sizes interface {
// StdSizes is a convenience type for creating commonly used Sizes. // StdSizes is a convenience type for creating commonly used Sizes.
// It makes the following simplifying assumptions: // It makes the following simplifying assumptions:
// //
// - The size of explicitly sized basic types (int16, etc.) is the // - The size of explicitly sized basic types (int16, etc.) is the
// specified size. // specified size.
// - The size of strings, functions, and interfaces is 2*WordSize. // - The size of strings, functions, and interfaces is 2*WordSize.
// - The size of slices is 3*WordSize. // - The size of slices is 3*WordSize.
// - All other types have size WordSize. // - All other types have size WordSize.
// - Arrays and structs are aligned per spec definition; all other // - Arrays and structs are aligned per spec definition; all other
// types are naturally aligned with a maximum alignment MaxAlign. // types are naturally aligned with a maximum alignment MaxAlign.
// //
// *StdSizes implements Sizes. // *StdSizes implements Sizes.
// //

View File

@ -14,18 +14,17 @@ import (
// If GcCompatibilityMode is set, printing of types is modified // If GcCompatibilityMode is set, printing of types is modified
// to match the representation of some types in the gc compiler: // to match the representation of some types in the gc compiler:
// //
// - byte and rune lose their alias name and simply stand for // - byte and rune lose their alias name and simply stand for
// uint8 and int32 respectively // uint8 and int32 respectively
// // - embedded interfaces get flattened (the embedding info is lost,
// - embedded interfaces get flattened (the embedding info is lost, // and certain recursive interface types cannot be printed anymore)
// and certain recursive interface types cannot be printed anymore)
// //
// This makes it easier to compare packages computed with the type- // This makes it easier to compare packages computed with the type-
// checker vs packages imported from gc export data. // checker vs packages imported from gc export data.
// //
// Caution: This flag affects all uses of WriteType, globally. // Caution: This flag affects all uses of WriteType, globally.
// It is only provided for testing in conjunction with // It is only provided for testing in conjunction with
// gc-generated data. It may be removed at any time. // gc-generated data. It may be removed at any time.
var GcCompatibilityMode bool var GcCompatibilityMode bool
// TypeString returns the string representation of typ. // TypeString returns the string representation of typ.