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

Unified Diff: runtime/vm/parser.cc

Issue 1723733002: Simplify various name flavors in VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address what was discussed in meeting Created 4 years, 10 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
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 9571669c0e271ed9661d0424101675a54560d40d..ac7b22b4e9b4c73bf20ed57cfc8d0736f4c7c6a6 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -4609,7 +4609,7 @@ void Parser::ParseEnumDefinition(const Class& cls) {
SkipMetadata();
ExpectToken(Token::kENUM);
- const String& enum_name = String::Handle(Z, cls.PrettyName());
+ const String& enum_name = String::Handle(Z, cls.ScrubbedName());
ClassDesc enum_members(Z, cls, enum_name, false, cls.token_pos());
// Add instance field 'final int index'.
@@ -4707,7 +4707,7 @@ void Parser::ParseEnumDefinition(const Class& cls) {
// For the user-visible name of the enumeration value, we need to
// unmangle private names.
if (enum_ident->CharAt(0) == '_') {
- *enum_ident = String::IdentifierPrettyName(*enum_ident);
+ *enum_ident = String::ScrubName(*enum_ident);
}
enum_value_name = Symbols::FromConcat(name_prefix, *enum_ident);
enum_names.Add(enum_value_name, Heap::kOld);

Powered by Google App Engine
This is Rietveld 408576698