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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 78223004: Diagnose missing @MirrorsUsed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r30796 Created 7 years 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/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/warnings.dart b/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
index 1fda53e6b93618204a20d8fa6132234175f09603..fed0a5e1434673a559703e39120c3881c53a246a 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -1079,11 +1079,18 @@ main() => A.A = 1;
"a class.");
static const MessageKind STATIC_FUNCTION_BLOAT = const MessageKind(
- "Hint: Using '#{class}.#{name}' may result in larger output.");
+ "Hint: Using '#{class}.#{name}' may lead to unnecessarily large generated"
+ " code.",
sigurdm 2013/12/03 08:09:52 It seems the tradition is to put the space on the
ahe 2013/12/03 15:39:07 Done.
+ howToFix:
+ "Try adding '@MirrorsUsed(...)' as described at"
+ " https://goo.gl/Akrrog.");
sigurdm 2013/12/03 08:09:52 The page referred to starts off a bit cryptic. I c
ahe 2013/12/03 15:39:07 Done, except for the "non-normative" part. Not sur
- static const MessageKind NON_CONST_BLOAT = const MessageKind('''
-Hint: Using "new #{name}' may result in larger output.
-Use 'const #{name}' if possible.''');
+ static const MessageKind NON_CONST_BLOAT = const MessageKind(
+ "Hint:Using 'new #{name}' may lead to unnecessarily large generated"
Kathy Walrath 2013/12/02 16:28:34 Add a space after "Hint:"
ahe 2013/12/03 15:39:07 Done.
+ " code.",
+ howToFix:
+ "Try using 'const #{name}' or adding '@MirrorsUsed(...)' as described"
+ " at https://goo.gl/Akrrog.");
static const MessageKind STRING_EXPECTED = const MessageKind(
"Error: Expected a 'String', but got an instance of '#{type}'.");
@@ -1331,6 +1338,13 @@ main() {}
static const MessageKind MIRROR_IMPORT = const MessageKind(
"Info: Import of 'dart:mirrors'.");
+ static const MessageKind MIRROR_IMPORT_NO_USAGE = const MessageKind(
+ "Info: This import is not annotated with @MirrorsUsed, which may lead to"
+ " unnecessarily large generated code.",
+ howToFix:
+ "Try adding '@MirrorsUsed(...)' as described at"
+ " https://goo.gl/Akrrog.");
+
static const MessageKind WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT =
const MessageKind(
"Error: Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant.");
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698