mirror of
https://github.com/golang/go
synced 2024-11-19 17:04:41 -07:00
ce1252a610
We used to have three Sym flags for dealing with export/reexport: Export, Package, and Exported. Export and Package were used to distinguish whether a symbol is exported or package-scope (i.e., mutually exclusive), except that for local declarations Export served double-duty as tracking whether the symbol had been added to exportlist. Meanwhile, imported declarations that needed reexporting could be added to exportlist multiple times, necessitating a flag to track whether they'd already been written out by exporter. Simplify all of these into a single OnExportList flag so that we can ensure symbols on exportlist are present exactly once. Merge reexportsym into exportsym so there's a single place where we append to exportlist. Code that used to set Exported to prevent a symbol from being exported can now just set OnExportList before calling declare to prevent it from even appearing on exportlist. Lastly, drop the IsAlias check in exportsym: we call exportsym too early for local symbols to detect if they're an alias, and we never reexport aliases. Passes toolstash-check. Change-Id: Icdea3719105dc169fcd7651606589cd08b0a80ff Reviewed-on: https://go-review.googlesource.com/103865 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> |
||
---|---|---|
.. | ||
archive | ||
bufio | ||
builtin | ||
bytes | ||
cmd | ||
compress | ||
container | ||
context | ||
crypto | ||
database/sql | ||
debug | ||
encoding | ||
errors | ||
expvar | ||
flag | ||
fmt | ||
go | ||
hash | ||
html | ||
image | ||
index/suffixarray | ||
internal | ||
io | ||
log | ||
math | ||
mime | ||
net | ||
os | ||
path | ||
plugin | ||
reflect | ||
regexp | ||
runtime | ||
sort | ||
strconv | ||
strings | ||
sync | ||
syscall | ||
testing | ||
text | ||
time | ||
unicode | ||
unsafe | ||
vendor/golang_org/x | ||
all.bash | ||
all.bat | ||
all.rc | ||
androidtest.bash | ||
bootstrap.bash | ||
buildall.bash | ||
clean.bash | ||
clean.bat | ||
clean.rc | ||
cmp.bash | ||
iostest.bash | ||
make.bash | ||
make.bat | ||
Make.dist | ||
make.rc | ||
naclmake.bash | ||
nacltest.bash | ||
race.bash | ||
race.bat | ||
run.bash | ||
run.bat | ||
run.rc |