aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json
diff options
context:
space:
mode:
authorGiovanni Bajo <rasky@develer.com>2019-09-28 00:05:54 +0200
committerGiovanni Bajo <rasky@develer.com>2019-10-26 07:52:35 +0000
commitc70e5475e6ad21f4b5685ef18567a3e4e9388bbc (patch)
treee37d65712ad3aa3fe5ffdfe73960066e7ae1bbff /src/encoding/json
parent18d57bc89235ea04b6db1ef3e2d4a3106f0b739e (diff)
downloadgo-c70e5475e6ad21f4b5685ef18567a3e4e9388bbc.tar.xz
cmd/compile: in poset, implement path collapsing
Sometimes, poset needs to collapse a path making all nodes in the path aliases. For instance, we know that A<=N1<=B and we learn that B<=A, we can deduce A==N1==B, and thus we can collapse all paths from A to B into a single aliased node. Currently, this is a TODO. This CL implements the path-collapsing primitive by doing a DFS walk to build a bitset of all nodes across all paths, and then calling the new aliasnodes that allow to mark multiple nodes as aliases of a single master node. This helps only 4 times in std+cmd, but it will be fundamental when we will rely on poset to calculate numerical limits, to calculate the correct values. This also fixes #35157, a bug uncovered by a previous CL in this serie. A testcase will be added soon. Change-Id: I5fc54259711769d7bd7c2d166a5abc1cddc26350 Reviewed-on: https://go-review.googlesource.com/c/go/+/200861 Run-TryBot: Giovanni Bajo <rasky@develer.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/encoding/json')
0 files changed, 0 insertions, 0 deletions