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

Side by Side Diff: pkg/analysis_server/lib/src/protocol.dart

Issue 625413002: Remove special list behavior in analysis server protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library protocol; 5 library protocol;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:analysis_server/src/computer/element.dart' show 10 import 'package:analysis_server/src/computer/element.dart' show
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 286 }
287 } 287 }
288 return null; 288 return null;
289 } 289 }
290 290
291 /** 291 /**
292 * Compare the lists [listA] and [listB], using [itemEqual] to compare 292 * Compare the lists [listA] and [listB], using [itemEqual] to compare
293 * list elements. 293 * list elements.
294 */ 294 */
295 bool _listEqual(List listA, List listB, bool itemEqual(a, b)) { 295 bool _listEqual(List listA, List listB, bool itemEqual(a, b)) {
296 if (listA == null) {
297 return listB == null;
298 }
299 if (listB == null) {
300 return false;
301 }
296 if (listA.length != listB.length) { 302 if (listA.length != listB.length) {
297 return false; 303 return false;
298 } 304 }
299 for (int i = 0; i < listA.length; i++) { 305 for (int i = 0; i < listA.length; i++) {
300 if (!itemEqual(listA[i], listB[i])) { 306 if (!itemEqual(listA[i], listB[i])) {
301 return false; 307 return false;
302 } 308 }
303 } 309 }
304 return true; 310 return true;
305 } 311 }
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 1121 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
1116 hash = hash ^ (hash >> 11); 1122 hash = hash ^ (hash >> 11);
1117 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 1123 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
1118 } 1124 }
1119 1125
1120 static int hash2(a, b) => finish(combine(combine(0, a), b)); 1126 static int hash2(a, b) => finish(combine(combine(0, a), b));
1121 1127
1122 static int hash4(a, b, c, d) => 1128 static int hash4(a, b, c, d) =>
1123 finish(combine(combine(combine(combine(0, a), b), c), d)); 1129 finish(combine(combine(combine(combine(0, a), b), c), d));
1124 } 1130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698