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

Issue 13057043: code review 13057043: go.tools/ssa: fixes, cleanups, cosmetic tweaks. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by adonovan
Modified:
10 years, 8 months ago
Reviewers:
crawshaw1
CC:
crawshaw2, crawshaw1, gri, golang-dev
Visibility:
Public.

Description

go.tools/ssa: fixes, cleanups, cosmetic tweaks. Fix bug: the Signature for an interface method wrapper erroneously had a non-nil receiver. Function: - Set Pkg field non-nil even for wrappers. It is equal to that of the wrapped function. Only wrappers of error.Error (and its embeddings in other interfaces) may have nil. Sanity checker now asserts this. - FullName() now uses .Synthetic field to discriminate synthetic methods, not Pkg==nil. - Fullname() uses new relType() utility to print receiver type name unqualified if it belongs to the same package. (Alloc.String also uses relType utility.) CallCommon: - Description(): fix switch logic broken when we eliminated the Recv field. - better docs.

Patch Set 1 #

Patch Set 2 : diff -r a4415c59adfc https://code.google.com/p/go.tools #

Patch Set 3 : diff -r a4415c59adfc https://code.google.com/p/go.tools #

Total comments: 2

Patch Set 4 : diff -r e60f9e5fe611 https://code.google.com/p/go.tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -36 lines) Patch
M ssa/func.go View 1 1 chunk +16 lines, -16 lines 0 comments Download
M ssa/interp/interp.go View 1 1 chunk +1 line, -1 line 0 comments Download
M ssa/lvalue.go View 1 1 chunk +1 line, -1 line 0 comments Download
M ssa/print.go View 1 2 3 3 chunks +33 lines, -1 line 0 comments Download
M ssa/promote.go View 1 6 chunks +16 lines, -10 lines 0 comments Download
M ssa/sanity.go View 1 2 3 3 chunks +13 lines, -2 lines 0 comments Download
M ssa/ssa.go View 1 2 3 8 chunks +21 lines, -5 lines 0 comments Download

Messages

Total messages: 4
adonovan
Hello david.crawshaw@zentus.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
10 years, 8 months ago (2013-08-16 16:27:25 UTC) #1
crawshaw1
LGTM https://codereview.appspot.com/13057043/diff/1002/ssa/print.go File ssa/print.go (right): https://codereview.appspot.com/13057043/diff/1002/ssa/print.go#newcode40 ssa/print.go:40: // relType is like t.String(), but if t ...
10 years, 8 months ago (2013-08-19 19:11:47 UTC) #2
adonovan
On 2013/08/19 19:11:47, crawshaw1 wrote: > LGTM > > https://codereview.appspot.com/13057043/diff/1002/ssa/print.go > File ssa/print.go (right): > ...
10 years, 8 months ago (2013-08-19 19:32:13 UTC) #3
adonovan
10 years, 8 months ago (2013-08-19 19:38:32 UTC) #4
*** Submitted as
https://code.google.com/p/go/source/detail?r=b0c3f2b8db67&repo=tools ***

go.tools/ssa: fixes, cleanups, cosmetic tweaks.

Fix bug: the Signature for an interface method wrapper
erroneously had a non-nil receiver.

Function:
- Set Pkg field non-nil even for wrappers.
  It is equal to that of the wrapped function.
  Only wrappers of error.Error
  (and its embeddings in other interfaces) may have nil.
  Sanity checker now asserts this.
- FullName() now uses .Synthetic field to discriminate
  synthetic methods, not Pkg==nil.
- Fullname() uses new relType() utility to print receiver type
  name unqualified if it belongs to the same package.
  (Alloc.String also uses relType utility.)

CallCommon:
- Description(): fix switch logic broken when we
  eliminated the Recv field.
- better docs.

R=david.crawshaw, crawshaw, gri
CC=golang-dev
https://codereview.appspot.com/13057043
Sign in to reply to this message.

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