]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: rename T_old_DARRAY and update comments
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 27 Mar 2016 19:30:16 +0000 (12:30 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sun, 27 Mar 2016 20:38:56 +0000 (20:38 +0000)
Change-Id: Ifa3b1b1e5458e4f109828a476d37f1caf96fe14b
Reviewed-on: https://go-review.googlesource.com/21211
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/gc/type.go

index 4457ff31ba182386dcef2e2788406f76c73b8f83..03f2cf48dfd323027cfb15125829d2a1d8259bb5 100644 (file)
@@ -512,8 +512,8 @@ func (p *exporter) typ(t *Type) {
                }
                p.typ(t.Type)
 
-       case T_old_DARRAY:
-               // see p.param use of T_old_DARRAY
+       case TDDDFIELD:
+               // see p.param use of TDDDFIELD
                p.tag(dddTag)
                p.typ(t.Type)
 
@@ -664,9 +664,7 @@ func (p *exporter) param(q *Field, n int, numbered bool) {
        t := q.Type
        if q.Isddd {
                // create a fake type to encode ... just for the p.typ call
-               // (T_old_DARRAY is not used anywhere else in the compiler,
-               // we use it here to communicate between p.param and p.typ.)
-               t = &Type{Etype: T_old_DARRAY, Type: t.Type}
+               t = &Type{Etype: TDDDFIELD, Type: t.Type}
        }
        p.typ(t)
        if n > 0 {
index 9ba7cf12020b96ef0aa51147676527e51827a17b..6a4caeca98a15fd79b495bc7c686321c16374c42 100644 (file)
@@ -284,7 +284,7 @@ func (p *importer) typ() *Type {
                t.Type = p.typ()
 
        case dddTag:
-               t = p.newtyp(T_old_DARRAY)
+               t = p.newtyp(TDDDFIELD)
                t.Bound = -1
                t.Type = p.typ()
 
@@ -447,8 +447,8 @@ func (p *importer) param(named bool) *Node {
        typ := p.typ()
 
        isddd := false
-       if typ.Etype == T_old_DARRAY {
-               // T_old_DARRAY indicates ... type
+       if typ.Etype == TDDDFIELD {
+               // TDDDFIELD indicates ... type
                // TODO(mdempsky): Fix Type rekinding.
                typ.Etype = TARRAY
                isddd = true
index 709506db075874de86a5323368781dea3f2eacee..dbd3f785575fe2e2a73ecff0037520cc879a6010 100644 (file)
@@ -45,7 +45,6 @@ const (
 
        TFUNC
        TARRAY
-       T_old_DARRAY // Doesn't seem to be used in existing code. Used now for Isddd export (see bexport.go). TODO(gri) rename.
        TSTRUCT
        TCHAN
        TMAP
@@ -60,11 +59,14 @@ const (
        TNIL
        TBLANK
 
-       // pseudo-type for frame layout
+       // pseudo-types for frame layout
        TFUNCARGS
        TCHANARGS
        TINTERMETH
 
+       // pseudo-types for import/export
+       TDDDFIELD // wrapper: contained type is a ... field
+
        NTYPE
 )