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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1363993004: Report info messages together with their error, warning, or hint. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 3 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/serialization/modelz.dart ('k') | pkg/compiler/lib/src/string_validator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index a853635da6671b0f4995458fbbcbc257becca448..0273c969ddf450dedc7195540157dd857cb3073a 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -4085,7 +4085,7 @@ class SsaBuilder extends ast.Visitor
addGenericSendArgumentsToList(link.tail.tail, inputs);
if (nativeBehavior.codeTemplate.positionalArgumentCount != inputs.length) {
- compiler.reportError(
+ compiler.reportErrorMessage(
node, MessageKind.GENERIC,
{'text':
'Mismatch between number of placeholders'
@@ -4155,7 +4155,7 @@ class SsaBuilder extends ast.Visitor
ast.Node argument;
switch (arguments.length) {
case 0:
- compiler.reportError(
+ compiler.reportErrorMessage(
node, MessageKind.GENERIC,
{'text': 'Error: Expected one argument to JS_GET_FLAG.'});
return;
@@ -4164,7 +4164,7 @@ class SsaBuilder extends ast.Visitor
break;
default:
for (int i = 1; i < arguments.length; i++) {
- compiler.reportError(
+ compiler.reportErrorMessage(
arguments[i], MessageKind.GENERIC,
{'text': 'Error: Extra argument to JS_GET_FLAG.'});
}
@@ -4172,7 +4172,7 @@ class SsaBuilder extends ast.Visitor
}
ast.LiteralString string = argument.asLiteralString();
if (string == null) {
- compiler.reportError(
+ compiler.reportErrorMessage(
argument, MessageKind.GENERIC,
{'text': 'Error: Expected a literal string.'});
}
@@ -4186,7 +4186,7 @@ class SsaBuilder extends ast.Visitor
value = compiler.useContentSecurityPolicy;
break;
default:
- compiler.reportError(
+ compiler.reportErrorMessage(
node, MessageKind.GENERIC,
{'text': 'Error: Unknown internal flag "$name".'});
}
@@ -4198,7 +4198,7 @@ class SsaBuilder extends ast.Visitor
ast.Node argument;
switch (arguments.length) {
case 0:
- compiler.reportError(
+ compiler.reportErrorMessage(
node, MessageKind.GENERIC,
{'text': 'Error: Expected one argument to JS_GET_NAME.'});
return;
@@ -4207,8 +4207,8 @@ class SsaBuilder extends ast.Visitor
break;
default:
for (int i = 1; i < arguments.length; i++) {
- compiler.reportError(
- arguments[i], MessageKind.GENERIC,
+ compiler.reportErrorMessage(
+ arguments[i], MessageKind.GENERIC,
{'text': 'Error: Extra argument to JS_GET_NAME.'});
}
return;
@@ -4217,7 +4217,7 @@ class SsaBuilder extends ast.Visitor
if (element == null ||
element is! FieldElement ||
element.enclosingClass != backend.jsGetNameEnum) {
- compiler.reportError(
+ compiler.reportErrorMessage(
argument, MessageKind.GENERIC,
{'text': 'Error: Expected a JsGetName enum value.'});
}
@@ -4233,7 +4233,7 @@ class SsaBuilder extends ast.Visitor
List<ast.Node> arguments = node.arguments.toList();
ast.Node argument;
if (arguments.length < 2) {
- compiler.reportError(
+ compiler.reportErrorMessage(
node, MessageKind.GENERIC,
{'text': 'Error: Expected at least two arguments to JS_BUILTIN.'});
}
@@ -4242,7 +4242,7 @@ class SsaBuilder extends ast.Visitor
if (builtinElement == null ||
(builtinElement is! FieldElement) ||
builtinElement.enclosingClass != backend.jsBuiltinEnum) {
- compiler.reportError(
+ compiler.reportErrorMessage(
argument, MessageKind.GENERIC,
{'text': 'Error: Expected a JsBuiltin enum value.'});
}
@@ -4276,7 +4276,7 @@ class SsaBuilder extends ast.Visitor
switch (arguments.length) {
case 0:
case 1:
- compiler.reportError(
+ compiler.reportErrorMessage(
node, MessageKind.GENERIC,
{'text': 'Error: Expected two arguments to JS_EMBEDDED_GLOBAL.'});
return;
@@ -4287,7 +4287,7 @@ class SsaBuilder extends ast.Visitor
break;
default:
for (int i = 2; i < arguments.length; i++) {
- compiler.reportError(
+ compiler.reportErrorMessage(
arguments[i], MessageKind.GENERIC,
{'text': 'Error: Extra argument to JS_EMBEDDED_GLOBAL.'});
}
@@ -4296,7 +4296,7 @@ class SsaBuilder extends ast.Visitor
visit(globalNameNode);
HInstruction globalNameHNode = pop();
if (!globalNameHNode.isConstantString()) {
- compiler.reportError(
+ compiler.reportErrorMessage(
arguments[1], MessageKind.GENERIC,
{'text': 'Error: Expected String as second argument '
'to JS_EMBEDDED_GLOBAL.'});
@@ -4333,7 +4333,8 @@ class SsaBuilder extends ast.Visitor
}
}
}
- compiler.reportError(node,
+ compiler.reportErrorMessage(
+ node,
MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT);
stack.add(graph.addConstantNull(compiler));
}
@@ -6890,8 +6891,10 @@ class SsaBuilder extends ast.Visitor
visitNodeList(ast.NodeList node) {
for (Link<ast.Node> link = node.nodes; !link.isEmpty; link = link.tail) {
if (isAborted()) {
- compiler.reportWarning(link.head,
- MessageKind.GENERIC, {'text': 'dead code'});
+ compiler.reportHintMessage(
+ link.head,
+ MessageKind.GENERIC,
+ {'text': 'dead code'});
} else {
visit(link.head);
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/modelz.dart ('k') | pkg/compiler/lib/src/string_validator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698