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

Unified Diff: dart/lib/compiler/implementation/ssa/codegen.dart

Issue 10389143: Add locations to diagnostics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove all references to unreachable() Created 8 years, 7 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 | « dart/lib/compiler/implementation/ssa/builder.dart ('k') | dart/lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/ssa/codegen.dart
diff --git a/dart/lib/compiler/implementation/ssa/codegen.dart b/dart/lib/compiler/implementation/ssa/codegen.dart
index d87c849be097553eae12e54424541444e8d40d7c..b37909533c0d5a08ae3f44214492299f960027d1 100644
--- a/dart/lib/compiler/implementation/ssa/codegen.dart
+++ b/dart/lib/compiler/implementation/ssa/codegen.dart
@@ -1311,9 +1311,13 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// If the successor is dominated by another block, then the other block
// is responsible for visiting the successor.
if (dominated.isEmpty()) return;
- if (dominated.length > 2) unreachable();
+ if (dominated.length > 2) {
+ compiler.internalError('dominated.length = ${dominated.length}',
+ instruction: node);
+ }
if (dominated.length == 2 && currentBlock !== currentGraph.entry) {
- unreachable();
+ compiler.internalError('currentBlock !== currentGraph.entry',
+ instruction: node);
}
assert(dominated[0] == currentBlock.successors[0]);
visitBasicBlock(dominated[0]);
@@ -1388,7 +1392,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// We should never get here. Try/catch/finally is always handled using block
// information in [visitTryInfo], or not at all, in the case of the bailout
// generator.
- unreachable();
+ compiler.internalError('visitTry should not be called', instruction: node);
}
visitIf(HIf node) {
@@ -2316,7 +2320,7 @@ class SsaOptimizedCodeGenerator extends SsaCodeGenerator {
buffer.add(')) ');
bailout(node, 'Not a string or array');
} else {
- unreachable();
+ compiler.internalError('Unexpected type guard', instruction: input);
}
buffer.add(';\n');
}
« no previous file with comments | « dart/lib/compiler/implementation/ssa/builder.dart ('k') | dart/lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698