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 class Universe { | 5 class Universe { |
6 Map<Element, String> generatedCode; | 6 Map<Element, String> generatedCode; |
7 Map<Element, String> generatedBailoutCode; | 7 Map<Element, String> generatedBailoutCode; |
8 final Set<ClassElement> instantiatedClasses; | 8 final Set<ClassElement> instantiatedClasses; |
9 final Set<FunctionElement> staticFunctionsNeedingGetter; | 9 final Set<FunctionElement> staticFunctionsNeedingGetter; |
10 final Map<SourceString, Set<Selector>> invokedNames; | 10 final Map<SourceString, Set<Selector>> invokedNames; |
11 final Set<SourceString> invokedGetters; | 11 final Set<SourceString> invokedGetters; |
12 final Set<SourceString> invokedSetters; | 12 final Set<SourceString> invokedSetters; |
13 final Map<String, LibraryElement> libraries; | 13 final Map<String, LibraryElement> libraries; |
14 // TODO(ngeoffray): This should be a Type. | |
ahe
2012/03/10 15:48:47
Type -> Set<Type>
ngeoffray
2012/03/10 17:05:40
Done.
| |
15 final Set<ClassElement> isChecks; | |
14 | 16 |
15 Universe() : generatedCode = new Map<Element, String>(), | 17 Universe() : generatedCode = new Map<Element, String>(), |
16 generatedBailoutCode = new Map<Element, String>(), | 18 generatedBailoutCode = new Map<Element, String>(), |
17 libraries = new Map<String, LibraryElement>(), | 19 libraries = new Map<String, LibraryElement>(), |
18 instantiatedClasses = new Set<ClassElement>(), | 20 instantiatedClasses = new Set<ClassElement>(), |
19 staticFunctionsNeedingGetter = new Set<FunctionElement>(), | 21 staticFunctionsNeedingGetter = new Set<FunctionElement>(), |
20 invokedNames = new Map<SourceString, Set<Invocation>>(), | 22 invokedNames = new Map<SourceString, Set<Invocation>>(), |
21 invokedGetters = new Set<SourceString>(), | 23 invokedGetters = new Set<SourceString>(), |
22 invokedSetters = new Set<SourceString>(); | 24 invokedSetters = new Set<SourceString>(), |
25 isChecks = new Set<ClassElement>(); | |
23 | 26 |
24 void addGeneratedCode(WorkItem work, String code) { | 27 void addGeneratedCode(WorkItem work, String code) { |
25 if (work.isBailoutVersion()) { | 28 if (work.isBailoutVersion()) { |
26 generatedBailoutCode[work.element] = code; | 29 generatedBailoutCode[work.element] = code; |
27 } else { | 30 } else { |
28 generatedCode[work.element] = code; | 31 generatedCode[work.element] = code; |
29 } | 32 } |
30 } | 33 } |
31 } | 34 } |
32 | 35 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 if (!orderedNamedArguments.isEmpty()) return orderedNamedArguments; | 146 if (!orderedNamedArguments.isEmpty()) return orderedNamedArguments; |
144 | 147 |
145 List<SourceString> list = new List<SourceString>.from(namedArguments); | 148 List<SourceString> list = new List<SourceString>.from(namedArguments); |
146 list.sort((SourceString first, SourceString second) { | 149 list.sort((SourceString first, SourceString second) { |
147 return first.slowToString().compareTo(second.slowToString()); | 150 return first.slowToString().compareTo(second.slowToString()); |
148 }); | 151 }); |
149 orderedNamedArguments = list; | 152 orderedNamedArguments = list; |
150 return orderedNamedArguments; | 153 return orderedNamedArguments; |
151 } | 154 } |
152 } | 155 } |
OLD | NEW |