]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: document more Node fields
authorKevin Burke <kev@inburke.com>
Thu, 18 Aug 2016 16:14:22 +0000 (09:14 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 29 Aug 2016 20:52:56 +0000 (20:52 +0000)
Change-Id: Ic8d37e5612b68bc73c4b50b59db54d8966b69838
Reviewed-on: https://go-review.googlesource.com/27326
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/syntax.go

index b6b858c0d980c86c3c3c78b50b8b1c50450d5779..5c273bbd30dedf5cbb8e90c2b82cf49d877d0ec4 100644 (file)
@@ -67,7 +67,7 @@ type Label struct {
        Breakpc  *obj.Prog // pointer to code
        Continpc *obj.Prog // pointer to code
 
-       Used bool
+       Used bool // for "label defined and not used" error
 }
 
 type SymFlags uint8
index 79d9d8ce200e75d9ff27694cb248af48596556bf..001e15b3279a9d7220be49ddf5aba6c0db6642cc 100644 (file)
@@ -60,12 +60,12 @@ type Node struct {
        Colas     bool  // OAS resulting from :=
        Diag      uint8 // already printed error about this
        Noescape  bool  // func arguments do not escape; TODO(rsc): move Noescape to Func struct (see CL 7360)
-       Walkdef   uint8
-       Typecheck uint8
+       Walkdef   uint8 // tracks state during typecheckdef; 2 == loop detected
+       Typecheck uint8 // tracks state during typechecking; 2 == loop detected
        Local     bool
        IsStatic  bool // whether this Node will be converted to purely static data
        Initorder uint8
-       Used      bool
+       Used      bool // for variable/label declared and not used error
        Isddd     bool // is the argument variadic
        Implicit  bool
        Addrtaken bool  // address taken, even if not moved to heap