[parser] Only take Scope::Snapshot when it's more likely we'll have an arrow function
That reduces the overhead of ParseAssignmentExpression at the cost of a few more branches in the possible arrow head paths. This also fixes the case where an outer scope of an arrow function didn't call eval but a parameter initializer does. Previously the outer scope was also marked as calling eval, causing worse performance. (Unlikely to happen though.) Change-Id: I5263ef342f14e97372f5037fa659f32ec2ad6d34 Reviewed-on: https://chromium-review.googlesource.com/c/1352275 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#57881}
Showing
Please
register
or
sign in
to comment