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

Unified Diff: runtime/vm/object.cc

Issue 1296403003: Do not generate some temporary String objects while compiling (field names extracted from getter/se… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: k 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index f201aa8c362bd8e6579b5bf95fb20da9cde88f38..73cd49cbcbf420c9fc1d93679fb659193017f27c 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -7169,12 +7169,14 @@ RawString* Field::SetterSymbol(const String& field_name) {
RawString* Field::NameFromGetter(const String& getter_name) {
- return String::SubString(getter_name, strlen(kGetterPrefix));
+ return Symbols::New(getter_name, kGetterPrefixLength,
+ getter_name.Length() - kGetterPrefixLength);
}
RawString* Field::NameFromSetter(const String& setter_name) {
- return String::SubString(setter_name, strlen(kSetterPrefix));
+ return Symbols::New(setter_name, kSetterPrefixLength,
+ setter_name.Length() - kSetterPrefixLength);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698