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

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

Issue 2931603003: Set main procedure for Program. (Closed)
Patch Set: 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 | « no previous file | pkg/front_end/test/incremental_kernel_generator_test.dart » ('j') | 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 d75a0fc7d25e13d750e189cd41b3b71caadb7d22..da49e55bfcf118a16a04dff9224505b51f1b8b0e 100644
--- a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
@@ -135,6 +135,16 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator {
// contents to compute signatures (not just API parts). So, every library
// that imports a changed one, is affected.
+ // Set the main procedure.
+ for (var library in program.libraries) {
+ if (library.fileUri == _entryPoint.toString()) {
+ program.mainMethod = library.procedures.firstWhere(
+ (procedure) => procedure.name.name == 'main',
+ orElse: () => null);
+ break;
+ }
+ }
+
return new DeltaProgram(program);
});
}
« no previous file with comments | « no previous file | pkg/front_end/test/incremental_kernel_generator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698