Chromium Code Reviews| Index: dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart |
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart |
| index ec457089287b4236edf12d9ffc42077d0ddfd01a..b70a661135e1174a2b76c8637360a38a091ef1d8 100644 |
| --- a/dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart |
| +++ b/dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart |
| @@ -298,3 +298,19 @@ patch class StackTrace { |
| throw new UnsupportedError('stackTrace'); |
| } |
| } |
| + |
| +patch class Symbol { |
| + final String _name; |
| + |
| + patch const Symbol(String name) : |
| + this._name = name; |
| + |
| + patch bool operator ==(other) { |
| + return _name == _name; |
|
kasperl
2013/04/11 11:37:00
Check that other is a symbol and that _name == oth
ahe
2013/04/11 11:47:50
Done.
|
| + } |
| + |
| + patch int get hashCode { |
| + const arbitraryPrime = 664597; |
| + return 0x1fffffff & (arbitraryPrime * _name.hashCode); |
| + } |
| +} |