Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(223)

Issue 4285053: code review 4285053: gofix: add -diff, various fixes and helpers (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 2 months ago by rsc
Modified:
13 years, 1 month ago
Reviewers:
CC:
gri, golang-dev
Visibility:
Public.

Description

gofix: add -diff, various fixes and helpers * add -diff command line option * use scoping information in refersTo, isPkgDot, isPtrPkgDot. * add new scoping-based helpers countUses, rewriteUses, assignsTo, isTopName. * rename rewrite to walk, add walkBeforeAfter. * add toy typechecker, a placeholder for go/types

Patch Set 1 #

Patch Set 2 : diff -r a946a2f627fb https://go.googlecode.com/hg #

Patch Set 3 : diff -r 82050f8e7881 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r e1efe298340c https://go.googlecode.com/hg #

Total comments: 60

Patch Set 5 : diff -r 4d35898bb495 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 4d35898bb495 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 1d152ae12dfc https://go.googlecode.com/hg #

Total comments: 45

Patch Set 8 : diff -r 5a0dbcb6e9c1 https://go.googlecode.com/hg #

Total comments: 3

Patch Set 9 : diff -r 5a0dbcb6e9c1 https://go.googlecode.com/hg/ #

Patch Set 10 : diff -r 843855f3c026 https://go.googlecode.com/hg #

Unified diffs Side-by-side diffs Delta from patch set Stats (+947 lines, -194 lines) Patch
M src/cmd/gofix/fix.go View 1 2 3 4 5 6 7 3 chunks +253 lines, -139 lines 0 comments Download
M src/cmd/gofix/httpserver.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gofix/main.go View 1 2 3 4 5 chunks +94 lines, -9 lines 0 comments Download
M src/cmd/gofix/main_test.go View 1 2 3 4 5 6 7 8 9 5 chunks +15 lines, -40 lines 0 comments Download
M src/cmd/gofix/netdial.go View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M src/cmd/gofix/osopen.go View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gofix/procattr.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
A src/cmd/gofix/typecheck.go View 1 2 3 4 5 6 7 8 1 chunk +579 lines, -0 lines 0 comments Download

Messages

Total messages: 11
rsc
Hello gri (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
13 years, 1 month ago (2011-04-04 20:21:25 UTC) #1
gri
I still need to read the typecheck.go file in detail. Some initial feedback. Some sections ...
13 years, 1 month ago (2011-04-04 22:18:38 UTC) #2
rsc
Hello gri (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 1 month ago (2011-04-05 05:07:26 UTC) #3
rsc
http://codereview.appspot.com/4285053/diff/7001/src/cmd/gofix/fix.go File src/cmd/gofix/fix.go (right): http://codereview.appspot.com/4285053/diff/7001/src/cmd/gofix/fix.go#newcode33 src/cmd/gofix/fix.go:33: // rewrite walks the AST x, calling visit(y) for ...
13 years, 1 month ago (2011-04-05 05:07:50 UTC) #4
gri
some more comments. I think this looks pretty good but I still need to wrap ...
13 years, 1 month ago (2011-04-06 06:07:06 UTC) #5
gri
Overall: Please more comments - there's a lot of implicit assumptions that are not obvious. ...
13 years, 1 month ago (2011-04-06 21:41:44 UTC) #6
rsc
PTAL http://codereview.appspot.com/4285053/diff/18001/src/cmd/gofix/fix.go File src/cmd/gofix/fix.go (right): http://codereview.appspot.com/4285053/diff/18001/src/cmd/gofix/fix.go#newcode361 src/cmd/gofix/fix.go:361: if ok && not.Op == token.NOT && not.X ...
13 years, 1 month ago (2011-04-06 22:11:12 UTC) #7
gri
LGTM but please address the few outstanding issues http://codereview.appspot.com/4285053/diff/18001/src/cmd/gofix/typecheck.go File src/cmd/gofix/typecheck.go (right): http://codereview.appspot.com/4285053/diff/18001/src/cmd/gofix/typecheck.go#newcode149 src/cmd/gofix/typecheck.go:149: var ...
13 years, 1 month ago (2011-04-06 22:26:09 UTC) #8
rsc
> http://codereview.appspot.com/4285053/diff/18001/src/cmd/gofix/typecheck.go#newcode149 > src/cmd/gofix/typecheck.go:149: var curfn []*ast.FuncType > On 2011/04/06 21:41:44, gri wrote: >> >> ...
13 years, 1 month ago (2011-04-06 22:47:35 UTC) #9
gri
LGTM
13 years, 1 month ago (2011-04-06 22:49:41 UTC) #10
rsc
13 years, 1 month ago (2011-04-08 16:27:10 UTC) #11
*** Submitted as http://code.google.com/p/go/source/detail?r=b124a0dd4408 ***

gofix: add -diff, various fixes and helpers

  * add -diff command line option
  * use scoping information in refersTo, isPkgDot, isPtrPkgDot.
  * add new scoping-based helpers countUses, rewriteUses, assignsTo, isTopName.
  * rename rewrite to walk, add walkBeforeAfter.
  * add toy typechecker, a placeholder for go/types

R=gri
CC=golang-dev
http://codereview.appspot.com/4285053
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b