aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/hex
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2018-05-24 15:39:21 -0700
committerRobert Griesemer <gri@golang.org>2018-05-31 18:21:18 +0000
commite57cdd81e25a8351a868679d0d7252928b6e5be4 (patch)
treedd53ae7d2afb5b2888701b85adb0ec8ea92b8e0e /src/encoding/hex
parent57d40f1b27c0e0a4ca491895a68efc40c7c7d435 (diff)
downloadgo-e57cdd81e25a8351a868679d0d7252928b6e5be4.tar.xz
go/types: initial framework for marking-based cycle detection
The existing code explicitly passes a (type name) path around to determine cycles; it also restarts the path for types that "break" a cycle (such as a pointer, function, etc.). This does not work for alias types (whose cycles are broken in a different way). Furthermore, because the path is not passed through all type checker functions that need it, we can't see the path or use it for detection of some cycles (e.g. cycles involving array lengths), which required ad-hoc solutions in those cases. This change introduces an explicit marking scheme for any kind of object; an object is painted in various colors indicating its state. It also introduces an object path (a stack) main- tained with the Checker state, which is available in all type checker functions that need access to it. The change only introduces these mechanisms and exercises the basic functionality, with no effect on the existing code for now. For #25141. Change-Id: I7c28714bdafe6c8d9afedf12a8a887554237337c Reviewed-on: https://go-review.googlesource.com/114517 Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/encoding/hex')
0 files changed, 0 insertions, 0 deletions