Index: pkg/compiler/lib/src/kernel/env.dart |
diff --git a/pkg/compiler/lib/src/kernel/env.dart b/pkg/compiler/lib/src/kernel/env.dart |
index c0185a45434ac3be54037621559f494c51983413..fbd39acb672d7b58f21118fc58396ef031905768 100644 |
--- a/pkg/compiler/lib/src/kernel/env.dart |
+++ b/pkg/compiler/lib/src/kernel/env.dart |
@@ -157,22 +157,12 @@ class LibraryEnv { |
/// Environment for fast lookup of class members. |
class ClassEnv { |
final ir.Class cls; |
- bool isMixinApplication; |
final bool isUnnamedMixinApplication; |
- InterfaceType thisType; |
- InterfaceType rawType; |
- InterfaceType supertype; |
- InterfaceType mixedInType; |
- List<InterfaceType> interfaces; |
- OrderedTypeSet orderedTypeSet; |
- |
Map<String, ir.Member> _constructorMap; |
Map<String, ir.Member> _memberMap; |
Map<String, ir.Member> _setterMap; |
- Iterable<ConstantValue> _metadata; |
- |
ClassEnv(this.cls) |
// TODO(johnniwinther): Change this to use a property on [cls] when such |
// is added to kernel. |
@@ -313,10 +303,30 @@ class ClassEnv { |
_ensureMaps(); |
_constructorMap.values.forEach(f); |
} |
+} |
+ |
+class ClassData { |
+ final ir.Class cls; |
+ bool isMixinApplication; |
+ |
+ InterfaceType thisType; |
+ InterfaceType rawType; |
+ InterfaceType supertype; |
+ InterfaceType mixedInType; |
+ List<InterfaceType> interfaces; |
+ OrderedTypeSet orderedTypeSet; |
+ |
+ Iterable<ConstantValue> _metadata; |
+ |
+ ClassData(this.cls); |
Iterable<ConstantValue> getMetadata(KernelToElementMapBase elementMap) { |
return _metadata ??= elementMap.getMetadata(cls.annotations); |
} |
+ |
+ ClassData copy() { |
+ return new ClassData(cls); |
+ } |
} |
class MemberData { |
@@ -332,6 +342,10 @@ class MemberData { |
Iterable<ConstantValue> getMetadata(KernelToElementMapBase elementMap) { |
return _metadata ??= elementMap.getMetadata(node.annotations); |
} |
+ |
+ MemberData copy() { |
+ return new MemberData(node); |
+ } |
} |
class FunctionData extends MemberData { |
@@ -368,6 +382,11 @@ class FunctionData extends MemberData { |
..sort(namedOrdering) |
..forEach(handleParameter); |
} |
+ |
+ @override |
+ FunctionData copy() { |
+ return new FunctionData(node, functionNode); |
+ } |
} |
class ConstructorData extends FunctionData { |
@@ -391,6 +410,11 @@ class ConstructorData extends FunctionData { |
} |
return _constantConstructor; |
} |
+ |
+ @override |
+ ConstructorData copy() { |
+ return new ConstructorData(node, functionNode); |
+ } |
} |
class FieldData extends MemberData { |
@@ -414,4 +438,9 @@ class FieldData extends MemberData { |
} |
return _constant; |
} |
+ |
+ @override |
+ FieldData copy() { |
+ return new FieldData(node); |
+ } |
} |