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

Issue 4920041: Modified Token class to store various types of data. Added debug code to dump token to an output ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by Alok Priyadarshi
Modified:
12 years, 9 months ago
Reviewers:
kbr1, dgkoch
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Modified Token class to store various types of data. Added debug code to dump token to an output stream. Committed: http://code.google.com/p/angleproject/source/detail?r=737

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+251 lines, -118 lines) Patch
M src/compiler/preprocessor/new/Token.h View 1 chunk +19 lines, -8 lines 2 comments Download
M src/compiler/preprocessor/new/Token.cpp View 1 chunk +57 lines, -8 lines 0 comments Download
M src/compiler/preprocessor/new/pp.l View 2 chunks +3 lines, -3 lines 0 comments Download
M src/compiler/preprocessor/new/pp.y View 8 chunks +38 lines, -18 lines 3 comments Download
M src/compiler/preprocessor/new/pp_lex.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M src/compiler/preprocessor/new/pp_tab.h View 3 chunks +9 lines, -6 lines 0 comments Download
M src/compiler/preprocessor/new/pp_tab.cpp View 18 chunks +109 lines, -72 lines 0 comments Download
A src/compiler/preprocessor/new/token_type.h View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 5
Alok Priyadarshi
12 years, 9 months ago (2011-08-19 08:17:47 UTC) #1
kbr1
LGTM overall. Couple of comments. http://codereview.appspot.com/4920041/diff/1/src/compiler/preprocessor/new/Token.h File src/compiler/preprocessor/new/Token.h (right): http://codereview.appspot.com/4920041/diff/1/src/compiler/preprocessor/new/Token.h#newcode39 src/compiler/preprocessor/new/Token.h:39: std::string* sval; It seems ...
12 years, 9 months ago (2011-08-19 20:15:51 UTC) #2
Alok Priyadarshi
http://codereview.appspot.com/4920041/diff/1/src/compiler/preprocessor/new/Token.h File src/compiler/preprocessor/new/Token.h (right): http://codereview.appspot.com/4920041/diff/1/src/compiler/preprocessor/new/Token.h#newcode39 src/compiler/preprocessor/new/Token.h:39: std::string* sval; On 2011/08/19 20:15:51, kbr1 wrote: > It ...
12 years, 9 months ago (2011-08-19 21:39:48 UTC) #3
Alok Priyadarshi
Daniel/Ken: I committed a portion of this patch in r737 because I wanted to work ...
12 years, 9 months ago (2011-08-22 08:16:51 UTC) #4
dgkoch
12 years, 9 months ago (2011-08-22 19:43:41 UTC) #5
LGTM

http://codereview.appspot.com/4920041/diff/1/src/compiler/preprocessor/new/pp.y
File src/compiler/preprocessor/new/pp.y (right):

http://codereview.appspot.com/4920041/diff/1/src/compiler/preprocessor/new/pp...
src/compiler/preprocessor/new/pp.y:41: std::vector<std::string*>* slist;
On 2011/08/19 21:39:48, Alok Priyadarshi wrote:
> On 2011/08/19 20:15:51, kbr1 wrote:
> > It seems to me the memory management of this type might be difficult, since
> you
> > have to explicitly delete each element as well as the vector.
> 
> Yeah it is unfortunate. The same is true with pp::TokenVector which is a
vector
> of token pointers. I think memory management will be a pain but not too
> difficult, because everything gets reduced to one rule where we can delete all
> allocated memory. I will also add plenty of memory tests.

Please do make sure that allocation failures are handled and can be relatively
easily propagated out as well.  This is one of the failure points of the old
preprocessor...
Sign in to reply to this message.

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