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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/source_loader.dart

Issue 2676823002: Add option --compile-sdk to fasta compile and run. (Closed)
Patch Set: Address comments. Created 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.source_loader; 5 library fasta.source_loader;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:io' show 10 import 'dart:io' show
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 CoreTypes coreTypes; 72 CoreTypes coreTypes;
73 73
74 // Used when building analyzer ASTs. 74 // Used when building analyzer ASTs.
75 ElementStore elementStore; 75 ElementStore elementStore;
76 76
77 SourceLoader(TargetImplementation target) 77 SourceLoader(TargetImplementation target)
78 : super(target); 78 : super(target);
79 79
80 Future<Token> tokenize(SourceLibraryBuilder library, 80 Future<Token> tokenize(SourceLibraryBuilder library,
81 {bool suppressLexicalErrors: false}) async { 81 {bool suppressLexicalErrors: false}) async {
82 Uri uri = library.uri; 82 Uri uri = library.fileUri ?? library.uri;
83 if (uri.scheme != "file") { 83 if (uri.scheme != "file") {
84 uri = target.translateUri(uri); 84 uri = target.translateUri(uri);
85 if (uri == null) { 85 if (uri == null) {
86 print("Skipping ${library.uri}"); 86 print("Skipping ${library.uri}");
87 return null; 87 return null;
88 } 88 }
89 library.fileUri = uri; 89 library.fileUri = uri;
90 } 90 }
91 try { 91 try {
92 List<int> bytes = await readBytesFromFile(uri); 92 List<int> bytes = await readBytesFromFile(uri);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 ticker.logMs("Built analyzer element model."); 351 ticker.logMs("Built analyzer element model.");
352 } 352 }
353 353
354 void computeHierarchy(Program program) { 354 void computeHierarchy(Program program) {
355 hierarchy = new ClassHierarchy(program); 355 hierarchy = new ClassHierarchy(program);
356 ticker.logMs("Computed class hierarchy"); 356 ticker.logMs("Computed class hierarchy");
357 coreTypes = new CoreTypes(program); 357 coreTypes = new CoreTypes(program);
358 ticker.logMs("Computed core types"); 358 ticker.logMs("Computed core types");
359 } 359 }
360 } 360 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/source_library_builder.dart ('k') | pkg/front_end/lib/src/fasta/translate_uri.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698