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

Side by Side Diff: frog/leg/universe.dart

Issue 9382041: Support getting of static functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // TODO(floitsch): we want more information than just the method name. For 10 // TODO(floitsch): we want more information than just the method name. For
10 // example the number of arguments, etc. 11 // example the number of arguments, etc.
floitsch 2012/02/12 20:43:11 We can remove this TODO, correct?
ngeoffray 2012/02/13 10:21:52 Yes.
11 final Map<SourceString, Set<Selector>> invokedNames; 12 final Map<SourceString, Set<Selector>> invokedNames;
12 final Set<SourceString> invokedGetters; 13 final Set<SourceString> invokedGetters;
13 final Set<SourceString> invokedSetters; 14 final Set<SourceString> invokedSetters;
14 final Map<String, LibraryElement> libraries; 15 final Map<String, LibraryElement> libraries;
15 16
16 Universe() : generatedCode = new Map<Element, String>(), 17 Universe() : generatedCode = new Map<Element, String>(),
17 generatedBailoutCode = new Map<Element, String>(), 18 generatedBailoutCode = new Map<Element, String>(),
18 libraries = new Map<String, LibraryElement>(), 19 libraries = new Map<String, LibraryElement>(),
19 instantiatedClasses = new Set<ClassElement>(), 20 instantiatedClasses = new Set<ClassElement>(),
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>();
23 25
24 void addGeneratedCode(WorkItem work, String code) { 26 void addGeneratedCode(WorkItem work, String code) {
25 if (work.isBailoutVersion()) { 27 if (work.isBailoutVersion()) {
26 generatedBailoutCode[work.element] = code; 28 generatedBailoutCode[work.element] = code;
27 } else { 29 } else {
28 generatedCode[work.element] = code; 30 generatedCode[work.element] = code;
29 } 31 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (!orderedNamedArguments.isEmpty()) return namedArguments; 143 if (!orderedNamedArguments.isEmpty()) return namedArguments;
142 144
143 List<SourceString> list = new List<SourceString>.from(namedArguments); 145 List<SourceString> list = new List<SourceString>.from(namedArguments);
144 list.sort((SourceString first, SourceString second) { 146 list.sort((SourceString first, SourceString second) {
145 return first.stringValue.compareTo(second.stringValue); 147 return first.stringValue.compareTo(second.stringValue);
146 }); 148 });
147 orderedNamedArguments = list; 149 orderedNamedArguments = list;
148 return orderedNamedArguments; 150 return orderedNamedArguments;
149 } 151 }
150 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698