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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 /** | 726 /** |
727 * Initialize a newly created instance to represent the | 727 * Initialize a newly created instance to represent the |
728 * GET_ERRORS_INVALID_FILE error condition. | 728 * GET_ERRORS_INVALID_FILE error condition. |
729 */ | 729 */ |
730 Response.getErrorsInvalidFile(Request request) : this(request.id, | 730 Response.getErrorsInvalidFile(Request request) : this(request.id, |
731 error: new RequestError(RequestErrorCode.GET_ERRORS_INVALID_FILE, | 731 error: new RequestError(RequestErrorCode.GET_ERRORS_INVALID_FILE, |
732 'Error during `analysis.getErrors`: invalid file.')); | 732 'Error during `analysis.getErrors`: invalid file.')); |
733 | 733 |
734 /** | 734 /** |
735 * Initialize a newly created instance to represent an error condition caused | 735 * Initialize a newly created instance to represent an error condition caused |
| 736 * by an analysis.reanalyze [request] that specifies an analysis root that is |
| 737 * not in the current list of analysis roots. |
| 738 */ |
| 739 Response.invalidAnalysisRoot(Request request, String rootPath) : this( |
| 740 request.id, |
| 741 error: new RequestError(RequestErrorCode.INVALID_ANALYSIS_ROOT, |
| 742 "Invalid analysis root: $rootPath")); |
| 743 |
| 744 |
| 745 /** |
| 746 * Initialize a newly created instance to represent an error condition caused |
736 * by a [request] that specifies an execution context whose context root does | 747 * by a [request] that specifies an execution context whose context root does |
737 * not exist. | 748 * not exist. |
738 */ | 749 */ |
739 Response.invalidExecutionContext(Request request, String contextId) : this( | 750 Response.invalidExecutionContext(Request request, String contextId) : this( |
740 request.id, | 751 request.id, |
741 error: new RequestError(RequestErrorCode.INVALID_EXECUTION_CONTEXT, | 752 error: new RequestError(RequestErrorCode.INVALID_EXECUTION_CONTEXT, |
742 "Invalid execution context: $contextId")); | 753 "Invalid execution context: $contextId")); |
743 | 754 |
744 /** | 755 /** |
745 * Initialize a newly created instance to represent an error condition caused | 756 * Initialize a newly created instance to represent an error condition caused |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); | 896 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); |
886 hash = hash ^ (hash >> 11); | 897 hash = hash ^ (hash >> 11); |
887 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); | 898 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); |
888 } | 899 } |
889 | 900 |
890 static int hash2(a, b) => finish(combine(combine(0, a), b)); | 901 static int hash2(a, b) => finish(combine(combine(0, a), b)); |
891 | 902 |
892 static int hash4(a, b, c, d) => | 903 static int hash4(a, b, c, d) => |
893 finish(combine(combine(combine(combine(0, a), b), c), d)); | 904 finish(combine(combine(combine(combine(0, a), b), c), d)); |
894 } | 905 } |
OLD | NEW |