]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types: simplify dclstack
authorMatthew Dempsky <mdempsky@google.com>
Tue, 19 Sep 2017 19:45:17 +0000 (12:45 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 20 Sep 2017 17:47:12 +0000 (17:47 +0000)
commita53e853964cc9220ebc4b35aeb81a382939fb479
tree2fadd475c8b00d447c4cfa17ddc4862dc56c07b9
parent7e10a2f6f3bc509b27d02b3c5462e81798434fba
cmd/compile/internal/types: simplify dclstack

We used to backup symbol declarations using complete Syms, but this
was unnecessary: very few of Sym's fields were actually needed. Also,
to restore a symbol, we had to re-Lookup the Sym in its Pkg.

By introducing a new dedicated dsym type for this purpose, we can
address both of these deficiencies.

Passes toolstash-check.

Change-Id: I39f3d672b301f84a3a62b9b34b4b2770cb25df79
Reviewed-on: https://go-review.googlesource.com/64811
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types/scope.go
src/cmd/compile/internal/types/sym.go