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

Side by Side Diff: pkg/compiler/lib/src/backend_strategy.dart

Issue 2939163002: Modify backend strategy and how we access the closure converter. (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 | « no previous file | pkg/compiler/lib/src/closure.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 library dart2js.backend_strategy; 5 library dart2js.backend_strategy;
6 6
7 import 'closure.dart' show ClosureConversionTask;
8 import 'compiler.dart' show Compiler;
7 import 'enqueue.dart'; 9 import 'enqueue.dart';
8 import 'io/source_information.dart'; 10 import 'io/source_information.dart';
9 import 'js_backend/js_backend.dart'; 11 import 'js_backend/js_backend.dart';
10 import 'js_backend/native_data.dart'; 12 import 'js_backend/native_data.dart';
11 import 'js_emitter/sorter.dart'; 13 import 'js_emitter/sorter.dart';
12 import 'ssa/ssa.dart'; 14 import 'ssa/ssa.dart';
13 import 'universe/world_builder.dart'; 15 import 'universe/world_builder.dart';
14 import 'world.dart'; 16 import 'world.dart';
15 17
16 /// Strategy pattern that defines the element model used in type inference 18 /// Strategy pattern that defines the element model used in type inference
17 /// and code generation. 19 /// and code generation.
18 abstract class BackendStrategy { 20 abstract class BackendStrategy {
19 /// Create the [ClosedWorldRefiner] for [closedWorld]. 21 /// Create the [ClosedWorldRefiner] for [closedWorld].
20 ClosedWorldRefiner createClosedWorldRefiner(ClosedWorld closedWorld); 22 ClosedWorldRefiner createClosedWorldRefiner(ClosedWorld closedWorld);
21 23
22 /// Create closure classes for local functions. 24 /// Create the task that analyzes the code to see what closures need to be
23 void convertClosures(ClosedWorldRefiner closedWorldRefiner); 25 /// rewritten.
26 ClosureConversionTask createClosureConversionTask(Compiler compiler);
24 27
25 /// The [Sorter] used for sorting elements in the generated code. 28 /// The [Sorter] used for sorting elements in the generated code.
26 Sorter get sorter; 29 Sorter get sorter;
27 30
28 /// Creates the [CodegenWorldBuilder] used by the codegen enqueuer. 31 /// Creates the [CodegenWorldBuilder] used by the codegen enqueuer.
29 CodegenWorldBuilder createCodegenWorldBuilder( 32 CodegenWorldBuilder createCodegenWorldBuilder(
30 NativeBasicData nativeBasicData, 33 NativeBasicData nativeBasicData,
31 ClosedWorld closedWorld, 34 ClosedWorld closedWorld,
32 SelectorConstraintsStrategy selectorConstraintsStrategy); 35 SelectorConstraintsStrategy selectorConstraintsStrategy);
33 36
34 /// Creates the [WorkItemBuilder] used by the codegen enqueuer. 37 /// Creates the [WorkItemBuilder] used by the codegen enqueuer.
35 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld); 38 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld);
36 39
37 /// Creates the [SsaBuilderTask] used for the element model. 40 /// Creates the [SsaBuilderTask] used for the element model.
38 SsaBuilderTask createSsaBuilderTask(JavaScriptBackend backend, 41 SsaBuilderTask createSsaBuilderTask(JavaScriptBackend backend,
39 SourceInformationStrategy sourceInformationStrategy); 42 SourceInformationStrategy sourceInformationStrategy);
40 43
41 /// Returns the [SourceInformationStrategy] use for the element model. 44 /// Returns the [SourceInformationStrategy] use for the element model.
42 SourceInformationStrategy get sourceInformationStrategy; 45 SourceInformationStrategy get sourceInformationStrategy;
43 } 46 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698