]> Cypherpunks repositories - gostls13.git/commit
go/types: remove visited flag for constants and variables (cleanup)
authorRobert Griesemer <gri@golang.org>
Thu, 31 May 2018 22:18:21 +0000 (15:18 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 1 Jun 2018 17:36:40 +0000 (17:36 +0000)
commit6cfeedb229bcad20b99fafe3d127a087edcd07e5
tree89c10751ab4156a580c6c912620fe65ebcf057ce
parent3d6e4ec0a8c2ef47211519b21b020131c0434003
go/types: remove visited flag for constants and variables (cleanup)

Now that we have a color marking scheme for all objects, the
pre-existing 'visited' flag for constants and variables is
redundant: visited is the same as marking an object non-white.

Refactor the respective 'visited' flag logic from constDecl and
varDecl into the color switch in objDecl and remove the 'visited'
flag.

Follow-up on https://go-review.googlesource.com/c/go/+/114517 .

Change-Id: Ie20de65e3b26a5a6ff7b0eddc3d089f56be204e8
Reviewed-on: https://go-review.googlesource.com/115619
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/types/decl.go
src/go/types/object.go