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

Unified Diff: pkg/front_end/lib/src/incremental_kernel_generator_impl.dart

Issue 2926933002: Skip directly to the last library to set the entry point and check importUri (Closed)
Patch Set: fix Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
diff --git a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
index 39930073fdf8a50070e64340bbb26d9eb9c59f9c..5462ec569bf7984b9163b00e30388b79c793ca79 100644
--- a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
@@ -136,12 +136,14 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator {
// that imports a changed one, is affected.
// Set the main method.
- for (var library in program.libraries) {
- if (library.fileUri == _entryPoint.toString()) {
- program.mainMethod = library.procedures.firstWhere(
- (procedure) => procedure.name.name == 'main',
- orElse: () => null);
- break;
+ if (program.libraries.isNotEmpty) {
+ for (Library library in results.last.kernelLibraries) {
+ if (library.importUri == _entryPoint) {
+ program.mainMethod = library.procedures.firstWhere(
+ (procedure) => procedure.name.name == 'main',
+ orElse: () => null);
+ break;
+ }
}
}
« no previous file with comments | « pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698