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

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

Issue 2603263002: Prefix resolution_types with Resolution. (Closed)
Patch Set: Rebased Created 3 years, 11 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 | « pkg/compiler/lib/src/resolution/enum_creator.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/member_impl.dart
diff --git a/pkg/compiler/lib/src/resolution/member_impl.dart b/pkg/compiler/lib/src/resolution/member_impl.dart
index 8c4eb1c8c7ae1e706c398766eabd49d5b0a54c36..70f2a7aa36f095dcdd9af2db2d38fe9c2f6cbfba 100644
--- a/pkg/compiler/lib/src/resolution/member_impl.dart
+++ b/pkg/compiler/lib/src/resolution/member_impl.dart
@@ -7,9 +7,9 @@ part of dart2js.resolution.compute_members;
class DeclaredMember implements Member {
final Name name;
final Element element;
- final InterfaceType declarer;
- final DartType type;
- final FunctionType functionType;
+ final ResolutionInterfaceType declarer;
+ final ResolutionDartType type;
+ final ResolutionFunctionType functionType;
DeclaredMember(
this.name, this.element, this.declarer, this.type, this.functionType);
@@ -36,7 +36,7 @@ class DeclaredMember implements Member {
/// class C<U> extends B<U> {}
/// The member `T m()` is declared in `A<T>` and inherited from `A<S>` into
/// `B` as `S m()`, and further from `B<U>` into `C` as `U m()`.
- DeclaredMember inheritFrom(InterfaceType instance) {
+ DeclaredMember inheritFrom(ResolutionInterfaceType instance) {
// If the member is declared in a non-generic class its type cannot change
// as a result of inheritance.
if (!declarer.isGeneric) return this;
@@ -44,7 +44,7 @@ class DeclaredMember implements Member {
return _newInheritedMember(instance);
}
- InheritedMember _newInheritedMember(InterfaceType instance) {
+ InheritedMember _newInheritedMember(ResolutionInterfaceType instance) {
return new InheritedMember(this, instance);
}
@@ -63,7 +63,7 @@ class DeclaredMember implements Member {
return sb.toString();
}
- void printOn(StringBuffer sb, DartType type) {
+ void printOn(StringBuffer sb, ResolutionDartType type) {
if (isStatic) {
sb.write('static ');
}
@@ -89,13 +89,18 @@ class DeclaredMember implements Member {
class DeclaredAbstractMember extends DeclaredMember {
final DeclaredMember implementation;
- DeclaredAbstractMember(Name name, Element element, InterfaceType declarer,
- DartType type, FunctionType functionType, this.implementation)
+ DeclaredAbstractMember(
+ Name name,
+ Element element,
+ ResolutionInterfaceType declarer,
+ ResolutionDartType type,
+ ResolutionFunctionType functionType,
+ this.implementation)
: super(name, element, declarer, type, functionType);
bool get isAbstract => true;
- InheritedMember _newInheritedMember(InterfaceType instance) {
+ InheritedMember _newInheritedMember(ResolutionInterfaceType instance) {
return new InheritedAbstractMember(this, instance,
implementation != null ? implementation.inheritFrom(instance) : null);
}
@@ -103,10 +108,10 @@ class DeclaredAbstractMember extends DeclaredMember {
class InheritedMember implements DeclaredMember {
final DeclaredMember declaration;
- final InterfaceType instance;
+ final ResolutionInterfaceType instance;
InheritedMember(
- DeclaredMember this.declaration, InterfaceType this.instance) {
+ DeclaredMember this.declaration, ResolutionInterfaceType this.instance) {
assert(instance.isGeneric);
assert(!declaration.isStatic);
}
@@ -115,7 +120,7 @@ class InheritedMember implements DeclaredMember {
Name get name => declaration.name;
- InterfaceType get declarer => instance;
+ ResolutionInterfaceType get declarer => instance;
bool get isStatic => false;
@@ -131,13 +136,13 @@ class InheritedMember implements DeclaredMember {
Member get implementation => this;
- DartType get type => declaration.type.substByContext(instance);
+ ResolutionDartType get type => declaration.type.substByContext(instance);
- FunctionType get functionType {
+ ResolutionFunctionType get functionType {
return declaration.functionType.substByContext(instance);
}
- DeclaredMember inheritFrom(InterfaceType newInstance) {
+ DeclaredMember inheritFrom(ResolutionInterfaceType newInstance) {
assert(invariant(declaration.element, () {
// Assert that if [instance] contains type variables, then these are
// defined in the declaration of [newInstance] and will therefore be
@@ -152,7 +157,7 @@ class InheritedMember implements DeclaredMember {
return _newInheritedMember(newInstance);
}
- InheritedMember _newInheritedMember(InterfaceType newInstance) {
+ InheritedMember _newInheritedMember(ResolutionInterfaceType newInstance) {
return new InheritedMember(
declaration, instance.substByContext(newInstance));
}
@@ -166,7 +171,7 @@ class InheritedMember implements DeclaredMember {
return declaration == other.declaration && instance == other.instance;
}
- void printOn(StringBuffer sb, DartType type) {
+ void printOn(StringBuffer sb, ResolutionDartType type) {
declaration.printOn(sb, type);
sb.write(' inherited from $instance');
}
@@ -181,13 +186,13 @@ class InheritedMember implements DeclaredMember {
class InheritedAbstractMember extends InheritedMember {
final DeclaredMember implementation;
- InheritedAbstractMember(
- DeclaredMember declaration, InterfaceType instance, this.implementation)
+ InheritedAbstractMember(DeclaredMember declaration,
+ ResolutionInterfaceType instance, this.implementation)
: super(declaration, instance);
bool get isAbstract => true;
- InheritedMember _newInheritedMember(InterfaceType newInstance) {
+ InheritedMember _newInheritedMember(ResolutionInterfaceType newInstance) {
return new InheritedAbstractMember(
declaration,
instance.substByContext(newInstance),
@@ -210,8 +215,8 @@ abstract class AbstractSyntheticMember implements MemberSignature {
}
class SyntheticMember extends AbstractSyntheticMember {
- final DartType type;
- final FunctionType functionType;
+ final ResolutionDartType type;
+ final ResolutionFunctionType functionType;
SyntheticMember(Setlet<Member> inheritedMembers, this.type, this.functionType)
: super(inheritedMembers);
@@ -231,9 +236,9 @@ class SyntheticMember extends AbstractSyntheticMember {
class ErroneousMember extends AbstractSyntheticMember {
ErroneousMember(Setlet<Member> inheritedMembers) : super(inheritedMembers);
- DartType get type => functionType;
+ ResolutionDartType get type => functionType;
- FunctionType get functionType {
+ ResolutionFunctionType get functionType {
throw new UnsupportedError('Erroneous members have no type.');
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/enum_creator.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698