| 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 part 'generated_protocol.dart'; | 10 part 'generated_protocol.dart'; |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 decodedResult = result; | 711 decodedResult = result; |
| 712 } | 712 } |
| 713 return new Response(id, error: decodedError, result: decodedResult); | 713 return new Response(id, error: decodedError, result: decodedResult); |
| 714 } catch (exception) { | 714 } catch (exception) { |
| 715 return null; | 715 return null; |
| 716 } | 716 } |
| 717 } | 717 } |
| 718 | 718 |
| 719 /** | 719 /** |
| 720 * Initialize a newly created instance to represent the | 720 * Initialize a newly created instance to represent the |
| 721 * FORMAT_INVALID_FILE error condition. |
| 722 */ |
| 723 Response.formatInvalidFile(Request request) |
| 724 : this( |
| 725 request.id, |
| 726 error: new RequestError( |
| 727 RequestErrorCode.FORMAT_INVALID_FILE, |
| 728 'Error during `edit.format`: invalid file.')); |
| 729 |
| 730 /** |
| 731 * Initialize a newly created instance to represent the |
| 721 * GET_ERRORS_INVALID_FILE error condition. | 732 * GET_ERRORS_INVALID_FILE error condition. |
| 722 */ | 733 */ |
| 723 Response.getErrorsInvalidFile(Request request) | 734 Response.getErrorsInvalidFile(Request request) |
| 724 : this( | 735 : this( |
| 725 request.id, | 736 request.id, |
| 726 error: new RequestError( | 737 error: new RequestError( |
| 727 RequestErrorCode.GET_ERRORS_INVALID_FILE, | 738 RequestErrorCode.GET_ERRORS_INVALID_FILE, |
| 728 'Error during `analysis.getErrors`: invalid file.')); | 739 'Error during `analysis.getErrors`: invalid file.')); |
| 729 | 740 |
| 730 /** | 741 /** |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); | 876 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); |
| 866 hash = hash ^ (hash >> 11); | 877 hash = hash ^ (hash >> 11); |
| 867 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); | 878 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); |
| 868 } | 879 } |
| 869 | 880 |
| 870 static int hash2(a, b) => finish(combine(combine(0, a), b)); | 881 static int hash2(a, b) => finish(combine(combine(0, a), b)); |
| 871 | 882 |
| 872 static int hash4(a, b, c, d) => | 883 static int hash4(a, b, c, d) => |
| 873 finish(combine(combine(combine(combine(0, a), b), c), d)); | 884 finish(combine(combine(combine(combine(0, a), b), c), d)); |
| 874 } | 885 } |
| OLD | NEW |