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

Side by Side Diff: lib/compiler/implementation/universe.dart

Issue 10854140: Fix type inference for self-recursive functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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, CodeBuffer> generatedCode; 6 Map<Element, CodeBuffer> generatedCode;
7 Map<Element, CodeBuffer> generatedBailoutCode; 7 Map<Element, CodeBuffer> generatedBailoutCode;
8 final Set<ClassElement> instantiatedClasses; 8 final Set<ClassElement> instantiatedClasses;
9 final Set<SourceString> instantiatedClassInstanceFields; 9 final Set<SourceString> instantiatedClassInstanceFields;
10 final Set<FunctionElement> staticFunctionsNeedingGetter; 10 final Set<FunctionElement> staticFunctionsNeedingGetter;
(...skipping 20 matching lines...) Expand all
31 rti = new RuntimeTypeInformation(); 31 rti = new RuntimeTypeInformation();
32 32
33 void addGeneratedCode(WorkItem work, CodeBuffer codeBuffer) { 33 void addGeneratedCode(WorkItem work, CodeBuffer codeBuffer) {
34 generatedCode[work.element] = codeBuffer; 34 generatedCode[work.element] = codeBuffer;
35 } 35 }
36 36
37 void addBailoutCode(WorkItem work, CodeBuffer codeBuffer) { 37 void addBailoutCode(WorkItem work, CodeBuffer codeBuffer) {
38 generatedBailoutCode[work.element] = codeBuffer; 38 generatedBailoutCode[work.element] = codeBuffer;
39 } 39 }
40 40
41 void invalidateCode(Element element) {
ahe 2012/08/14 07:57:56 Please don't add new features to Universe, that is
Søren Gjesse 2012/08/14 08:26:30 Removed this and used eagerRecompile in Enqueuer (
42 generatedCode.remove(element);
43 generatedBailoutCode.remove(element);
44 }
45
41 bool hasMatchingSelector(Set<Selector> selectors, 46 bool hasMatchingSelector(Set<Selector> selectors,
42 Element member, 47 Element member,
43 Compiler compiler) { 48 Compiler compiler) {
44 if (selectors === null) return false; 49 if (selectors === null) return false;
45 for (Selector selector in selectors) { 50 for (Selector selector in selectors) {
46 if (selector.applies(member, compiler)) return true; 51 if (selector.applies(member, compiler)) return true;
47 } 52 }
48 return false; 53 return false;
49 } 54 }
50 55
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // Resolve an invocation of [element.name] on [self]. If it 350 // Resolve an invocation of [element.name] on [self]. If it
346 // is found, this selector is a candidate. 351 // is found, this selector is a candidate.
347 return hasElementIn(self, element) && super.applies(element, compiler); 352 return hasElementIn(self, element) && super.applies(element, compiler);
348 } 353 }
349 354
350 return false; 355 return false;
351 } 356 }
352 357
353 toString() => 'TypedSelector($kind, $receiverType, $argumentCount)'; 358 toString() => 'TypedSelector($kind, $receiverType, $argumentCount)';
354 } 359 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698