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

Unified Diff: runtime/lib/core_patch.dart

Issue 2153143002: Rework how enums are implemented and reloaded (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/core_patch.dart
diff --git a/runtime/lib/core_patch.dart b/runtime/lib/core_patch.dart
index 13f75138101ec8e25f46e870ff97a32daafee9b7..6c792d2bfda13906657e955a14aaf9a7f4b4c3f6 100644
--- a/runtime/lib/core_patch.dart
+++ b/runtime/lib/core_patch.dart
@@ -11,13 +11,9 @@ _fatal(msg) native "DartCore_fatal";
// The members of this class are cloned and added to each class that
// represents an enum type.
class _EnumHelper {
- // Declare the list of enum value names private. When this field is
- // cloned into a user-defined enum class, the field will be inaccessible
- // because of the library-specific name suffix. The toString() function
- // below can access it because it uses the same name suffix.
- static const List<String> _enum_names = null;
- String toString() => _enum_names[index];
- int get hashCode => _enum_names[index].hashCode;
+ String _name;
+ String toString() => _name;
+ int get hashCode => _name.hashCode;
}
// _SyncIterable and _syncIterator are used by the compiler to
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698