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

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

Issue 21540002: Remove support for remaining deprecated features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 4 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/compiler.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index 1aa47b763707039c52ea28dda80d0bcf9c61a5b0..9dd9ab58701c4a58cc784c1425ab6979c6462d09 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -306,8 +306,6 @@ abstract class Compiler implements DiagnosticListener {
*/
final bool analyzeSignaturesOnly;
final bool enableNativeLiveTypeAnalysis;
- final bool rejectDeprecatedFeatures;
- final bool checkDeprecationInSdk;
/**
* If [:true:], comment tokens are collected in [commentMap] during scanning.
@@ -518,8 +516,6 @@ abstract class Compiler implements DiagnosticListener {
this.analyzeAllFlag: false,
bool analyzeOnly: false,
bool analyzeSignaturesOnly: false,
- this.rejectDeprecatedFeatures: false,
- this.checkDeprecationInSdk: false,
this.preserveComments: false,
this.verbose: false,
this.sourceMapUri: null,
@@ -1221,24 +1217,6 @@ abstract class Compiler implements DiagnosticListener {
reportDiagnostic(span, "$message", kind);
}
- /// Returns true if a diagnostic was emitted.
- bool onDeprecatedFeature(Spannable span, String feature) {
- if (currentElement == null)
- throw new SpannableAssertionFailure(span, feature);
- if (!checkDeprecationInSdk &&
- currentElement.getLibrary().isPlatformLibrary) {
- return false;
- }
- var kind = rejectDeprecatedFeatures
- ? api.Diagnostic.ERROR : api.Diagnostic.WARNING;
- var message = rejectDeprecatedFeatures
- ? MessageKind.DEPRECATED_FEATURE_ERROR.error({'featureName': feature})
- : MessageKind.DEPRECATED_FEATURE_WARNING.error(
- {'featureName': feature});
- reportMessage(spanFromSpannable(span), message, kind);
- return true;
- }
-
void reportDiagnostic(SourceSpan span, String message, api.Diagnostic kind);
SourceSpan spanFromTokens(Token begin, Token end, [Uri uri]) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/apiimpl.dart ('k') | sdk/lib/_internal/compiler/implementation/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698