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

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: Created 7 years, 5 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 86f5db8a6694bea5537badd7cf79ad520b404139..22dd08d3acfa347dba3ee410fea39e92d871b79b 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -295,8 +295,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.
@@ -500,8 +498,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,
@@ -1192,24 +1188,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]) {

Powered by Google App Engine
This is Rietveld 408576698