| Index: sky/specs/utils.md
|
| diff --git a/sky/specs/utils.md b/sky/specs/utils.md
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..de8da83ba75f775d9894cfa2ae7ffd9bd4a729dc
|
| --- /dev/null
|
| +++ b/sky/specs/utils.md
|
| @@ -0,0 +1,22 @@
|
| +Dart Utilities Used By dart:sky
|
| +===============================
|
| +
|
| +The classes defined here are used internally by dart:sky but are
|
| +pretty generic.
|
| +
|
| +```dart
|
| +class Pair<A, B> {
|
| + const Pair(this.a, this.b);
|
| + final A a;
|
| + final B b;
|
| + int get hashCode => a.hashCode ^ b.hashCode;
|
| + bool operator==(other) => other is Pair<A, B> && a == other.a && b == other.b;
|
| +}
|
| +
|
| +// MapOfWeakReferences can be implemented in C, using the C Dart API, apparently
|
| +class MapOfWeakReferences<Key, Value> {
|
| + external operator[](Key key);
|
| + external operator[]=(Key key, Value value);
|
| + external bool containsKey(Key key);
|
| +}
|
| +```
|
|
|