]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: a couple of minor comment fixes
authorRobert Griesemer <gri@golang.org>
Thu, 20 Oct 2016 22:27:26 +0000 (15:27 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 20 Oct 2016 22:47:22 +0000 (22:47 +0000)
Change-Id: If1d08a84c9295816489b1cfdd031ba12892ae963
Reviewed-on: https://go-review.googlesource.com/31598
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/typecheck.go

index 32b62fa2935ea8ded16474f8e43cf1b18c46e063..782e56e00997aa573d65d3b431d51769e5d92dcb 100644 (file)
@@ -30,7 +30,7 @@ type Pkg struct {
 // an object declared within a package, but Syms are also used to name internal
 // synthesized objects.
 //
-// As a special exception, field and method names that are exported use the Sym
+// As an exception, field and method names that are exported use the Sym
 // associated with localpkg instead of the package that declared them. This
 // allows using Sym pointer equality to test for Go identifier uniqueness when
 // handling selector expressions.
@@ -42,7 +42,7 @@ type Sym struct {
 
        // saved and restored by dcopy
        Pkg        *Pkg
-       Name       string // variable name
+       Name       string // object name
        Def        *Node  // definition: ONAME OTYPE OPACK or OLITERAL
        Block      int32  // blocknumber to catch redeclaration
        Lastlineno int32  // last declaration for diagnostic
index ea9ef6c6545893648b84c922f1da5f588af5efb1..182bf0727aa611cef17daa875fd115752882d928 100644 (file)
@@ -3660,9 +3660,8 @@ func typecheckdef(n *Node) *Node {
        default:
                Fatalf("typecheckdef %v", n.Op)
 
-               // not really syms
-       case OGOTO, OLABEL:
-               break
+       case OGOTO, OLABEL, OPACK:
+               // nothing to do here
 
        case OLITERAL:
                if n.Name.Param.Ntype != nil {
@@ -3770,10 +3769,6 @@ func typecheckdef(n *Node) *Node {
                if Curfn != nil {
                        resumecheckwidth()
                }
-
-               // nothing to see here
-       case OPACK:
-               break
        }
 
 ret: