Descriptiongo/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 issue 8969.
Patch Set 1 #Patch Set 2 : diff -r c7ba64b5b3c883b7e26e9bc7142416b0374aa5cc https://code.google.com/p/go.tools #Patch Set 3 : diff -r c7ba64b5b3c883b7e26e9bc7142416b0374aa5cc https://code.google.com/p/go.tools #Patch Set 4 : diff -r c7ba64b5b3c883b7e26e9bc7142416b0374aa5cc https://code.google.com/p/go.tools #
Total comments: 1
Patch Set 5 : diff -r c7ba64b5b3c883b7e26e9bc7142416b0374aa5cc https://code.google.com/p/go.tools #Patch Set 6 : diff -r c7ba64b5b3c883b7e26e9bc7142416b0374aa5cc https://code.google.com/p/go.tools #
Total comments: 2
Patch Set 7 : diff -r 8688baf0f657d93c243caec3e9b91ca211d47027 https://code.google.com/p/go.tools #
MessagesTotal messages: 10
|