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

Unified Diff: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java

Issue 9865025: Revert "Removes dartc reliance on its own libraries, now can be targeted at any implementation's li… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
index e21497a92f74f4c2826526b727848f4742d07a48..20a0872ef41d5b2e371a63b3fd735f5a2bab8c0d 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -17,9 +17,6 @@ import com.google.dart.compiler.DartCompilationError;
import com.google.dart.compiler.DartCompilationPhase;
import com.google.dart.compiler.DartCompilerContext;
import com.google.dart.compiler.ErrorCode;
-import com.google.dart.compiler.ErrorSeverity;
-import com.google.dart.compiler.Source;
-import com.google.dart.compiler.SystemLibraryManager;
import com.google.dart.compiler.ast.ASTVisitor;
import com.google.dart.compiler.ast.DartArrayAccess;
import com.google.dart.compiler.ast.DartArrayLiteral;
@@ -183,8 +180,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
private final InterfaceType functionType;
private final InterfaceType dynamicIteratorType;
private final boolean developerModeChecks;
- private final boolean suppressSdkWarnings;
-
+
/**
* Keeps track of the number of nested catches, used to detect re-throws
* outside of any catch block.
@@ -206,8 +202,6 @@ public class TypeAnalyzer implements DartCompilationPhase {
this.nullType = typeProvider.getNullType();
this.functionType = typeProvider.getFunctionType();
this.dynamicIteratorType = typeProvider.getIteratorType(dynamicType);
- this.suppressSdkWarnings = context.getCompilerConfiguration().getCompilerOptions()
- .suppressSdkWarnings();
}
@VisibleForTesting
@@ -224,14 +218,8 @@ public class TypeAnalyzer implements DartCompilationPhase {
return dynamicType;
}
- private void onError(HasSourceInfo node, ErrorCode errorCode, Object... arguments) {
- Source source = node.getSourceInfo().getSource();
- if (suppressSdkWarnings && errorCode.getErrorSeverity() == ErrorSeverity.WARNING) {
- if (source != null && SystemLibraryManager.isDartUri(source.getUri())) {
- return;
- }
- }
- context.onError(new DartCompilationError(node, errorCode, arguments));
+ private void onError(HasSourceInfo node, ErrorCode code, Object... arguments) {
+ context.onError(new DartCompilationError(node, code, arguments));
}
AssertionError internalError(HasSourceInfo node, String message, Object... arguments) {

Powered by Google App Engine
This is Rietveld 408576698