From f4f6b647500438eaff21e36f48ea4399727c41bd Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Wed, 2 Nov 2016 20:34:29 -0700 Subject: [PATCH] cmd/compile: update/remove outdated comments Change-Id: I5a74be1593dca8ba5e0829f0bae35dc9ce702671 Reviewed-on: https://go-review.googlesource.com/32672 Reviewed-by: Matthew Dempsky --- src/cmd/compile/internal/gc/bexport.go | 6 +++--- src/cmd/compile/internal/gc/bimport.go | 12 ------------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/cmd/compile/internal/gc/bexport.go b/src/cmd/compile/internal/gc/bexport.go index ec3e4db761..1da5b699a4 100644 --- a/src/cmd/compile/internal/gc/bexport.go +++ b/src/cmd/compile/internal/gc/bexport.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. // Binary package export. -// (see fmt.go, parser.go as "documentation" for how to use/setup data structures) /* 1) Export data encoding principles: @@ -71,8 +70,9 @@ same type was imported before via another import, the importer must use the previously imported type pointer so that we have exactly one version (i.e., one pointer) for each named type (and read but discard the current type encoding). Unnamed types simply encode their respective fields. -Aliases are encoded starting with their name followed by the original -(aliased) object. +Aliases are encoded starting with their name followed by the qualified +identifier denoting the original (aliased) object, which was exported +earlier. In the encoding, some lists start with the list length. Some lists are terminated with an end marker (usually for lists where we may not know diff --git a/src/cmd/compile/internal/gc/bimport.go b/src/cmd/compile/internal/gc/bimport.go index 61ef348e23..1d668412a1 100644 --- a/src/cmd/compile/internal/gc/bimport.go +++ b/src/cmd/compile/internal/gc/bimport.go @@ -436,16 +436,13 @@ func (p *importer) typ() *Type { var t *Type switch i { case namedTag: - // parser.go:hidden_importsym p.pos() tsym := p.qualifiedName() - // parser.go:hidden_pkgtype t = pkgtype(tsym) p.typList = append(p.typList, t) // read underlying type - // parser.go:hidden_type t0 := p.typ() p.importtype(t, t0) @@ -461,8 +458,6 @@ func (p *importer) typ() *Type { // read associated methods for i := p.int(); i > 0; i-- { - // parser.go:hidden_fndcl - p.pos() sym := p.fieldSym() @@ -574,7 +569,6 @@ func (p *importer) qualifiedName() *Sym { return pkg.Lookup(name) } -// parser.go:hidden_structdcl_list func (p *importer) fieldList() (fields []*Field) { if n := p.int(); n > 0 { fields = make([]*Field, n) @@ -585,7 +579,6 @@ func (p *importer) fieldList() (fields []*Field) { return } -// parser.go:hidden_structdcl func (p *importer) field() *Field { p.pos() sym := p.fieldName() @@ -611,7 +604,6 @@ func (p *importer) field() *Field { return f } -// parser.go:hidden_interfacedcl_list func (p *importer) methodList() (methods []*Field) { if n := p.int(); n > 0 { methods = make([]*Field, n) @@ -622,7 +614,6 @@ func (p *importer) methodList() (methods []*Field) { return } -// parser.go:hidden_interfacedcl func (p *importer) method() *Field { p.pos() sym := p.fieldName() @@ -636,7 +627,6 @@ func (p *importer) method() *Field { return f } -// parser.go:sym,hidden_importsym func (p *importer) fieldName() *Sym { name := p.string() if p.version == 0 && name == "_" { @@ -654,7 +644,6 @@ func (p *importer) fieldName() *Sym { return pkg.Lookup(name) } -// parser.go:ohidden_funarg_list func (p *importer) paramList() []*Field { i := p.int() if i == 0 { @@ -674,7 +663,6 @@ func (p *importer) paramList() []*Field { return fs } -// parser.go:hidden_funarg func (p *importer) param(named bool) *Field { f := newField() f.Type = p.typ() -- 2.48.1