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

Unified Diff: pkg/source_maps/lib/span.dart

Issue 19315003: Address hint discovered by dart2js: add hashCode to source_maps.Span (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/source_maps/lib/span.dart
diff --git a/pkg/source_maps/lib/span.dart b/pkg/source_maps/lib/span.dart
index 7ca0ca97c4cc13377205e05cd19c8f96d90e4fb6..1d2152da70c4e59c7ff0a1b58d9dcac0f8c28af6 100644
--- a/pkg/source_maps/lib/span.dart
+++ b/pkg/source_maps/lib/span.dart
@@ -69,6 +69,8 @@ abstract class Span implements Comparable {
bool operator ==(Span other) =>
sourceUrl == other.sourceUrl && start == other.start && end == other.end;
+ int get hashCode => sourceUrl.hashCode + start + (31 * (end - start));
+
String toString() => '<$runtimeType: $start $end $formatLocation $text>';
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698