]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add comment to statictmp name generation
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 31 Mar 2017 23:04:52 +0000 (16:04 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 31 Mar 2017 23:49:46 +0000 (23:49 +0000)
Follow-up to review comments on CL 39193.

Change-Id: I7649af9d70ad73e039061a7a66fea416a7476192
Reviewed-on: https://go-review.googlesource.com/39199
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/sinit.go

index 0426b7e4747bfcb0d60a1b9ce6b4b46fe686cb5d..365cd69d4484ca854b46c162bca46fe6814cb4f5 100644 (file)
@@ -575,6 +575,7 @@ var statuniqgen int // name generator for static temps
 // Callers should call n.Name.SetReadonly(true) on the
 // returned node for readonly nodes.
 func staticname(t *Type) *Node {
+       // Don't use lookupN; it interns the resulting string, but these are all unique.
        n := newname(lookup(fmt.Sprintf("statictmp_%d", statuniqgen)))
        statuniqgen++
        addvar(n, t, PEXTERN)