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

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

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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/ssa.dart ('k') | pkg/compiler/lib/src/string_validator.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * The [LiveRange] class covers a range where an instruction is live. 8 * The [LiveRange] class covers a range where an instruction is live.
9 */ 9 */
10 class LiveRange { 10 class LiveRange {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 /** 202 /**
203 * The live intervals of instructions. 203 * The live intervals of instructions.
204 */ 204 */
205 final Map<HInstruction, LiveInterval> liveIntervals; 205 final Map<HInstruction, LiveInterval> liveIntervals;
206 206
207 SsaLiveIntervalBuilder( 207 SsaLiveIntervalBuilder(
208 this.compiler, this.generateAtUseSite, this.controlFlowOperators) 208 this.compiler, this.generateAtUseSite, this.controlFlowOperators)
209 : liveInstructions = new Map<HBasicBlock, LiveEnvironment>(), 209 : liveInstructions = new Map<HBasicBlock, LiveEnvironment>(),
210 liveIntervals = new Map<HInstruction, LiveInterval>(); 210 liveIntervals = new Map<HInstruction, LiveInterval>();
211 211
212 DiagnosticReporter get reporter => compiler.reporter;
213
212 void visitGraph(HGraph graph) { 214 void visitGraph(HGraph graph) {
213 visitPostDominatorTree(graph); 215 visitPostDominatorTree(graph);
214 if (!liveInstructions[graph.entry].isEmpty) { 216 if (!liveInstructions[graph.entry].isEmpty) {
215 compiler.internalError(CURRENT_ELEMENT_SPANNABLE, 'LiveIntervalBuilder.'); 217 reporter.internalError(CURRENT_ELEMENT_SPANNABLE, 'LiveIntervalBuilder.');
216 } 218 }
217 } 219 }
218 220
219 void markInputsAsLiveInEnvironment(HInstruction instruction, 221 void markInputsAsLiveInEnvironment(HInstruction instruction,
220 LiveEnvironment environment) { 222 LiveEnvironment environment) {
221 for (int i = 0, len = instruction.inputs.length; i < len; i++) { 223 for (int i = 0, len = instruction.inputs.length; i < len; i++) {
222 markAsLiveInEnvironment(instruction.inputs[i], environment); 224 markAsLiveInEnvironment(instruction.inputs[i], environment);
223 } 225 }
224 } 226 }
225 227
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 if (!needsName(input)) { 709 if (!needsName(input)) {
708 names.addAssignment(predecessor, input, phi); 710 names.addAssignment(predecessor, input, phi);
709 } else { 711 } else {
710 names.addCopy(predecessor, input, phi); 712 names.addCopy(predecessor, input, phi);
711 } 713 }
712 } 714 }
713 715
714 namer.allocateName(phi); 716 namer.allocateName(phi);
715 } 717 }
716 } 718 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa.dart ('k') | pkg/compiler/lib/src/string_validator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698