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

Unified Diff: pkg/compiler/lib/src/js_backend/kernel_task.dart

Issue 2392863002: Roll kernel to latest (Closed)
Patch Set: Reinsert code Created 4 years, 2 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/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/kernel/fall_through_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/kernel_task.dart
diff --git a/pkg/compiler/lib/src/js_backend/kernel_task.dart b/pkg/compiler/lib/src/js_backend/kernel_task.dart
index ea32143d7f65474f6594d50ac66a7e5266c34020..46e48223faa99bb038eef144a39b52b542e6841a 100644
--- a/pkg/compiler/lib/src/js_backend/kernel_task.dart
+++ b/pkg/compiler/lib/src/js_backend/kernel_task.dart
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
import '../compiler.dart';
+import '../common/names.dart';
+import '../elements/elements.dart';
import '../kernel/kernel.dart';
import 'package:kernel/ast.dart' as ir;
@@ -25,8 +27,16 @@ class KernelTask {
///
/// May enqueue more elements to the resolution queue.
void buildKernelIr() {
- program =
- new ir.Program(kernel.libraryDependencies(_compiler.options.entryPoint))
- ..mainMethod = kernel.functionToIr(_compiler.mainFunction);
+ program = buildProgram(_compiler.mainApp);
+ }
+
+ /// Builds the kernel IR program for the main function exported from
+ /// [library].
+ ///
+ /// May enqueue more elements to the resolution queue.
+ ir.Program buildProgram(LibraryElement library) {
+ return new ir.Program(kernel.libraryDependencies(library.canonicalUri))
+ ..mainMethod = kernel.functionToIr(
+ library.findExported(Identifiers.main));
}
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/kernel/fall_through_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698