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

Unified Diff: pkg/compiler/lib/src/resolution/constructors.dart

Issue 1438453002: Use Feature directly in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « pkg/compiler/lib/src/resolution/class_hierarchy.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/constructors.dart
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart
index f80bb806e9cc87ab4c8f1597afb584ac8af011af..722d39f4eb4fa730292041468ab383991fa14c13 100644
--- a/pkg/compiler/lib/src/resolution/constructors.dart
+++ b/pkg/compiler/lib/src/resolution/constructors.dart
@@ -5,6 +5,8 @@
library dart2js.resolution.constructors;
import '../common.dart';
+import '../common/resolution.dart' show
+ Feature;
import '../compiler.dart' show
Compiler;
import '../constants/constructors.dart' show
@@ -26,8 +28,6 @@ import '../util/util.dart' show
Link;
import '../universe/call_structure.dart' show
CallStructure;
-import '../universe/selector.dart' show
- Selector;
import '../universe/use.dart' show
StaticUse;
@@ -487,9 +487,9 @@ class ConstructorResolver extends CommonResolverVisitor<ConstructorResult> {
{bool isError: false,
bool missingConstructor: false}) {
if (missingConstructor) {
- registry.registerThrowNoSuchMethod();
+ registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
} else {
- registry.registerThrowRuntimeError();
+ registry.registerFeature(Feature.THROW_RUNTIME_ERROR);
}
if (isError || inConstContext) {
reporter.reportErrorMessage(
@@ -534,7 +534,7 @@ class ConstructorResolver extends CommonResolverVisitor<ConstructorResult> {
if (cls.isAbstract) {
reporter.reportWarningMessage(
diagnosticNode, MessageKind.ABSTRACT_CLASS_INSTANTIATION);
- registry.registerAbstractClassInstantiation();
+ registry.registerFeature(Feature.ABSTRACT_CLASS_INSTANTIATION);
return new ConstructorResult(
ConstructorResultKind.ABSTRACT, constructor, type);
} else {
@@ -697,7 +697,7 @@ class ConstructorResolver extends CommonResolverVisitor<ConstructorResult> {
error = new ErroneousConstructorElementX(
MessageKind.NOT_A_TYPE, {'node': node},
error.name, error);
- registry.registerThrowRuntimeError();
+ registry.registerFeature(Feature.THROW_RUNTIME_ERROR);
}
return new ConstructorResult(
ConstructorResultKind.INVALID_TYPE,
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_hierarchy.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698