Commit d16bce9d authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[parser] Removed unnecessary copies

Bug: v8:8015
Change-Id: I2ee074559484b9865dc1a27e6ea697ca311ee7ee
Reviewed-on: https://chromium-review.googlesource.com/1185198Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55327}
parent f8280bf6
...@@ -1404,7 +1404,7 @@ Block* Parser::BuildInitializationBlock( ...@@ -1404,7 +1404,7 @@ Block* Parser::BuildInitializationBlock(
DeclarationParsingResult* parsing_result, DeclarationParsingResult* parsing_result,
ZonePtrList<const AstRawString>* names, bool* ok) { ZonePtrList<const AstRawString>* names, bool* ok) {
Block* result = factory()->NewBlock(1, true); Block* result = factory()->NewBlock(1, true);
for (auto declaration : parsing_result->declarations) { for (const auto& declaration : parsing_result->declarations) {
DeclareAndInitializeVariables(result, &(parsing_result->descriptor), DeclareAndInitializeVariables(result, &(parsing_result->descriptor),
&declaration, names, CHECK_OK); &declaration, names, CHECK_OK);
} }
......
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