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

Unified Diff: runtime/vm/parser.cc

Issue 1311693003: oneee# Enter a description of the change. (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
« no previous file with comments | « runtime/vm/hash_table.h ('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 aa27a73b13b0348134750d225480a44e1f32a885..68793b2452ddff7c000cb89221757e2b900e6348 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -4289,16 +4289,16 @@ void Parser::ParseClassMemberDefinition(ClassDesc* members,
// We must be dealing with a constructor or named constructor.
member.kind = RawFunction::kConstructor;
- *member.name = String::Concat(*member.name, Symbols::Dot());
+ GrowableArray<const String*> to_concat(Z, 3);
+ to_concat.Add(&String::ZoneHandle(Z, member.name->raw()));
+ to_concat.Add(&Symbols::Dot());
if (CurrentToken() == Token::kPERIOD) {
// Named constructor.
ConsumeToken();
member.dict_name = ExpectIdentifier("identifier expected");
- *member.name = String::Concat(*member.name, *member.dict_name);
+ to_concat.Add(&String::ZoneHandle(Z, member.dict_name->raw()));
}
- // Ensure that names are symbols.
- *member.name = Symbols::New(*member.name);
-
+ *member.name = Symbols::FromConcatAll(to_concat);
CheckToken(Token::kLPAREN);
} else if ((CurrentToken() == Token::kGET) && !member.has_var &&
(LookaheadToken(1) != Token::kLPAREN) &&
« no previous file with comments | « runtime/vm/hash_table.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698