The existing API for querying values only allows directly querying pointer-like values, or pointers to such values. The new, extended queries make it possible to destructure values and access arbitrarily nested pointers, such as fields in structs, or specific values in tuples. We use single Go expressions as the queries, which we further restrict to a subset of the language (indexing, field access, pointer dereferences and channel receives). Instead of adding another map to Result, we return a *Pointer and populate it during analysis. This does mean that a Config cannot be reused for multiple analyses, as it now holds analysis-specific state. That is, however, not a big problem as reusing one Config had little use. Since the new API can do everything the old could, it deprecates AddQuery and AddIndirectQuery. Change-Id: I4b2ae7d85c462bc7faa6bab76456106e76be5a65 Reviewed-on: https://go-review.googlesource.com/37635 Reviewed-by: Alan Donovan <adonovan@google.com> |
||
---|---|---|
benchmark/parse | ||
blog | ||
cmd | ||
container/intsets | ||
cover | ||
go | ||
godoc | ||
imports | ||
playground | ||
present | ||
refactor | ||
third_party | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README | ||
codereview.cfg |
README
This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet for example, are included in binary Go distributions. Others, including the Go guru and the test coverage tool, can be fetched with "go get". Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html.