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

Unified Diff: pkg/compiler/lib/src/ssa/codegen.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 289acddf851867dc33aedc5d9461a7be0d2dbb16..c86a48a609b3495f72c44f01302ce4740a1b834f 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -1083,7 +1083,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
currentContainer = oldContainer;
break;
default:
- throw new SpannableAssertionFailure(condition.conditionExpression,
+ failedAt(condition.conditionExpression,
'Unexpected loop kind: ${info.kind}.');
}
js.Statement result = loop;
@@ -1497,12 +1497,10 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// is responsible for visiting the successor.
if (dominated.isEmpty) return;
if (dominated.length > 2) {
- throw new SpannableAssertionFailure(
- node, 'dominated.length = ${dominated.length}');
+ failedAt(node, 'dominated.length = ${dominated.length}');
}
if (dominated.length == 2 && block != currentGraph.entry) {
- throw new SpannableAssertionFailure(
- node, 'node.block != currentGraph.entry');
+ failedAt(node, 'node.block != currentGraph.entry');
}
assert(dominated[0] == block.successors[0]);
continueSubGraph(dominated.first);
@@ -1590,7 +1588,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
visitTry(HTry node) {
// We should never get here. Try/catch/finally is always handled using block
// information in [visitTryInfo].
- throw new SpannableAssertionFailure(node, 'visitTry should not be called.');
+ failedAt(node, 'visitTry should not be called.');
}
bool tryControlFlowOperation(HIf node) {
@@ -2897,8 +2895,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
checkString(input, '!==', input.sourceInformation);
return pop();
}
- throw new SpannableAssertionFailure(
- input, 'Unexpected check: $checkedType.');
+ throw failedAt(input, 'Unexpected check: $checkedType.');
}
void visitTypeConversion(HTypeConversion node) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698