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

Side by Side Diff: pkg/compiler/lib/src/ssa/rasta_ssa_builder_task.dart

Issue 2938193003: Revert "Towards compiling Hello World!" and "Compile and run Hello World!" (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import '../elements/elements.dart'; 4 import '../elements/elements.dart';
5 import '../io/source_information.dart'; 5 import '../io/source_information.dart';
6 import '../js_backend/backend.dart' show JavaScriptBackend; 6 import '../js_backend/backend.dart' show JavaScriptBackend;
7 import '../js_backend/element_strategy.dart' show ElementCodegenWorkItem; 7 import '../js_backend/element_strategy.dart' show ElementCodegenWorkItem;
8 import '../kernel/kernel.dart'; 8 import '../kernel/kernel.dart';
9 import '../world.dart'; 9 import '../world.dart';
10 import 'builder.dart'; 10 import 'builder.dart';
11 import 'kernel_ast_adapter.dart'; 11 import 'kernel_ast_adapter.dart';
12 import 'nodes.dart'; 12 import 'nodes.dart';
13 import 'builder_kernel.dart'; 13 import 'builder_kernel.dart';
14 14
15 /// Task for building SSA kernel IR generated from rasta. 15 /// Task for building SSA kernel IR generated from rasta.
16 class RastaSsaBuilderTask extends SsaAstBuilderBase { 16 class RastaSsaBuilderTask extends SsaAstBuilderBase {
17 final SourceInformationStrategy sourceInformationFactory; 17 final SourceInformationStrategy sourceInformationFactory;
18 18
19 String get name => 'SSA kernel builder'; 19 String get name => 'SSA kernel builder';
20 20
21 RastaSsaBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory) 21 RastaSsaBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory)
22 : super(backend); 22 : super(backend);
23 23
24 HGraph build(ElementCodegenWorkItem work, ClosedWorld closedWorld) { 24 HGraph build(ElementCodegenWorkItem work, ClosedWorld closedWorld) {
25 return measure(() { 25 return measure(() {
26 if (handleConstantField(work.element, work.registry, closedWorld)) { 26 if (handleConstantField(work, closedWorld)) {
27 // No code is generated for `work.element`. 27 // No code is generated for `work.element`.
28 return null; 28 return null;
29 } 29 }
30 MemberElement element = work.element.implementation; 30 MemberElement element = work.element.implementation;
31 ResolvedAst resolvedAst = work.resolvedAst; 31 ResolvedAst resolvedAst = work.resolvedAst;
32 Kernel kernel = backend.kernelTask.kernel; 32 Kernel kernel = backend.kernelTask.kernel;
33 KernelAstAdapter astAdapter = new KernelAstAdapter(kernel, backend, 33 KernelAstAdapter astAdapter = new KernelAstAdapter(kernel, backend,
34 work.resolvedAst, kernel.nodeToAst, kernel.nodeToElement); 34 work.resolvedAst, kernel.nodeToAst, kernel.nodeToElement);
35 KernelAstTypeInferenceMap typeInferenceMap = 35 KernelAstTypeInferenceMap typeInferenceMap =
36 new KernelAstTypeInferenceMap(astAdapter); 36 new KernelAstTypeInferenceMap(astAdapter);
(...skipping 27 matching lines...) Expand all
64 name = "${element.name}"; 64 name = "${element.name}";
65 } 65 }
66 backend.tracer.traceCompilation(name); 66 backend.tracer.traceCompilation(name);
67 backend.tracer.traceGraph('builder', graph); 67 backend.tracer.traceGraph('builder', graph);
68 } 68 }
69 69
70 return graph; 70 return graph;
71 }); 71 });
72 } 72 }
73 } 73 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698