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

Unified Diff: lib/src/compiler.dart

Issue 1749213006: use Source.isInSystemLibrary (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/codegen/js_module_item_order.dart ('k') | lib/src/server/server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler.dart
diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart
index f1142e1e17cd0d3cae791764f686b5363afada81..c4e66221377248e846dc75c71b91e9bfecb6b240 100644
--- a/lib/src/compiler.dart
+++ b/lib/src/compiler.dart
@@ -166,7 +166,7 @@ class BatchCompiler extends AbstractCompiler {
assert(_compilationRecord[library] == true ||
options.codegenOptions.forceCompile);
- // Process dependences one more time to propagate failure from cycles
+ // Process dependencies one more time to propagate failure from cycles
for (var import in library.imports) {
if (!_compilationRecord[import.importedLibrary]) {
_compilationRecord[library] = false;
@@ -197,7 +197,7 @@ class BatchCompiler extends AbstractCompiler {
// Optimistically mark a library valid until proven otherwise
_compilationRecord[library] = true;
- if (!options.checkSdk && library.source.uri.scheme == 'dart') {
+ if (!options.checkSdk && library.source.isInSystemLibrary) {
// We assume the Dart SDK is always valid
if (_jsGen != null) _copyDartRuntime();
return true;
@@ -448,7 +448,7 @@ abstract class AbstractCompiler {
AnalysisContext errorContext = context;
// TODO(jmesserly): should this be a fix somewhere in analyzer?
// otherwise we fail to find the parts.
- if (source.uri.scheme == 'dart') {
+ if (source.isInSystemLibrary) {
errorContext = context.sourceFactory.dartSdk.context;
}
List<AnalysisError> errors = errorContext.computeErrors(source);
« no previous file with comments | « lib/src/codegen/js_module_item_order.dart ('k') | lib/src/server/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698