| 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 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 if (kind == engine.ElementKind.FUNCTION) { | 213 if (kind == engine.ElementKind.FUNCTION) { |
| 214 return ElementKind.FUNCTION; | 214 return ElementKind.FUNCTION; |
| 215 } | 215 } |
| 216 if (kind == engine.ElementKind.FUNCTION_TYPE_ALIAS) { | 216 if (kind == engine.ElementKind.FUNCTION_TYPE_ALIAS) { |
| 217 return ElementKind.FUNCTION_TYPE_ALIAS; | 217 return ElementKind.FUNCTION_TYPE_ALIAS; |
| 218 } | 218 } |
| 219 if (kind == engine.ElementKind.GETTER) { | 219 if (kind == engine.ElementKind.GETTER) { |
| 220 return ElementKind.GETTER; | 220 return ElementKind.GETTER; |
| 221 } | 221 } |
| 222 if (kind == engine.ElementKind.LABEL) { |
| 223 return ElementKind.LABEL; |
| 224 } |
| 222 if (kind == engine.ElementKind.LIBRARY) { | 225 if (kind == engine.ElementKind.LIBRARY) { |
| 223 return ElementKind.LIBRARY; | 226 return ElementKind.LIBRARY; |
| 224 } | 227 } |
| 225 if (kind == engine.ElementKind.LOCAL_VARIABLE) { | 228 if (kind == engine.ElementKind.LOCAL_VARIABLE) { |
| 226 return ElementKind.LOCAL_VARIABLE; | 229 return ElementKind.LOCAL_VARIABLE; |
| 227 } | 230 } |
| 228 if (kind == engine.ElementKind.METHOD) { | 231 if (kind == engine.ElementKind.METHOD) { |
| 229 return ElementKind.METHOD; | 232 return ElementKind.METHOD; |
| 230 } | 233 } |
| 231 if (kind == engine.ElementKind.PARAMETER) { | 234 if (kind == engine.ElementKind.PARAMETER) { |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); | 1010 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); |
| 1008 hash = hash ^ (hash >> 11); | 1011 hash = hash ^ (hash >> 11); |
| 1009 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); | 1012 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); |
| 1010 } | 1013 } |
| 1011 | 1014 |
| 1012 static int hash2(a, b) => finish(combine(combine(0, a), b)); | 1015 static int hash2(a, b) => finish(combine(combine(0, a), b)); |
| 1013 | 1016 |
| 1014 static int hash4(a, b, c, d) => | 1017 static int hash4(a, b, c, d) => |
| 1015 finish(combine(combine(combine(combine(0, a), b), c), d)); | 1018 finish(combine(combine(combine(combine(0, a), b), c), d)); |
| 1016 } | 1019 } |
| OLD | NEW |