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

Side by Side Diff: pkg/compiler/lib/src/world.dart

Issue 790023004: Remove static state. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « pkg/compiler/lib/src/universe/universe.dart ('k') | no next file » | 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 part of dart2js; 5 part of dart2js;
6 6
7 abstract class ClassWorld { 7 abstract class ClassWorld {
8 // TODO(johnniwinther): Refine this into a `BackendClasses` interface. 8 // TODO(johnniwinther): Refine this into a `BackendClasses` interface.
9 Backend get backend; 9 Backend get backend;
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 class World implements ClassWorld { 105 class World implements ClassWorld {
106 ClassElement get objectClass => compiler.objectClass; 106 ClassElement get objectClass => compiler.objectClass;
107 ClassElement get functionClass => compiler.functionClass; 107 ClassElement get functionClass => compiler.functionClass;
108 ClassElement get boolClass => compiler.boolClass; 108 ClassElement get boolClass => compiler.boolClass;
109 ClassElement get numClass => compiler.numClass; 109 ClassElement get numClass => compiler.numClass;
110 ClassElement get intClass => compiler.intClass; 110 ClassElement get intClass => compiler.intClass;
111 ClassElement get doubleClass => compiler.doubleClass; 111 ClassElement get doubleClass => compiler.doubleClass;
112 ClassElement get stringClass => compiler.stringClass; 112 ClassElement get stringClass => compiler.stringClass;
113 113
114 Map<Selector, Map<ti.TypeMask, TypedSelector>> canonicalizedValues =
115 new Map<Selector, Map<ti.TypeMask, TypedSelector>>();
116
114 bool checkInvariants(ClassElement cls, {bool mustBeInstantiated: true}) { 117 bool checkInvariants(ClassElement cls, {bool mustBeInstantiated: true}) {
115 return 118 return
116 invariant(cls, cls.isDeclaration, 119 invariant(cls, cls.isDeclaration,
117 message: '$cls must be the declaration.') && 120 message: '$cls must be the declaration.') &&
118 invariant(cls, cls.isResolved, 121 invariant(cls, cls.isResolved,
119 message: '$cls must be resolved.') && 122 message: '$cls must be resolved.') &&
120 (!mustBeInstantiated || 123 (!mustBeInstantiated ||
121 invariant(cls, isInstantiated(cls), 124 invariant(cls, isInstantiated(cls),
122 message: '$cls is not instantiated.')); 125 message: '$cls is not instantiated.'));
123 } 126 }
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // function expressions's element. 524 // function expressions's element.
522 // TODO(herhut): Generate classes for function expressions earlier. 525 // TODO(herhut): Generate classes for function expressions earlier.
523 if (element is closureMapping.SynthesizedCallMethodElementX) { 526 if (element is closureMapping.SynthesizedCallMethodElementX) {
524 return getMightBePassedToApply(element.expression); 527 return getMightBePassedToApply(element.expression);
525 } 528 }
526 return functionsThatMightBePassedToApply.contains(element); 529 return functionsThatMightBePassedToApply.contains(element);
527 } 530 }
528 531
529 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; 532 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport;
530 } 533 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/universe.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698