[parser] Preallocate param initialization block with entry per complex parameter
Change-Id: I33426cdbec284f3f2f8d80b29788067efc56226b Reviewed-on: https://chromium-review.googlesource.com/c/1267942 Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#56446}
This commit is contained in:
parent
af34c6c236
commit
3efbaf8eb1
@ -2787,7 +2787,7 @@ Block* Parser::BuildParameterInitializationBlock(
|
||||
DCHECK(!parameters.is_simple);
|
||||
DCHECK(scope()->is_function_scope());
|
||||
DCHECK_EQ(scope(), parameters.scope);
|
||||
Block* init_block = factory()->NewBlock(1, true);
|
||||
Block* init_block = factory()->NewBlock(parameters.num_parameters(), true);
|
||||
int index = 0;
|
||||
for (auto parameter : parameters.params) {
|
||||
DeclarationDescriptor descriptor;
|
||||
|
Loading…
Reference in New Issue
Block a user