Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: runtime/vm/parser.cc

Issue 1305223006: Remove allocation in old space .... (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/vm/compiler.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 64837d0e2a0a87494dbb9c7a13d1cacfe7a529aa..fea0fc325a310e6c6c9618eb335e24112c4d99ad 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -2790,13 +2790,14 @@ void Parser::ParseConstructorRedirection(const Class& cls,
const intptr_t call_pos = TokenPos();
ConsumeToken();
String& ctor_name = String::Handle(Z, cls.Name());
-
- ctor_name = String::Concat(ctor_name, Symbols::Dot());
+ GrowableHandlePtrArray<const String> pieces(Z, 3);
+ pieces.Add(ctor_name);
+ pieces.Add(Symbols::Dot());
if (CurrentToken() == Token::kPERIOD) {
ConsumeToken();
- ctor_name = String::Concat(ctor_name,
- *ExpectIdentifier("constructor name expected"));
+ pieces.Add(*ExpectIdentifier("constructor name expected"));
}
+ ctor_name = Symbols::FromConcatAll(pieces);
CheckToken(Token::kLPAREN, "parameter list expected");
ArgumentListNode* arguments = new ArgumentListNode(call_pos);
« runtime/vm/compiler.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698