| OLD | NEW |
| 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 protocol2; | 5 library protocol2; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'protocol.dart'; | 9 import 'protocol.dart'; |
| 10 | 10 |
| 11 import 'package:analysis_server/src/services/json.dart'; |
| 12 |
| 11 part 'generated_protocol.dart'; | 13 part 'generated_protocol.dart'; |
| 12 | 14 |
| 13 /** | 15 /** |
| 14 * Compare the lists [listA] and [listB], using [itemEqual] to compare | 16 * Compare the lists [listA] and [listB], using [itemEqual] to compare |
| 15 * list elements. | 17 * list elements. |
| 16 */ | 18 */ |
| 17 bool _listEqual(List listA, List listB, bool itemEqual(a, b)) { | 19 bool _listEqual(List listA, List listB, bool itemEqual(a, b)) { |
| 18 if (listA.length != listB.length) { | 20 if (listA.length != listB.length) { |
| 19 return false; | 21 return false; |
| 20 } | 22 } |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); | 260 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); |
| 259 hash = hash ^ (hash >> 11); | 261 hash = hash ^ (hash >> 11); |
| 260 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); | 262 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); |
| 261 } | 263 } |
| 262 | 264 |
| 263 static int hash2(a, b) => finish(combine(combine(0, a), b)); | 265 static int hash2(a, b) => finish(combine(combine(0, a), b)); |
| 264 | 266 |
| 265 static int hash4(a, b, c, d) => | 267 static int hash4(a, b, c, d) => |
| 266 finish(combine(combine(combine(combine(0, a), b), c), d)); | 268 finish(combine(combine(combine(combine(0, a), b), c), d)); |
| 267 } | 269 } |
| OLD | NEW |