1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:34:40 -07:00
go/go
Robert Griesemer b10dfb99c5 go/types: don't mark external package objects as used
Also removes a potential race condition regarding the
used flag of Var objects when type-checking packages
concurrently.

Implementation: Rather than marking all used dot-imported
objects and then deduce which corresponding package was used,
now we consider all dot-imported packages as unused and remove
each package from the unused packages map as objects are used.

Now only objects that can be marked as used have a used field
(variables, labels, and packages).

As a result, the code became cleaner and simpler.

Fixes golang/go#8969.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/163740043
2014-10-23 09:39:20 -07:00
..
buildutil go/buildutil: use same logic as 'go' tool for pruning package search. 2014-10-14 12:57:00 -04:00
callgraph go.tools/go/pointer: add intrinsic for time.startTimer, which is implemented in C. 2014-07-22 18:30:06 -04:00
exact go.tools/go/types, exact: fix build for 1.2 2014-06-12 12:46:21 -07:00
gccgoimporter go.tools/go: separate interface construction from method set construction 2014-07-09 20:00:49 -07:00
gcimporter go.tools/go: separate interface construction from method set construction 2014-07-09 20:00:49 -07:00
importer go.tools/go/importer: fix importer test for 32bit platforms 2014-09-12 08:17:14 -07:00
loader go/loader: minor comment fix. 2014-10-14 12:27:37 -04:00
pointer go/ssa: fix bug causing (manual) go/pointer stdlib test to crash. 2014-09-11 18:08:33 -04:00
ssa go/ssa/interp: fix fallout from recent runtime refactoring. 2014-09-25 17:14:39 -04:00
types go/types: don't mark external package objects as used 2014-10-23 09:39:20 -07:00
vcs go.tools: fix various minor issues found by go vet 2014-05-19 08:47:28 -07:00