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

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

Issue 10353014: Start implementing checked mode and tools support for using it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « lib/compiler/implementation/ssa/types.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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<SourceString> instantiatedClassInstanceFields; 9 final Set<SourceString> instantiatedClassInstanceFields;
10 final Set<FunctionElement> staticFunctionsNeedingGetter; 10 final Set<FunctionElement> staticFunctionsNeedingGetter;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // class A { 318 // class A {
319 // get foo() => () => 42; 319 // get foo() => () => 42;
320 // bar() => foo(); // The call to 'foo' is a typed selector. 320 // bar() => foo(); // The call to 'foo' is a typed selector.
321 // } 321 // }
322 ClassElement other = element.enclosingElement; 322 ClassElement other = element.enclosingElement;
323 if (other.superclass === compiler.closureClass) { 323 if (other.superclass === compiler.closureClass) {
324 return super.applies(element, compiler); 324 return super.applies(element, compiler);
325 } 325 }
326 326
327 ClassElement self = receiverType.element; 327 ClassElement self = receiverType.element;
328 if (other.implementsInterface(self)) { 328 // TODO(ngeoffray): tree-shake on interfaces.
329 if (self.isInterface() || other.isSubclassOf(self)) {
329 return super.applies(element, compiler); 330 return super.applies(element, compiler);
330 } 331 }
331 332
332 if (!self.isInterface() && self.isSubclassOf(other)) { 333 if (!self.isInterface() && self.isSubclassOf(other)) {
333 // Resolve an invocation of [element.name] on [self]. If it 334 // Resolve an invocation of [element.name] on [self]. If it
334 // is found, this selector is a candidate. 335 // is found, this selector is a candidate.
335 return hasElementIn(self, element) && super.applies(element, compiler); 336 return hasElementIn(self, element) && super.applies(element, compiler);
336 } 337 }
337 338
338 return false; 339 return false;
339 } 340 }
340 341
341 bool operator ==(other) { 342 bool operator ==(other) {
342 if (other is !TypedSelector) return false; 343 if (other is !TypedSelector) return false;
343 if (other.receiverType !== receiverType) return false; 344 if (other.receiverType !== receiverType) return false;
344 return super == other; 345 return super == other;
345 } 346 }
346 } 347 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/types.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698