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

Issue 7037024: Added preparser strict-mode tests. (Closed)

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

Description

Added preparser strict-mode tests. Now tests for use of eval, arguments, reserved words and with statement. Committed: http://code.google.com/p/v8/source/detail?r=7951

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address review comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1813 lines, -152 lines) Patch
M preparser/preparser-process.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/preparse-data.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/preparser.h View 1 4 chunks +214 lines, -29 lines 0 comments Download
M src/preparser.cc View 57 chunks +291 lines, -121 lines 0 comments Download
A test/preparser/nonstrict-arguments.js View 1 chunk +51 lines, -0 lines 0 comments Download
A test/preparser/nonstrict-eval.js View 1 chunk +51 lines, -0 lines 0 comments Download
A test/preparser/nonstrict-with.js View 1 chunk +43 lines, -0 lines 0 comments Download
M test/preparser/preparser.expectation View 1 chunk +38 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-argument.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-argument-own.js View 1 chunk +32 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-assign.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-catch.js View 1 chunk +35 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-func.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-func-own.js View 1 chunk +32 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-funcexp.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-op-assign.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-postfix.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-prefix.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-arguments-var.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-argument.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-argument-own.js View 1 chunk +32 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-assign.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-catch.js View 1 chunk +35 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-func.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-func-own.js View 1 chunk +32 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-funcexp.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-op-assign.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-postfix.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-prefix.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-eval-var.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-with.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-argument.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-argument-own.js View 1 chunk +32 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-assign.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-catch.js View 1 chunk +35 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-func.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-func-own.js View 1 chunk +32 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-funcexp.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-op-assign.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-postfix.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-prefix.js View 1 chunk +33 lines, -0 lines 0 comments Download
A test/preparser/strict-yield-var.js View 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
Mostly test cases. I really should make them templated.
9 years, 7 months ago (2011-05-18 12:09:01 UTC) #1
Mads Ager (chromium)
LGTM But I would use eval and try-catch to reduce the number of files. All ...
9 years, 7 months ago (2011-05-18 13:20:48 UTC) #2
Lasse Reichstein
9 years, 7 months ago (2011-05-19 09:00:31 UTC) #3
Address review comments.

Sadly, using eval won't work. This is testing the stand-alone preparser library,
so there is no V8 and no javascript execution capability.

I have a python-based template solution that's almost working. It should cut
down on the test-files while increasing coverage (e.g., test all future reserved
words).

http://codereview.chromium.org/7037024/diff/1/src/preparser.h
File src/preparser.h (right):

http://codereview.chromium.org/7037024/diff/1/src/preparser.h#newcode196
src/preparser.h:196: // They no longer work as lables or directive prologues,
Done.

Powered by Google App Engine
This is Rietveld 408576698