x/tools: s/oracle/guru/g in various comments
Change-Id: Ie0da80db4f58d9f6e7d9675c89f106d1cd01710a Reviewed-on: https://go-review.googlesource.com/30983 Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
d9f9484612
commit
2f93937767
2
README
2
README
|
@ -2,7 +2,7 @@ This subrepository holds the source for various packages and tools that support
|
||||||
the Go programming language.
|
the Go programming language.
|
||||||
|
|
||||||
Some of the tools, godoc and vet for example, are included in binary Go distributions.
|
Some of the tools, godoc and vet for example, are included in binary Go distributions.
|
||||||
Others, including the Go oracle and the test coverage tool, can be fetched with "go get".
|
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
|
Packages include a type-checker for Go and an implementation of the
|
||||||
Static Single Assignment form (SSA) representation for Go programs.
|
Static Single Assignment form (SSA) representation for Go programs.
|
||||||
|
|
|
@ -53,8 +53,6 @@ func ParseFile(fset *token.FileSet, ctxt *build.Context, displayPath func(string
|
||||||
// The '...Files []string' fields of the resulting build.Package are not
|
// The '...Files []string' fields of the resulting build.Package are not
|
||||||
// populated (build.FindOnly mode).
|
// populated (build.FindOnly mode).
|
||||||
//
|
//
|
||||||
// TODO(adonovan): call this from oracle when the tree thaws.
|
|
||||||
//
|
|
||||||
func ContainingPackage(ctxt *build.Context, dir, filename string) (*build.Package, error) {
|
func ContainingPackage(ctxt *build.Context, dir, filename string) (*build.Package, error) {
|
||||||
if !IsAbsPath(ctxt, filename) {
|
if !IsAbsPath(ctxt, filename) {
|
||||||
filename = JoinPath(ctxt, dir, filename)
|
filename = JoinPath(ctxt, dir, filename)
|
||||||
|
|
|
@ -39,7 +39,7 @@ package loader
|
||||||
// The benefit of this approach would have been that source-level
|
// The benefit of this approach would have been that source-level
|
||||||
// syntax information would correspond exactly to the original cgo
|
// syntax information would correspond exactly to the original cgo
|
||||||
// file, with no preprocessing involved, making source tools like
|
// file, with no preprocessing involved, making source tools like
|
||||||
// godoc, oracle, and eg happy. However, the approach was rejected
|
// godoc, guru, and eg happy. However, the approach was rejected
|
||||||
// due to the additional complexity it would impose on go/types. (It
|
// due to the additional complexity it would impose on go/types. (It
|
||||||
// made for a beautiful demo, though.)
|
// made for a beautiful demo, though.)
|
||||||
//
|
//
|
||||||
|
|
|
@ -76,7 +76,7 @@ package pointer
|
||||||
//
|
//
|
||||||
// PERFORMANCE
|
// PERFORMANCE
|
||||||
//
|
//
|
||||||
// In two benchmarks (oracle and godoc), HVN eliminates about two thirds
|
// In two benchmarks (guru and godoc), HVN eliminates about two thirds
|
||||||
// of nodes, the majority accounted for by non-pointers: nodes of
|
// of nodes, the majority accounted for by non-pointers: nodes of
|
||||||
// non-pointer type, pointers that remain nil, formal parameters of dead
|
// non-pointer type, pointers that remain nil, formal parameters of dead
|
||||||
// functions, nodes of untracked types, etc. It also reduces the number
|
// functions, nodes of untracked types, etc. It also reduces the number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
// Regression test for oracle crash
|
// Regression test for guru crash
|
||||||
// https://code.google.com/p/go/issues/detail?id=6605
|
// https://code.google.com/p/go/issues/detail?id=6605
|
||||||
//
|
//
|
||||||
// Using reflection, methods may be called on types that are not the
|
// Using reflection, methods may be called on types that are not the
|
||||||
|
|
|
@ -90,7 +90,7 @@ syntactic constructs that can instantiate it:
|
||||||
etc
|
etc
|
||||||
+ all INSTANTIATIONS of all S defined as struct{t T} or [n]T
|
+ all INSTANTIATIONS of all S defined as struct{t T} or [n]T
|
||||||
(Potentially a lot of information.)
|
(Potentially a lot of information.)
|
||||||
(Add this to oracle too.)
|
(Add this to guru too.)
|
||||||
|
|
||||||
|
|
||||||
Optimisations
|
Optimisations
|
||||||
|
|
|
@ -115,7 +115,7 @@ func (a *analysis) doChannelPeers(ptsets map[ssa.Value]pointer.Pointer) {
|
||||||
// -- utilities --------------------------------------------------------
|
// -- utilities --------------------------------------------------------
|
||||||
|
|
||||||
// chanOp abstracts an ssa.Send, ssa.Unop(ARROW), close(), or a SelectState.
|
// chanOp abstracts an ssa.Send, ssa.Unop(ARROW), close(), or a SelectState.
|
||||||
// Derived from oracle/peers.go.
|
// Derived from cmd/guru/peers.go.
|
||||||
type chanOp struct {
|
type chanOp struct {
|
||||||
ch ssa.Value
|
ch ssa.Value
|
||||||
mode string // sent|received|closed
|
mode string // sent|received|closed
|
||||||
|
@ -125,7 +125,7 @@ type chanOp struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// chanOps returns a slice of all the channel operations in the instruction.
|
// chanOps returns a slice of all the channel operations in the instruction.
|
||||||
// Derived from oracle/peers.go.
|
// Derived from cmd/guru/peers.go.
|
||||||
func chanOps(instr ssa.Instruction) []chanOp {
|
func chanOps(instr ssa.Instruction) []chanOp {
|
||||||
fn := instr.Parent()
|
fn := instr.Parent()
|
||||||
var ops []chanOp
|
var ops []chanOp
|
||||||
|
|
|
@ -81,7 +81,7 @@ func isDigit(ch rune) bool {
|
||||||
return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch)
|
return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch)
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- Plundered from golang.org/x/tools/oracle -----------------
|
// -- Plundered from golang.org/x/tools/cmd/guru -----------------
|
||||||
|
|
||||||
// sameFile returns true if x and y have the same basename and denote
|
// sameFile returns true if x and y have the same basename and denote
|
||||||
// the same file.
|
// the same file.
|
||||||
|
|
Loading…
Reference in New Issue