OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import '../compiler.dart'; |
| 6 import '../kernel/kernel.dart'; |
| 7 |
| 8 import 'backend.dart'; |
| 9 |
| 10 /// Visits the compiler main function and builds the kernel representation. |
| 11 /// |
| 12 /// This creates a mapping from kernel nodes to AST nodes to be used later. |
| 13 class KernelTask { |
| 14 final Compiler _compiler; |
| 15 final Kernel kernel; |
| 16 |
| 17 KernelTask(JavaScriptBackend backend) |
| 18 : this._compiler = backend.compiler, |
| 19 this.kernel = new Kernel(backend.compiler); |
| 20 |
| 21 void onQueueEmpty() { |
| 22 kernel.functionToIr(_compiler.mainFunction); |
| 23 kernel.processWorkQueue(); |
| 24 } |
| 25 } |
OLD | NEW |