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
Patch Set 1 #Patch Set 2 : Minor cleanup #Patch Set 3 : Clean up formatting #Patch Set 4 : More sloppy let tests #
Total comments: 8
Patch Set 5 : Name changes #Patch Set 6 : Replace array with direct ivars #
Messages
Total messages: 34 (15 generated)
|