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 0c59fa491a58757ff909e15d4c13822072505fa1..ea32143d7f65474f6594d50ac66a7e5266c34020 100644 |
--- a/pkg/compiler/lib/src/js_backend/kernel_task.dart |
+++ b/pkg/compiler/lib/src/js_backend/kernel_task.dart |
@@ -4,6 +4,7 @@ |
import '../compiler.dart'; |
import '../kernel/kernel.dart'; |
+import 'package:kernel/ast.dart' as ir; |
import 'backend.dart'; |
@@ -18,10 +19,14 @@ class KernelTask { |
: this._compiler = backend.compiler, |
this.kernel = new Kernel(backend.compiler); |
+ ir.Program program; |
+ |
/// Builds the kernel IR for the main function. |
/// |
/// May enqueue more elements to the resolution queue. |
void buildKernelIr() { |
- kernel.libraryDependencies(_compiler.options.entryPoint); |
+ program = |
+ new ir.Program(kernel.libraryDependencies(_compiler.options.entryPoint)) |
+ ..mainMethod = kernel.functionToIr(_compiler.mainFunction); |
} |
} |