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

Unified Diff: runtime/lib/collection_patch.dart

Issue 380333002: Add VM class for Map/LinkedHashMap. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/lib/collection_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/collection_patch.dart
===================================================================
--- runtime/lib/collection_patch.dart (revision 38576)
+++ runtime/lib/collection_patch.dart (working copy)
@@ -906,7 +906,11 @@
if (isValidKey == null) {
if (hashCode == null) {
if (equals == null) {
- return new _LinkedHashMap<K, V>();
+ if (_useInternalCached) {
+ return new _InternalLinkedHashMap<K, V>();
+ } else {
+ return new _LinkedHashMap<K, V>();
+ }
}
hashCode = _defaultHashCode;
} else {
@@ -930,6 +934,9 @@
}
/* patch */ factory LinkedHashMap.identity() = _LinkedIdentityHashMap<K, V>;
+
+ static final bool _useInternalCached = _useInternal;
+ static bool get _useInternal native "LinkedHashMap_useInternal";
}
// Methods that are exactly the same in all three linked hash map variants.
« no previous file with comments | « no previous file | runtime/lib/collection_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698