OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'package:compiler/src/ssa/kernel_ast_adapter.dart'; | |
6 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
7 | 6 |
8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
9 import '../common/tasks.dart' show CompilerTask; | 8 import '../common/tasks.dart' show CompilerTask; |
10 import '../compiler.dart'; | 9 import '../compiler.dart'; |
11 import '../diagnostics/spannable.dart'; | 10 import '../diagnostics/spannable.dart'; |
12 import '../elements/elements.dart'; | 11 import '../elements/elements.dart'; |
13 import '../io/source_information.dart'; | 12 import '../io/source_information.dart'; |
14 import '../js_backend/backend.dart' show JavaScriptBackend; | 13 import '../js_backend/backend.dart' show JavaScriptBackend; |
15 import '../kernel/kernel.dart'; | 14 import '../kernel/kernel.dart'; |
16 import '../kernel/kernel_visitor.dart'; | 15 import '../kernel/kernel_visitor.dart'; |
17 import '../resolution/tree_elements.dart'; | 16 import '../resolution/tree_elements.dart'; |
18 import '../tree/dartstring.dart'; | 17 import '../tree/dartstring.dart'; |
| 18 |
19 import 'graph_builder.dart'; | 19 import 'graph_builder.dart'; |
| 20 import 'kernel_ast_adapter.dart'; |
20 import 'locals_handler.dart'; | 21 import 'locals_handler.dart'; |
21 import 'nodes.dart'; | 22 import 'nodes.dart'; |
22 | 23 |
23 class SsaKernelBuilderTask extends CompilerTask { | 24 class SsaKernelBuilderTask extends CompilerTask { |
24 final JavaScriptBackend backend; | 25 final JavaScriptBackend backend; |
25 final SourceInformationStrategy sourceInformationFactory; | 26 final SourceInformationStrategy sourceInformationFactory; |
26 | 27 |
27 String get name => 'SSA kernel builder'; | 28 String get name => 'SSA kernel builder'; |
28 | 29 |
29 SsaKernelBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory) | 30 SsaKernelBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory) |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 stack.add( | 189 stack.add( |
189 graph.addConstant(astAdapter.getConstantFor(symbolLiteral), compiler)); | 190 graph.addConstant(astAdapter.getConstantFor(symbolLiteral), compiler)); |
190 registry?.registerConstSymbol(symbolLiteral.value); | 191 registry?.registerConstSymbol(symbolLiteral.value); |
191 } | 192 } |
192 | 193 |
193 @override | 194 @override |
194 visitNullLiteral(ir.NullLiteral nullLiteral) { | 195 visitNullLiteral(ir.NullLiteral nullLiteral) { |
195 stack.add(graph.addConstantNull(compiler)); | 196 stack.add(graph.addConstantNull(compiler)); |
196 } | 197 } |
197 } | 198 } |
OLD | NEW |