OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library universe; | 5 library universe; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import '../cache_strategy.dart'; | 9 import '../cache_strategy.dart'; |
10 import '../common.dart'; | 10 import '../common.dart'; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 /// Returns `true` if [member] is invoked as a setter. | 133 /// Returns `true` if [member] is invoked as a setter. |
134 bool hasInvokedSetter(Element member, World world); | 134 bool hasInvokedSetter(Element member, World world); |
135 } | 135 } |
136 | 136 |
137 abstract class ResolutionWorldBuilder implements WorldBuilder { | 137 abstract class ResolutionWorldBuilder implements WorldBuilder { |
138 /// Set of (live) local functions (closures) whose signatures reference type | 138 /// Set of (live) local functions (closures) whose signatures reference type |
139 /// variables. | 139 /// variables. |
140 /// | 140 /// |
141 /// A live function is one whose enclosing member function has been enqueued. | 141 /// A live function is one whose enclosing member function has been enqueued. |
142 Set<Element> get closuresWithFreeTypeVariables; | 142 Iterable<Element> get closuresWithFreeTypeVariables; |
143 | 143 |
144 /// Set of (live) `call` methods whose signatures reference type variables. | 144 /// Set of (live) `call` methods whose signatures reference type variables. |
145 /// | 145 /// |
146 /// A live `call` method is one whose enclosing class has been instantiated. | 146 /// A live `call` method is one whose enclosing class has been instantiated. |
147 Iterable<Element> get callMethodsWithFreeTypeVariables; | 147 Iterable<Element> get callMethodsWithFreeTypeVariables; |
148 | 148 |
149 /// Set of all closures in the program. Used by the mirror tracking system | 149 /// Set of all closures in the program. Used by the mirror tracking system |
150 /// to find all live closure instances. | 150 /// to find all live closure instances. |
151 Iterable<LocalFunctionElement> get allClosures; | 151 Iterable<LocalFunctionElement> get allClosures; |
152 | 152 |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 | 925 |
926 void forgetElement(Element element, Compiler compiler) { | 926 void forgetElement(Element element, Compiler compiler) { |
927 _directlyInstantiatedClasses.remove(element); | 927 _directlyInstantiatedClasses.remove(element); |
928 if (element is ClassElement) { | 928 if (element is ClassElement) { |
929 assert(invariant(element, element.thisType.isRaw, | 929 assert(invariant(element, element.thisType.isRaw, |
930 message: 'Generic classes not supported (${element.thisType}).')); | 930 message: 'Generic classes not supported (${element.thisType}).')); |
931 _instantiatedTypes..remove(element.rawType)..remove(element.thisType); | 931 _instantiatedTypes..remove(element.rawType)..remove(element.thisType); |
932 } | 932 } |
933 } | 933 } |
934 } | 934 } |
OLD | NEW |