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

Side by Side Diff: lib/devc.dart

Issue 1170813008: fixes detection of SDK libraries (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format Created 5 years, 6 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
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 /// Command line tool to run the checker on a Dart program. 5 /// Command line tool to run the checker on a Dart program.
6 library dev_compiler.devc; 6 library dev_compiler.devc;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (_entryNode is DartSourceNode) return _entryNode == node; 148 if (_entryNode is DartSourceNode) return _entryNode == node;
149 return (_entryNode as HtmlSourceNode).scripts.contains(node); 149 return (_entryNode as HtmlSourceNode).scripts.contains(node);
150 } 150 }
151 151
152 void _buildDartLibrary(DartSourceNode node) { 152 void _buildDartLibrary(DartSourceNode node) {
153 var source = node.source; 153 var source = node.source;
154 // TODO(sigmund): find out from analyzer team if there is a better way 154 // TODO(sigmund): find out from analyzer team if there is a better way
155 context.applyChanges(new ChangeSet()..changedSource(source)); 155 context.applyChanges(new ChangeSet()..changedSource(source));
156 var entryUnit = context.resolveCompilationUnit2(source, source); 156 var entryUnit = context.resolveCompilationUnit2(source, source);
157 var lib = entryUnit.element.enclosingElement; 157 var lib = entryUnit.element.enclosingElement;
158 if (!options.checkSdk && lib.isInSdk) return; 158 if (!options.checkSdk && lib.source.uri.scheme == 'dart') return;
vsm 2015/06/10 16:41:15 Move _isDartUri to utils and call that instead?
Jennifer Messerly 2015/06/10 16:46:04 funny, almost did that. The thing is, now it becom
159 var current = node.info; 159 var current = node.info;
160 if (current != null) { 160 if (current != null) {
161 assert(current.library == lib); 161 assert(current.library == lib);
162 } else { 162 } else {
163 node.info = current = new LibraryInfo(lib, _isEntry(node)); 163 node.info = current = new LibraryInfo(lib, _isEntry(node));
164 } 164 }
165 _reporter.enterLibrary(source.uri); 165 _reporter.enterLibrary(source.uri);
166 _libraries.add(current); 166 _libraries.add(current);
167 rules.currentLibraryInfo = current; 167 rules.currentLibraryInfo = current;
168 168
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Note: the cache-control header should be enough, but this doesn't hurt 319 // Note: the cache-control header should be enough, but this doesn't hurt
320 // and can help renew the policy after it expires. 320 // and can help renew the policy after it expires.
321 headers['ETag'] = hash; 321 headers['ETag'] = hash;
322 } 322 }
323 return response.change(headers: headers); 323 return response.change(headers: headers);
324 }; 324 };
325 } 325 }
326 326
327 final _log = new Logger('dev_compiler'); 327 final _log = new Logger('dev_compiler');
328 final _earlyErrorResult = new CheckerResults(const [], null, true); 328 final _earlyErrorResult = new CheckerResults(const [], null, true);
OLDNEW
« no previous file with comments | « no previous file | lib/runtime/dart/_isolate_helper.js » ('j') | lib/src/codegen/js_module_item_order.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698