tools: minor comment fixes.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/173170043
This commit is contained in:
Alan Donovan 2014-11-13 12:34:25 -05:00
parent c05aea77a9
commit b8d26f5b94
6 changed files with 15 additions and 4 deletions

View File

@ -1,4 +1,6 @@
// The eg command performs example-based refactoring.
// For documentation, run the command, or see Help in
// code.google.com/p/go.tools/refactor/eg.
package main
import (

View File

@ -15,6 +15,7 @@ package intsets
// TODO(adonovan):
// - Add SymmetricDifference(x, y *Sparse), i.e. x ∆ y.
// - Add SubsetOf (xy=∅) and Intersects (x∩y≠∅) predicates.
// - Add InsertAll(...int), RemoveAll(...int)
// - Add 'bool changed' results for {Intersection,Difference}With too.
//
@ -25,6 +26,9 @@ package intsets
// TODO(adonovan): experiment with making the root block indirect (nil
// iff IsEmpty). This would reduce the memory usage when empty and
// might simplify the aliasing invariants.
//
// TODO(adonovan): opt: make UnionWith and Difference faster.
// These are the hot-spots for go/pointer.
import (
"bytes"
@ -641,7 +645,7 @@ func (s *Sparse) Difference(x, y *Sparse) {
if sum != 0 {
sb = sb.next
} else {
// sb will be overrwritten or removed
// sb will be overwritten or removed
}
yb = yb.next

View File

@ -458,6 +458,7 @@ func TestFailFastOnShallowCopy(t *testing.T) {
// -- Benchmarks -------------------------------------------------------
// TODO(adonovan):
// - Add benchmarks of each method.
// - Gather set distributions from pointer analysis.
// - Measure memory usage.

View File

@ -297,6 +297,7 @@ func (conf *Config) fset() *token.FileSet {
// the Config's FileSet, which is initialized if nil.
//
func (conf *Config) ParseFile(filename string, src interface{}) (*ast.File, error) {
// TODO(adonovan): use conf.build() etc like parseFiles does.
return parser.ParseFile(conf.fset(), filename, src, conf.ParserMode)
}

View File

@ -465,6 +465,9 @@ func (r *describeTypeResult) display(printf printfFunc) {
if len(r.methods) > 0 {
printf(r.node, "Method set:")
for _, meth := range r.methods {
// TODO(adonovan): print these relative
// to the owning package, not the
// query package.
printf(meth.Obj(), "\t%s", r.qpos.SelectionString(meth))
}
} else {

View File

@ -124,8 +124,8 @@ type ImplementsType struct {
// a "what" query.
type SyntaxNode struct {
Description string `json:"desc"` // description of syntax tree
Start int `json:"start"` // start offset (0-based)
End int `json:"end"` // end offset
Start int `json:"start"` // start byte offset, 0-based
End int `json:"end"` // end byte offset
}
// A What is the result of the "what" query, which quickly identifies