Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(796)

Issue 7168016: Add duplicate parameter detection to preparser. (Closed)

Created:
9 years, 6 months ago by Lasse Reichstein
Modified:
9 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add duplicate parameter detection to preparser. Add tests for duplicate properties of object initialisers to preparser. TEST=preparser Committed: http://code.google.com/p/v8/source/detail?r=8517

Patch Set 1 #

Patch Set 2 : Added one more test #

Patch Set 3 : Simplify execution of .pyt files. #

Patch Set 4 : Fixed a typo #

Total comments: 6

Patch Set 5 : Update to tip of bleeding_edge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+530 lines, -48 lines) Patch
M src/preparser.h View 1 2 3 4 4 chunks +68 lines, -0 lines 0 comments Download
M src/preparser.cc View 1 2 3 4 20 chunks +219 lines, -33 lines 0 comments Download
M src/preparser-api.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/utils.h View 2 chunks +15 lines, -10 lines 0 comments Download
A test/preparser/duplicate-parameter.pyt View 1 chunk +80 lines, -0 lines 0 comments Download
A test/preparser/duplicate-property.pyt View 1 1 chunk +144 lines, -0 lines 0 comments Download
M test/preparser/testcfg.py View 1 2 3 3 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Lasse Reichstein
We might want to hold this back until we do proper string->double->string conversion for numeric ...
9 years, 6 months ago (2011-06-15 15:26:17 UTC) #1
Mads Ager (chromium)
9 years, 6 months ago (2011-06-16 06:48:56 UTC) #2
http://codereview.chromium.org/7168016/diff/4008/src/preparser.cc
File src/preparser.cc (right):

http://codereview.chromium.org/7168016/diff/4008/src/preparser.cc#newcode1099
src/preparser.cc:1099: int intersect = old_value & type;
And this is what that comment on the enum should say. You are using it to check
for overlapping properties with special treatment for a getter and a setter with
the same name.

http://codereview.chromium.org/7168016/diff/4008/src/preparser.cc#newcode1101
src/preparser.cc:1101: if ((intersect & kValueFlag) != 0) {
Maybe have methods for these bit operations?

BothDataProperties(type1, type2)
DataAndAccessorProperty(type1, type2)

http://codereview.chromium.org/7168016/diff/4008/src/preparser.cc#newcode1616
src/preparser.cc:1616: bool is_ascii) {
indentation

http://codereview.chromium.org/7168016/diff/4008/src/preparser.h
File src/preparser.h (right):

http://codereview.chromium.org/7168016/diff/4008/src/preparser.h#newcode56
src/preparser.h:56: ~DuplicateFinder() {
Could you add a line between constructor and destructor?

http://codereview.chromium.org/7168016/diff/4008/src/preparser.h#newcode118
src/preparser.h:118: enum PropertyType {
Please add a comment about the format here. I don't understand why value
property is 7 instead of 4?

http://codereview.chromium.org/7168016/diff/4008/test/preparser/testcfg.py
File test/preparser/testcfg.py (right):

http://codereview.chromium.org/7168016/diff/4008/test/preparser/testcfg.py#ne...
test/preparser/testcfg.py:146: executable, current_path, mode)
indentation

Powered by Google App Engine
This is Rietveld 408576698