aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorMark Freeman <mark@golang.org>2025-10-28 17:54:52 -0400
committerGopher Robot <gobot@golang.org>2025-11-14 10:30:00 -0800
commitddd8558e61c80f51a2c65565f8354d12d3c6a418 (patch)
treeb205bb16e7c0da9d86be29b171482772ee8870d1 /test/codegen
parent9daaab305c4d1dede9e4f6efdc5e1268a69327e6 (diff)
downloadgo-ddd8558e61c80f51a2c65565f8354d12d3c6a418.tar.xz
go/types, types2: swap object.color for Checker.objPathIdx
The type checker assigns types to objects. An object can be in 1 of 3 states, which are mapped to colors. This is stored as a field on the object. - white : type not known, awaiting processing - grey : type pending, in processing - black : type known, done processing With the addition of Checker.objPathIdx, which maps objects to a path index, presence in the map could signal grey coloring. White and black coloring can be signaled by presence of object.typ (a simple nil check). This change removes the object.color field and its associated methods, replacing it with an equivalent use of Checker.objPathIdx. Checker.objPathIdx is integrated into the existing push and pop methods, while slightly simplifying their signatures. Note that the concept of object coloring remains the same - we are merely changing and simplifying the mechanism which represents the colors. Change-Id: I91fb5e9a59dcb34c08ffc5b4ebc3f20a400094b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/715840 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Mark Freeman <markfreeman@google.com>
Diffstat (limited to 'test/codegen')
0 files changed, 0 insertions, 0 deletions