Commit 1871e528 authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[parser] Set intial size for reported_errors_ vector

Changing reported_errors_ from a ZoneList to a ZoneVector caused
regressions in Octane/CodeLoad and some other parsing benchmarks. This
could be because we don't give the vector an initial size.

Change-Id: I42c6ae063681dc3490dbab260085e801e24ac569
Reviewed-on: https://chromium-review.googlesource.com/1186328Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55335}
parent 646918f9
......@@ -1592,7 +1592,7 @@ ParserBase<Impl>::FunctionState::FunctionState(
outer_function_state_(*function_state_stack),
scope_(scope),
destructuring_assignments_to_rewrite_(scope->zone()),
reported_errors_(scope_->zone()),
reported_errors_(16, scope_->zone()),
dont_optimize_reason_(BailoutReason::kNoReason),
suspend_count_(0),
next_function_is_likely_called_(false),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment