DescriptionRemove "is function lazy" logic from Preparser + tiny error reporting refactoring.
It doesn't need to have this logic.
ParseLazyFunctionLiteralBody is basically just ParseStatementList
+ log the function position. But PreParser doesn't need to have
the "which functions to log" logic, since logging the function is
always done exactly when Parser falls back to PreParser. (See
PreParseLazyFunction.)
So in the current state, PreParser would log several functions in
a SingletonLogger, and only the last one would take
effect (that's the one Parser also logs in SkipLazyFunctionBody).
Also updated test-parsing/Regress928 to produce the preparse data
the way we do now (i.e., not running the PreParser directly, but
running the Parser).
Error reporting: when PreParser finds an error, it doesn't need
to ReportUnexpectedToken in PreParseLazyFunction, since it
already has reported the error whenever it found it.
BUG=v8:5515
Committed: https://crrev.com/97fe83c78f1b4076a9ac3dc3cac973dd4b730117
Cr-Commit-Position: refs/heads/master@{#40315}
Patch Set 1 #Patch Set 2 : kill unused var #
Messages
Total messages: 15 (10 generated)
|