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

Side by Side Diff: pkg/analyzer/lib/task/model.dart

Issue 1715563002: Tolerate SDKs that do not include dart:async (issue 25520) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added test Created 4 years, 10 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
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer.task.model; 5 library analyzer.task.model;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:developer'; 8 import 'dart:developer';
9 9
10 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; 10 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 /** 165 /**
166 * Indicates whether the task is capable of handling dependency cycles. A 166 * Indicates whether the task is capable of handling dependency cycles. A
167 * task that overrides this getter to return `true` must be prepared for the 167 * task that overrides this getter to return `true` must be prepared for the
168 * possibility that it will be invoked with a non-`null` value of 168 * possibility that it will be invoked with a non-`null` value of
169 * [dependencyCycle], and with not all of its inputs computed. 169 * [dependencyCycle], and with not all of its inputs computed.
170 */ 170 */
171 bool get handlesDependencyCycles => false; 171 bool get handlesDependencyCycles => false;
172 172
173 /** 173 /**
174 * Return the value of the input with the given [name], or `null` if the input
175 * value is not defined.
176 */
177 Object getOptionalInput(String name) {
178 if (inputs == null || !inputs.containsKey(name)) {
179 return null;
180 }
181 return inputs[name];
182 }
183
184 /**
174 * Return the value of the input with the given [name]. Throw an exception if 185 * Return the value of the input with the given [name]. Throw an exception if
175 * the input value is not defined. 186 * the input value is not defined.
176 */ 187 */
177 Object getRequiredInput(String name) { 188 Object getRequiredInput(String name) {
178 if (inputs == null || !inputs.containsKey(name)) { 189 if (inputs == null || !inputs.containsKey(name)) {
179 throw new AnalysisException("Could not $description: missing $name"); 190 throw new AnalysisException("Could not $description: missing $name");
180 } 191 }
181 return inputs[name]; 192 return inputs[name];
182 } 193 }
183 194
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 /** 764 /**
754 * A work should be done, but without any special urgency. 765 * A work should be done, but without any special urgency.
755 */ 766 */
756 NORMAL, 767 NORMAL,
757 768
758 /** 769 /**
759 * Nothing to do. 770 * Nothing to do.
760 */ 771 */
761 NONE 772 NONE
762 } 773 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698