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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 class World { | 7 class World { |
8 final Compiler compiler; | 8 final Compiler compiler; |
9 final FunctionSet allFunctions; | 9 final FunctionSet allFunctions; |
10 final Set<Element> functionsCalledInLoop = new Set<Element>(); | 10 final Set<Element> functionsCalledInLoop = new Set<Element>(); |
11 final Map<Element, SideEffects> sideEffects = new Map<Element, SideEffects>(); | 11 final Map<Element, SideEffects> sideEffects = new Map<Element, SideEffects>(); |
12 | 12 |
| 13 final Set<TypedefElement> allTypedefs = new Set<TypedefElement>(); |
| 14 |
13 final Map<ClassElement, Set<MixinApplicationElement>> mixinUses = | 15 final Map<ClassElement, Set<MixinApplicationElement>> mixinUses = |
14 new Map<ClassElement, Set<MixinApplicationElement>>(); | 16 new Map<ClassElement, Set<MixinApplicationElement>>(); |
15 | 17 |
16 final Map<ClassElement, Set<ClassElement>> _typesImplementedBySubclasses = | 18 final Map<ClassElement, Set<ClassElement>> _typesImplementedBySubclasses = |
17 new Map<ClassElement, Set<ClassElement>>(); | 19 new Map<ClassElement, Set<ClassElement>>(); |
18 | 20 |
19 // We keep track of subtype and subclass relationships in four | 21 // We keep track of subtype and subclass relationships in four |
20 // distinct sets to make class hierarchy analysis faster. | 22 // distinct sets to make class hierarchy analysis faster. |
21 final Map<ClassElement, Set<ClassElement>> _subclasses = | 23 final Map<ClassElement, Set<ClassElement>> _subclasses = |
22 new Map<ClassElement, Set<ClassElement>>(); | 24 new Map<ClassElement, Set<ClassElement>>(); |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 // method of function classes that were generated for function | 300 // method of function classes that were generated for function |
299 // expressions. In such a case, we have to look at the original | 301 // expressions. In such a case, we have to look at the original |
300 // function expressions's element. | 302 // function expressions's element. |
301 // TODO(herhut): Generate classes for function expressions earlier. | 303 // TODO(herhut): Generate classes for function expressions earlier. |
302 if (element is closureMapping.SynthesizedCallMethodElementX) { | 304 if (element is closureMapping.SynthesizedCallMethodElementX) { |
303 return getMightBePassedToApply(element.expression); | 305 return getMightBePassedToApply(element.expression); |
304 } | 306 } |
305 return functionsThatMightBePassedToApply.contains(element); | 307 return functionsThatMightBePassedToApply.contains(element); |
306 } | 308 } |
307 } | 309 } |
OLD | NEW |