• marja's avatar
    Remove "is function lazy" logic from Preparser + tiny error reporting refactoring. · 97fe83c7
    marja authored
    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
    
    Review-Url: https://codereview.chromium.org/2421833002
    Cr-Commit-Position: refs/heads/master@{#40315}
    97fe83c7
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...