v8/test
marja@chromium.org 1bb79539f3 Scanner: remove PushBack calls when we're going to return ILLEGAL.
This simplifies escape handling and makes it easier to extend escapes for ES6.

PushBack just before detecting ILLEGAL is unnecessary, since we will abort the
scanning / parsing anyway at that point, and it doesn't matter where the cursor
exactly is. The error messages w/ PushBack are not any better or more correct
than without.

In addition: remove a comment about handling invalid escapes gracefully when we
no longer do. (*)

This CL includes a behavioral change: For input "var r = /foobar/g\urrrr;" we
used to report "unexpected_token: ILLEGAL" for "\u", but now we report
malformed_regexp_flags which is a more correct error message. (Note that the
code for reporting invalid_regexp_flags was dead, and invalid_regexp_flags is
not the right error message.)

Note that the V8 is more relaxed about unicode escapes in regexp flags than ES6
(see
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regular-expressions )
and this CL doesn't change it. (V8 accepts any \uxxxx, ES6 spec says only a
certain value range is acceptable.)

(*) Code archaeology:

Originally, doing PushBack in ScanHexEscape made sense (see e.g., here
https://codereview.chromium.org/5063003/diff/6001/src/prescanner.h ), since we
wouldn't return ILLEGAL but treat an invalid escape sequence "\uxxxx" as
"uxxxx".

(The repo at that point contains another instance of the same function, from the
initial commit. The logic is the same.)

This behavior was changed in a "renaming" commit
https://codereview.chromium.org/7739020.

BUG=
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/684873002

Cr-Commit-Position: refs/heads/master@{#25031}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-31 13:03:45 +00:00
..
benchmarks Revert "Enable turbofan deoptimization by default." 2014-10-27 14:37:10 +00:00
cctest Scanner: remove PushBack calls when we're going to return ILLEGAL. 2014-10-31 13:03:45 +00:00
intl Allow identifier code points from supplementary multilingual planes. 2014-10-10 07:13:46 +00:00
js-perf-test Add performance tests for Map/Set with String and Object keys 2014-10-29 10:18:38 +00:00
message Enable access check tests that no longer fail with TF. 2014-08-14 13:24:57 +00:00
mjsunit Fix bug in optimization of Uint32LessThan. 2014-10-30 15:52:47 +00:00
mozilla Skipt tests with TF on windows. 2014-10-30 09:48:42 +00:00
preparser ES6: Duplicate properties are no longer an error 2014-08-20 14:25:48 +00:00
promises-aplus Enable access check tests that no longer fail with TF. 2014-08-14 13:24:57 +00:00
test262 Convert argument toObject() in Object.getOwnPropertyNames/Descriptors 2014-10-15 14:01:20 +00:00
test262-es6 Upgrade test262-es6 2014-10-20 12:17:12 +00:00
unittests [turbofan] First step towards correctified 64-bit addressing. 2014-10-31 06:41:41 +00:00
webkit Skip tests with TF. 2014-10-30 12:38:48 +00:00