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

Issue 67001: Add parameter types to function names (DWARF)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by dmuir
Modified:
14 years, 1 month ago
Reviewers:
jimb, jimb
CC:
google-breakpad-dev_googlegroups.com
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/src/
Visibility:
Public.

Patch Set 1 #

Total comments: 9

Patch Set 2 : Rework based on comments, handle pointer to member functions. #

Patch Set 3 : Further changes based on discussions with Jim. #

Total comments: 5

Patch Set 4 : Changes to function handling #

Total comments: 13

Patch Set 5 : More changes. #

Patch Set 6 : Fixup handling for array types. #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/common/linux/dwarf_cu_to_module.cc View 14 chunks +870 lines, -44 lines 0 comments Download
M src/common/linux/dwarf_cu_to_module.h View 1 chunk +38 lines, -0 lines 0 comments Download
M src/common/linux/dwarf_cu_to_module_unittest.cc View 5 chunks +841 lines, -0 lines 0 comments Download

Messages

Total messages: 7
jimb
This is great stuff --- thanks for doing this! I made some comments, but I ...
14 years, 2 months ago #1
jimb
I didn't even look at the unit tests... http://breakpad.appspot.com/67001/diff/1/2 File common/linux/dwarf_cu_to_module_unittest.cc (right): http://breakpad.appspot.com/67001/diff/1/2#newcode1040 Line 1040: ...
14 years, 2 months ago #2
jimb
Some initial thoughts. I gather that the client for most of those non-intuitive member functions ...
14 years, 2 months ago #3
jimb
I found some problems in what I'd written. Also --- since all this is language-specific, ...
14 years, 2 months ago #4
dmuir
On 2010/03/14 04:37:32, jimb wrote: > I found some problems in what I'd written. > ...
14 years, 1 month ago #5
jimb
Here are some initial comments; there's still a lot of the code I don't understand ...
14 years, 1 month ago #6
dmuir
14 years, 1 month ago #7
Thought I'd cc'd you on my last revisions, but now I'm not so sure.  Have you
had a chance to look over the latest yet?


On 2010/03/31 00:03:38, jimb wrote:
> Here are some initial comments; there's still a lot of the code I don't
> understand yet.
> 
> The DIEHandler arrangement doesn't really lead to the most legible code, does
> it?  I have a hard time reading it, at least, which is not a good sign.
> 
> http://breakpad.appspot.com/67001/diff/14001/15002
> File common/linux/dwarf_cu_to_module.cc (right):
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode63
> Line 63: T* operator->() const { return *referent_; }
> In the rest of this code I've been using T *foo, not T* foo. Similarly for &.
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode146
> Line 146: virtual string FormatDeclaration(const string& declarator) const =
0;
> You didn't like my nice long comments for these that I put in the other
> reviews?!?  *snif*
> 
> I kind of think FormatDeclarator should be = 0 in the base class.  The
> definition here is only correct for named types.
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode169
> Line 169: NamedType(const string& name) : Type(), base_name_(name) {}
> Please leave out BASECLASS() and member() when the initialization would happen
> anyway.
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode191
> Line 191: 
> I think this class should override FormatDeclarator to affix the modifier:
> 
> string FormatDeclarator(const string &declarator) const {
>   return modifier_ + declarator;
> }
> 
> and FormatDeclaration should simply be:
> 
> return type_->FormatDeclaration(FormatDeclarator(declarator));
> 
> In fact, I think that latter should be the definition in the Type base class,
> and FormatDeclarator should be = 0.
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode235
> Line 235: ArrayType(const Type::Ref& type) : ModifiedType("[]", type) {}
> Hm?  There's no way ArrayType (postfix []) and ReferenceType (prefix &) can
> differ only in the modifier string used. Doesn't ArrayType need its own
> definition of FormatDeclarator?
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode262
> Line 262: // examining the this argument.
> Well, it's not the function that is qualified, per se.  The comment should
read
> something like:
> 
> // If this is a member function, find the qualifiers on
> // its 'this' argument, to include after the parameter list.
> 
> Also, let's move all the computation of qualifiers down after the '+= ")"',
> where it'll be used.  We won't need the variable 'qualifiers'; we'll just
append
> to 'out' in the 'then' clause.
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode283
> Line 283: }
> indentation
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode301
> Line 301: string FormatDeclaration(const string& declarator) const {
> This, too, should inherit FormatDeclaration from Type and override
> FormatDeclarator.
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode574
> Line 574: // Type, Namespaces, and Functions have a cyclic dependency, so the
> I think you mean: "ParameterHandler, FuncHandler, NamedScopeHandler, and the
> various FooTypeHandlers"
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode685
> Line 685: {
> I don't think we should have braces around this.
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode1073
> Line 1073: assert(spec != specifications->end());
> If we know the entry exists, why not just declare spec to be Specification *,
> initialized to &specifications[offset_]?
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode1079
> Line 1079: // additional const qualifier to the parameters for the actutal
> functions.
> "actual"
> 
> http://breakpad.appspot.com/67001/diff/14001/15002#newcode1590
> Line 1590: }
> Would it be good to do cu_context_->types.clear() here, for good measure?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted