Reviewers: adamk, vogelheim,
Message:
This was previously reviewed at https://codereview.chromium.org/1295883002 ;
uploaded here because I couldn't get Rietveldt to resume a patch from a
different checkout when there were conflicts in the cherry-pick.
Compared to the last version, this version tries to fix a bookmark-related
issue
where next_next_ is not stored in the bookmark by refusing to save a
bookmark
when it is initialized.
Description:
Sloppy-mode let parsing
This patch makes 'let' a contextual keyword in both strict and sloppy mode.
It behaves as a keyword when used at the beginning of a StatementListItem
or lexical declaration at the beginning of a for statement, if it is
followed
by an identifier, [ or {. Implementing this change requires an extra token
look-ahead by the parser which is only invoked in certain cases (so as to
avoid parsing RegExps as ECMAScript tokens). This might result in a slowdown
of the scanner, but performance testing of this patch hasn't yet found much
of a regression.
BUG=v8:3305
LOG=Y
R=adamk,vogelheim
Please review this at https://codereview.chromium.org/1315673009/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+164, -14 lines):
M src/parser.cc
M src/preparser.h
M src/preparser.cc
M src/scanner.h
M src/scanner.cc
M src/token.h
M test/cctest/test-parsing.cc
A test/mjsunit/harmony/block-let-contextual-sloppy.js
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.