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

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

Issue 2442503004: make kerneltask an actual task (Closed)
Patch Set: 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/task.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
deleted file mode 100644
index 9f0c0d919b394264c839d094cd154d0c4f5358ff..0000000000000000000000000000000000000000
--- a/pkg/compiler/lib/src/js_backend/kernel_task.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// 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;
-
-import 'backend.dart';
-
-/// Visits the compiler main function and builds the kernel representation.
-///
-/// This creates a mapping from kernel nodes to AST nodes to be used later.
-class KernelTask {
- final Compiler _compiler;
- final Kernel kernel;
-
- KernelTask(JavaScriptBackend backend)
- : 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() {
- 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/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698