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

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

Issue 1405563002: Move otherDependencies to globalDependencies. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/registry.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/tree_elements.dart
diff --git a/pkg/compiler/lib/src/resolution/tree_elements.dart b/pkg/compiler/lib/src/resolution/tree_elements.dart
index 65380fadb2c6e68082f44174eca945cef5910350..8d3071c8f4522a1092383661c79f3b6751f09ed6 100644
--- a/pkg/compiler/lib/src/resolution/tree_elements.dart
+++ b/pkg/compiler/lib/src/resolution/tree_elements.dart
@@ -24,10 +24,6 @@ abstract class TreeElements {
AnalyzableElement get analyzedElement;
Iterable<Node> get superUses;
- /// Iterables of the dependencies that this [TreeElement] records of
- /// [analyzedElement].
- Iterable<Element> get allElements;
-
/// The set of types that this TreeElement depends on.
/// This includes instantiated types, types in is-checks and as-expressions
/// and in checked mode the types of all type-annotations.
@@ -35,9 +31,6 @@ abstract class TreeElements {
void forEachConstantNode(f(Node n, ConstantExpression c));
- /// A set of additional dependencies. See [registerDependency] below.
- Iterable<Element> get otherDependencies;
-
Element operator[](Node node);
Map<Node, DartType> get typesCache;
@@ -87,10 +80,6 @@ abstract class TreeElements {
/// Returns the type that the type literal [node] refers to.
DartType getTypeLiteralType(Send node);
- /// Register additional dependencies required by [analyzedElement].
- /// For example, elements that are used by a backend.
- void registerDependency(Element element);
-
/// Register a dependency on [type].
void addRequiredType(DartType type);
@@ -130,13 +119,11 @@ class TreeElementMapping extends TreeElements {
Map<Node, DartType> _types;
Map<Node, DartType> typesCache = <Node, DartType>{};
Setlet<Node> _superUses;
- Setlet<Element> _otherDependencies;
Map<Node, ConstantExpression> _constants;
Map<VariableElement, List<Node>> _potentiallyMutated;
Map<Node, Map<VariableElement, List<Node>>> _potentiallyMutatedIn;
Map<VariableElement, List<Node>> _potentiallyMutatedInClosure;
Map<Node, Map<VariableElement, List<Node>>> _accessedByClosureIn;
- Setlet<Element> _elements;
Maplet<Send, SendStructure> _sendStructureMap;
Setlet<DartType> _requiredTypes;
bool containsTryStatement = false;
@@ -173,10 +160,6 @@ class TreeElementMapping extends TreeElements {
// getTreeElement(node) == null,
// message: '${getTreeElement(node)}; $element'));
- if (_elements == null) {
- _elements = new Setlet<Element>();
- }
- _elements.add(element);
setTreeElement(node, element);
}
@@ -313,18 +296,6 @@ class TreeElementMapping extends TreeElements {
return getType(node);
}
- void registerDependency(Element element) {
- if (element == null) return;
- if (_otherDependencies == null) {
- _otherDependencies = new Setlet<Element>();
- }
- _otherDependencies.add(element.implementation);
- }
-
- Iterable<Element> get otherDependencies {
- return _otherDependencies != null ? _otherDependencies : const <Element>[];
- }
-
List<Node> getPotentialMutations(VariableElement element) {
if (_potentiallyMutated == null) return const <Node>[];
List<Node> mutations = _potentiallyMutated[element];
@@ -398,10 +369,6 @@ class TreeElementMapping extends TreeElements {
String toString() => 'TreeElementMapping($analyzedElement)';
- Iterable<Element> get allElements {
- return _elements != null ? _elements : const <Element>[];
- }
-
void forEachConstantNode(f(Node n, ConstantExpression c)) {
if (_constants != null) {
_constants.forEach(f);
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698