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

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

Issue 2813603002: Less direct Compiler use in SSA (Closed)
Patch Set: Created 3 years, 8 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
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 4
5 import '../common/codegen.dart' show CodegenRegistry; 5 import '../common/codegen.dart' show CodegenRegistry;
6 import '../common_elements.dart';
6 import '../compiler.dart'; 7 import '../compiler.dart';
8 import '../diagnostics/diagnostic_listener.dart';
7 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
8 import '../elements/entities.dart' show Entity, Local; 10 import '../elements/entities.dart' show Entity, Local;
9 import '../elements/resolution_types.dart'; 11 import '../elements/resolution_types.dart';
10 import '../js_backend/js_backend.dart'; 12 import '../js_backend/js_backend.dart';
13 import '../options.dart';
11 import '../resolution/tree_elements.dart'; 14 import '../resolution/tree_elements.dart';
12 import '../types/types.dart'; 15 import '../types/types.dart';
13 import '../world.dart' show ClosedWorld; 16 import '../world.dart' show ClosedWorld;
14 import 'jump_handler.dart'; 17 import 'jump_handler.dart';
15 import 'locals_handler.dart'; 18 import 'locals_handler.dart';
16 import 'nodes.dart'; 19 import 'nodes.dart';
17 import 'type_builder.dart'; 20 import 'type_builder.dart';
18 21
19 /// Base class for objects that build up an SSA graph. 22 /// Base class for objects that build up an SSA graph.
20 /// 23 ///
(...skipping 17 matching lines...) Expand all
38 41
39 /// The JavaScript backend we are targeting in this compilation. 42 /// The JavaScript backend we are targeting in this compilation.
40 JavaScriptBackend get backend; 43 JavaScriptBackend get backend;
41 44
42 CodegenRegistry get registry; 45 CodegenRegistry get registry;
43 46
44 ClosedWorld get closedWorld; 47 ClosedWorld get closedWorld;
45 48
46 CommonMasks get commonMasks => closedWorld.commonMasks; 49 CommonMasks get commonMasks => closedWorld.commonMasks;
47 50
51 DiagnosticReporter get reporter => backend.reporter;
52
53 CompilerOptions get options => compiler.options;
Emily Fortuna 2017/04/10 19:34:02 this works, but why not just pass CompilerOptions
Johnni Winther 2017/04/11 07:13:31 This is the plan. I just take small steps.
54
55 CommonElements get commonElements => closedWorld.commonElements;
56
48 GlobalTypeInferenceResults get globalInferenceResults => 57 GlobalTypeInferenceResults get globalInferenceResults =>
49 compiler.globalInference.results; 58 compiler.globalInference.results;
50 59
51 /// Used to track the locals while building the graph. 60 /// Used to track the locals while building the graph.
52 LocalsHandler localsHandler; 61 LocalsHandler localsHandler;
53 62
54 /// A stack of instructions. 63 /// A stack of instructions.
55 /// 64 ///
56 /// We build the SSA graph by simulating a stack machine. 65 /// We build the SSA graph by simulating a stack machine.
57 List<HInstruction> stack = <HInstruction>[]; 66 List<HInstruction> stack = <HInstruction>[];
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 open(newBlock); 235 open(newBlock);
227 } 236 }
228 237
229 HInstruction callSetRuntimeTypeInfo( 238 HInstruction callSetRuntimeTypeInfo(
230 HInstruction typeInfo, HInstruction newObject); 239 HInstruction typeInfo, HInstruction newObject);
231 240
232 /// The element for which this SSA builder is being used. 241 /// The element for which this SSA builder is being used.
233 Element get targetElement; 242 Element get targetElement;
234 TypeBuilder get typeBuilder; 243 TypeBuilder get typeBuilder;
235 } 244 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/ssa/ssa_branch_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698