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

Unified Diff: lib/src/info.dart

Issue 1174643003: expose strong checker API, for use by analyzer_cli (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 | « lib/src/dependency_graph.dart ('k') | lib/src/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/info.dart
diff --git a/lib/src/info.dart b/lib/src/info.dart
index 11dbf598f88a4bdf7691c6f270ffceb87f23a540..e250135429a970cefbe5d8821a2136bcc37c5f37 100644
--- a/lib/src/info.dart
+++ b/lib/src/info.dart
@@ -6,8 +6,6 @@
/// emitters to generate code.
library dev_compiler.src.info;
-import 'dart:mirrors';
-
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/element.dart';
import 'package:analyzer/src/generated/error.dart' as analyzer;
@@ -410,7 +408,7 @@ abstract class InvalidOverride extends StaticError {
/// Type (class or interface) that provides the base declaration.
final InterfaceType base;
- /// Actual type of the overriden member.
+ /// Actual type of the overridden member.
final DartType subType;
/// Actual type of the base member.
@@ -514,24 +512,6 @@ class InvalidSuperInvocation extends StaticError {
"(see http://goo.gl/q1T4BB): $node";
}
-/// Automatically infer list of types by scanning this library using mirrors.
-final List<Type> infoTypes = () {
- var allTypes = new Set();
- var baseTypes = new Set();
- var infoMirror = reflectClass(StaticInfo);
- var libMirror = infoMirror.owner as LibraryMirror;
- var declarations = libMirror.declarations.values;
- for (ClassMirror cls in declarations.where((d) => d is ClassMirror)) {
- if (cls.isSubtypeOf(infoMirror)) {
- allTypes.add(cls);
- baseTypes.add(cls.superclass);
- }
- }
- allTypes.removeAll(baseTypes);
- return new List<Type>.from(allTypes.map((mirror) => mirror.reflectedType))
- ..sort((t1, t2) => '$t1'.compareTo('$t2'));
-}();
-
class AnalyzerError extends Message {
factory AnalyzerError.from(analyzer.AnalysisError error) {
var severity = error.errorCode.type.severity;
« no previous file with comments | « lib/src/dependency_graph.dart ('k') | lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698