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

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
Index: lib/src/info.dart
diff --git a/lib/src/info.dart b/lib/src/info.dart
index 11dbf598f88a4bdf7691c6f270ffceb87f23a540..d9e32311dee0cae10d798dfe4570529fe81d1e97 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;
@@ -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') | lib/src/options.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698