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

Unified Diff: runtime/vm/parser.cc

Issue 1312833009: Added {Zone}GrowableHandlePtrArray types: simplifies code, makes code safer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: d 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/object.cc ('k') | runtime/vm/symbols.h » ('j') | 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 dc05474ac7d5f774af4b2d1820f7a8b5c1735c0a..f7e3a273d4def38aee2bb6b2c1ce9a7f6f1ca575 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -4289,14 +4289,14 @@ void Parser::ParseClassMemberDefinition(ClassDesc* members,
// We must be dealing with a constructor or named constructor.
member.kind = RawFunction::kConstructor;
- GrowableArray<const String*> to_concat(Z, 3);
- to_concat.Add(&String::ZoneHandle(Z, member.name->raw()));
- to_concat.Add(&Symbols::Dot());
+ GrowableHandlePtrArray<const String> to_concat(Z, 3);
+ to_concat.Add(*member.name);
+ to_concat.Add(Symbols::Dot());
if (CurrentToken() == Token::kPERIOD) {
// Named constructor.
ConsumeToken();
member.dict_name = ExpectIdentifier("identifier expected");
- to_concat.Add(&String::ZoneHandle(Z, member.dict_name->raw()));
+ to_concat.Add(*member.dict_name);
}
*member.name = Symbols::FromConcatAll(to_concat);
CheckToken(Token::kLPAREN);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698