summaryrefslogtreecommitdiff
path: root/src/math/bits/make_examples.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2020-12-07 21:56:58 -0800
committerMatthew Dempsky <mdempsky@google.com>2020-12-09 17:17:53 +0000
commit63bc23b5452f6605df3e40ce7ecdd8b0348792af (patch)
tree1529e6f676d4cd1d0e9ab2573e1e5afc32a1df66 /src/math/bits/make_examples.go
parenteae8fd519b2cbfa253f2f9068587e0ce765efced (diff)
downloadgo-git-63bc23b5452f6605df3e40ce7ecdd8b0348792af.tar.gz
[dev.regabi] cmd/compile: first start towards using Ident
This CL adds Ident, which will eventually replace *Name and *PkgName within the AST for representing uses of declared names. (Originally, I intended to call it "IdentExpr", but neither go/ast nor cmd/compile/internal/syntax include the "Expr" suffix for their respective types.) To start, this CL converts two uses of *Name to *Ident: the tag identifier in a TypeSwitchGuard (which doesn't actually declare a variable by itself), and the not-yet-known placeholder ONONAME returned by oldname to stand-in for identifiers that might be declared later in the package. The TypeSwitchGuard's Name's Used flag was previously used for detecting whether none of the per-clause variables were used. To avoid bloating all Idents for this rare use, a "Used" bool is added to TypeSwitchGuard instead. Eventually it could maybe be packed into miniNode.bits, but for now this is good enough. Passes buildall w/ toolstash -cmp. Change-Id: I393284d86757cbbebd26e1320c7354e2bdcb30b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/276113 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/math/bits/make_examples.go')
0 files changed, 0 insertions, 0 deletions