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