]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: update/remove outdated comments
authorRobert Griesemer <gri@golang.org>
Thu, 3 Nov 2016 03:34:29 +0000 (20:34 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 3 Nov 2016 15:58:01 +0000 (15:58 +0000)
Change-Id: I5a74be1593dca8ba5e0829f0bae35dc9ce702671
Reviewed-on: https://go-review.googlesource.com/32672
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/bimport.go

index ec3e4db761f7d7f547c405a09559b4591040e82d..1da5b699a4f7f21d21e1ad8344c6de3144949df8 100644 (file)
@@ -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
index 61ef348e23816c3c2d80129cde4d504e9831134e..1d668412a181d05b6bc330865fc3e24535b1884e 100644 (file)
@@ -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()