DescriptionSloppy-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
Committed: https://crrev.com/decc7b092ae90a378423df760690d58585e9ac71
Cr-Commit-Position: refs/heads/master@{#30451}
Patch Set 1 #Patch Set 2 : mark conditional as unlikely #
Total comments: 1
Patch Set 3 : clarify comment #
Messages
Total messages: 11 (3 generated)
|