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

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

Issue 206193002: Remove cancel and make crash exit with code 253. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 9 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
Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index 5bcc8feb4fa0c63ad43fe787a02630ac08fd9964..54c3488e817eb5bd256ca54a649a202b8e169306 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -900,9 +900,8 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
currentContainer = oldContainer;
break;
default:
- compiler.internalError(
- 'Unexpected loop kind: ${info.kind}',
- instruction: condition.conditionExpression);
+ compiler.internalError(condition.conditionExpression,
+ 'Unexpected loop kind: ${info.kind}.');
}
attachLocationRange(loop, info.sourcePosition, info.endSourcePosition);
js.Statement result = loop;
@@ -1280,12 +1279,10 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// is responsible for visiting the successor.
if (dominated.isEmpty) return;
if (dominated.length > 2) {
- compiler.internalError('dominated.length = ${dominated.length}',
- instruction: node);
+ compiler.internalError(node, 'dominated.length = ${dominated.length}');
}
if (dominated.length == 2 && block != currentGraph.entry) {
- compiler.internalError('node.block != currentGraph.entry',
- instruction: node);
+ compiler.internalError(node, 'node.block != currentGraph.entry');
}
assert(dominated[0] == block.successors[0]);
visitBasicBlock(dominated[0]);
@@ -1369,7 +1366,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].
- compiler.internalError('visitTry should not be called', instruction: node);
+ compiler.internalError(node, 'visitTry should not be called.');
}
bool tryControlFlowOperation(HIf node) {
@@ -1699,8 +1696,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
List<HInstruction> inputs = node.inputs;
if (node.isJsStatement()) {
if (!inputs.isEmpty) {
- compiler.internalError("foreign statement with inputs",
- instruction: node);
+ compiler.internalError(node, "Foreign statement with inputs.");
}
pushStatement(node.codeAst, node);
} else {
@@ -2500,7 +2496,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
new js.Binary('||', objectTest, notIndexingTest);
test = new js.Binary('&&', stringTest, notObjectOrIndexingTest);
} else {
- compiler.internalError('Unexpected check', instruction: input);
+ compiler.internalError(input, 'Unexpected check.');
}
return test;
}

Powered by Google App Engine
This is Rietveld 408576698