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

Unified Diff: runtime/vm/parser.cc

Issue 1314363003: More cleanups in compiler (remove allocation in new space). (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/intermediate_language.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 731c13fbc007bc438cb47ca52008b64ba03195d6..66a167209523a31a9d04f3f2408170c7b77cd56f 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -2397,8 +2397,9 @@ void Parser::GenerateSuperConstructorCall(const Class& cls,
if (ctor_name.Length() > class_name.Length() + 1) {
// Generating a forwarding call to a named constructor 'C.n'.
// Add the constructor name 'n' to the super constructor.
- ctor_name = String::SubString(ctor_name, class_name.Length() + 1);
- super_ctor_name = String::Concat(super_ctor_name, ctor_name);
+ const intptr_t kLen = class_name.Length() + 1;
+ ctor_name = Symbols::New(ctor_name, kLen, ctor_name.Length() - kLen);
+ super_ctor_name = Symbols::FromConcat(super_ctor_name, ctor_name);
}
}
@@ -3691,7 +3692,7 @@ void Parser::ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method) {
ASSERT(method->IsSetter());
expected_num_parameters = (method->has_static) ? 1 : 2;
method->dict_name = &String::ZoneHandle(Z,
- String::Concat(*method->name, Symbols::Equals()));
+ Symbols::FromConcat(*method->name, Symbols::Equals()));
method->name = &String::ZoneHandle(Z, Field::SetterSymbol(*method->name));
}
if ((method->params.num_fixed_parameters != expected_num_parameters) ||
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698