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

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

Issue 10389143: Add locations to diagnostics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
Index: dart/lib/compiler/implementation/ssa/nodes.dart
diff --git a/dart/lib/compiler/implementation/ssa/nodes.dart b/dart/lib/compiler/implementation/ssa/nodes.dart
index 5aa449f11ba4c4abf979068f77f63bd6d47ee1d7..e0f381ac6f5c26d761336a633323d2f05ea65a1e 100644
--- a/dart/lib/compiler/implementation/ssa/nodes.dart
+++ b/dart/lib/compiler/implementation/ssa/nodes.dart
@@ -177,8 +177,8 @@ class HGraph {
return addConstant(new DoubleConstant(d));
}
- HConstant addConstantString(DartString str) {
- return addConstant(new StringConstant(str));
+ HConstant addConstantString(DartString str, Node node) {
+ return addConstant(new StringConstant(str, node));
}
HConstant addConstantBool(bool value) {
@@ -2366,7 +2366,8 @@ class HLabeledBlockInformation implements HStatementInformation {
class LoopTypeVisitor extends AbstractVisitor {
const LoopTypeVisitor();
int visitNode(Node node) {
- unreachable();
+ // TODO(lrn): Need a compiler object here.
+ compiler.internalError('visitNode should not be called', node: node);
}
int visitWhile(While node) => HLoopBlockInformation.WHILE_LOOP;
int visitFor(For node) => HLoopBlockInformation.FOR_LOOP;
@@ -2447,7 +2448,11 @@ class HAndOrBlockInformation implements HExpressionInformation {
HBasicBlock get end() => right.end;
// We don't currently use HAndOrBlockInformation.
- HInstruction get conditionExpression() { unreachable(); }
+ HInstruction get conditionExpression() {
+ // TODO(lrn): Need a compiler object.
+ compiler.internalError('conditionExpression should not be called',
+ instruction: this);
+ }
bool accept(HExpressionInformationVisitor visitor) =>
visitor.visitAndOrInfo(this);
}

Powered by Google App Engine
This is Rietveld 408576698