• Leszek Swirski's avatar
    [scopes] Push sloppy eval check through eval scopes · f6057ff1
    Leszek Swirski authored
    Sloppy eval extends the outer declaration scope's context. This is also
    true for sloppy eval inside of other sloppy evals -- the outer declaration
    scope's context is extended rather than the outer sloppy eval's
    declaration scope. However, we consider eval scopes to also be declaration
    scopes, for the purposes of strict eval and caching lookup variables. So,
    we need to make sure that we skip through sloppy eval scopes when marking
    a scope as calls_sloppy_eval.
    
    In fact, we implement this rather as never marking sloppy eval scopes as
    calls_sloppy_eval, under the assumption that the parent scope will already
    have been marked calls_sloppy_eval by the outer eval.
    
    As a drive-by, fix a TODO to move this logic from calls_sloppy_eval() to
    RecordEvalCall(), rename the variable to something more meaningful, and
    make Snapshotting to use a new calls_eval bit on Scope.
    
    Bug: chromium:996751
    Change-Id: I27ccc7ef429a7ce60b3bb02bf64a3820ae4a2c36
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1773247
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#63455}
    f6057ff1
Name
Last commit
Last update
..
OWNERS Loading commit data...
expression-scope-reparenter.cc Loading commit data...
expression-scope-reparenter.h Loading commit data...
expression-scope.h Loading commit data...
func-name-inferrer.cc Loading commit data...
func-name-inferrer.h Loading commit data...
keywords-gen.h Loading commit data...
keywords.txt Loading commit data...
literal-buffer.cc Loading commit data...
literal-buffer.h Loading commit data...
parse-info.cc Loading commit data...
parse-info.h Loading commit data...
parser-base.h Loading commit data...
parser.cc Loading commit data...
parser.h Loading commit data...
parsing.cc Loading commit data...
parsing.h Loading commit data...
pending-compilation-error-handler.cc Loading commit data...
pending-compilation-error-handler.h Loading commit data...
preparse-data-impl.h Loading commit data...
preparse-data.cc Loading commit data...
preparse-data.h Loading commit data...
preparser-logger.h Loading commit data...
preparser.cc Loading commit data...
preparser.h Loading commit data...
rewriter.cc Loading commit data...
rewriter.h Loading commit data...
scanner-character-streams.cc Loading commit data...
scanner-character-streams.h Loading commit data...
scanner-inl.h Loading commit data...
scanner.cc Loading commit data...
scanner.h Loading commit data...
token.cc Loading commit data...
token.h Loading commit data...