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

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

Issue 2982783003: Use failedAt in more places (Closed)
Patch Set: Created 3 years, 5 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_branch_builder.dart ('k') | pkg/compiler/lib/src/tree/nodes.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 import '../common.dart'; 5 import '../common.dart';
6 import '../js_backend/js_backend.dart'; 6 import '../js_backend/js_backend.dart';
7 import 'nodes.dart'; 7 import 'nodes.dart';
8 8
9 /** 9 /**
10 * The [LiveRange] class covers a range where an instruction is live. 10 * The [LiveRange] class covers a range where an instruction is live.
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 */ 207 */
208 final Map<HInstruction, LiveInterval> liveIntervals; 208 final Map<HInstruction, LiveInterval> liveIntervals;
209 209
210 SsaLiveIntervalBuilder(this.generateAtUseSite, this.controlFlowOperators) 210 SsaLiveIntervalBuilder(this.generateAtUseSite, this.controlFlowOperators)
211 : liveInstructions = new Map<HBasicBlock, LiveEnvironment>(), 211 : liveInstructions = new Map<HBasicBlock, LiveEnvironment>(),
212 liveIntervals = new Map<HInstruction, LiveInterval>(); 212 liveIntervals = new Map<HInstruction, LiveInterval>();
213 213
214 void visitGraph(HGraph graph) { 214 void visitGraph(HGraph graph) {
215 visitPostDominatorTree(graph); 215 visitPostDominatorTree(graph);
216 if (!liveInstructions[graph.entry].isEmpty) { 216 if (!liveInstructions[graph.entry].isEmpty) {
217 throw new SpannableAssertionFailure( 217 failedAt(CURRENT_ELEMENT_SPANNABLE, 'LiveIntervalBuilder.');
218 CURRENT_ELEMENT_SPANNABLE, 'LiveIntervalBuilder.');
219 } 218 }
220 } 219 }
221 220
222 void markInputsAsLiveInEnvironment( 221 void markInputsAsLiveInEnvironment(
223 HInstruction instruction, LiveEnvironment environment) { 222 HInstruction instruction, LiveEnvironment environment) {
224 for (int i = 0, len = instruction.inputs.length; i < len; i++) { 223 for (int i = 0, len = instruction.inputs.length; i < len; i++) {
225 markAsLiveInEnvironment(instruction.inputs[i], environment); 224 markAsLiveInEnvironment(instruction.inputs[i], environment);
226 } 225 }
227 } 226 }
228 227
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 if (!needsName(input)) { 704 if (!needsName(input)) {
706 names.addAssignment(predecessor, input, phi); 705 names.addAssignment(predecessor, input, phi);
707 } else { 706 } else {
708 names.addCopy(predecessor, input, phi); 707 names.addCopy(predecessor, input, phi);
709 } 708 }
710 } 709 }
711 710
712 namer.allocateName(phi); 711 namer.allocateName(phi);
713 } 712 }
714 } 713 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa_branch_builder.dart ('k') | pkg/compiler/lib/src/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698