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

Unified Diff: runtime/lib/collection_patch.dart

Issue 2230383003: Implement @patch annotation for patch class members (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 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 | « runtime/lib/bool_patch.dart ('k') | runtime/lib/convert_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/collection_patch.dart
diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart
index 000e0bc4187c761af61855e8bd5d6a28d03b0b5b..ed76535fc7f156453cdde7fd9223c714841ced6f 100644
--- a/runtime/lib/collection_patch.dart
+++ b/runtime/lib/collection_patch.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
@patch class HashMap<K, V> {
- /* @patch */ factory HashMap({ bool equals(K key1, K key2),
+ @patch factory HashMap({ bool equals(K key1, K key2),
int hashCode(K key),
bool isValidKey(potentialKey) }) {
if (isValidKey == null) {
@@ -32,7 +32,7 @@
return new _CustomHashMap<K, V>(equals, hashCode, isValidKey);
}
- /* patch */ factory HashMap.identity() = _IdentityHashMap<K, V>;
+ @patch factory HashMap.identity() = _IdentityHashMap<K, V>;
Set<K> _newKeySet();
}
@@ -519,9 +519,9 @@ class _HashMapValueIterator<V> extends _HashMapIterator<V> {
}
@patch class HashSet<E> {
- /* @patch */ factory HashSet({ bool equals(E e1, E e2),
- int hashCode(E e),
- bool isValidKey(potentialKey) }) {
+ @patch factory HashSet({ bool equals(E e1, E e2),
+ int hashCode(E e),
+ bool isValidKey(potentialKey) }) {
if (isValidKey == null) {
if (hashCode == null) {
if (equals == null) {
@@ -548,7 +548,7 @@ class _HashMapValueIterator<V> extends _HashMapIterator<V> {
return new _CustomHashSet<E>(equals, hashCode, isValidKey);
}
- /* @patch */ factory HashSet.identity() = _IdentityHashSet<E>;
+ @patch factory HashSet.identity() = _IdentityHashSet<E>;
}
class _HashSet<E> extends _HashSetBase<E> implements HashSet<E> {
@@ -910,7 +910,7 @@ class _LinkedHashMapValueIterator<V> extends _LinkedHashMapIterator<V> {
var _nextEntry;
var _previousEntry;
- /* @patch */ factory LinkedHashMap({ bool equals(K key1, K key2),
+ @patch factory LinkedHashMap({ bool equals(K key1, K key2),
int hashCode(K key),
bool isValidKey(potentialKey) }) {
if (isValidKey == null) {
@@ -939,12 +939,12 @@ class _LinkedHashMapValueIterator<V> extends _LinkedHashMapIterator<V> {
return new _CompactLinkedCustomHashMap<K, V>(equals, hashCode, isValidKey);
}
- /* @patch */ factory LinkedHashMap.identity() =
+ @patch factory LinkedHashMap.identity() =
_CompactLinkedIdentityHashMap<K, V>;
}
@patch class LinkedHashSet<E> {
- /* @patch */ factory LinkedHashSet({ bool equals(E e1, E e2),
+ @patch factory LinkedHashSet({ bool equals(E e1, E e2),
int hashCode(E e),
bool isValidKey(potentialKey) }) {
if (isValidKey == null) {
@@ -973,6 +973,6 @@ class _LinkedHashMapValueIterator<V> extends _LinkedHashMapIterator<V> {
return new _CompactLinkedCustomHashSet<E>(equals, hashCode, isValidKey);
}
- /* @patch */ factory LinkedHashSet.identity() =
+ @patch factory LinkedHashSet.identity() =
_CompactLinkedIdentityHashSet<E>;
}
« no previous file with comments | « runtime/lib/bool_patch.dart ('k') | runtime/lib/convert_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698