DescriptionFix lazy compilation of eval() under nosnap/--use-strict
When running without a snapshot, the GlobalEval function gets lazy compiled.
By the time we compile it, its name is "eval", which causes the parser to
choke (functions named "eval" aren't allowed in strict mode!).
Instead, we now always skip checking the function name when lazy-parsing,
as the name has already been checked appropriately by the preparser.
Also cleaned up other cases that don't require name checking by introducing
FunctionNameValidity enum and passing appropriate values throughout the
parser and preparser.
This lets us pass an additional 18 test262 tests.
BUG=v8:4198
LOG=n
Committed: https://crrev.com/33a373985be86a52b788f0277a8e61a804c602da
Cr-Commit-Position: refs/heads/master@{#29559}
Patch Set 1 #Patch Set 2 : Use ParseInfo::is_native and compare eval_string instead #
Total comments: 2
Patch Set 3 : Totally different approach: skip all function name checks when lazy-parsing #Patch Set 4 : Whitespace #Patch Set 5 : Undo reordering #
Messages
Total messages: 15 (3 generated)
|