Chromium Code Reviews| Index: lib/compiler/implementation/world.dart |
| =================================================================== |
| --- lib/compiler/implementation/world.dart (revision 12117) |
| +++ lib/compiler/implementation/world.dart (working copy) |
| @@ -3,12 +3,16 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| class World { |
| - Compiler compiler; // Set in populate(). |
| + final Compiler compiler; |
| final Map<ClassElement, Set<ClassElement>> subtypes; |
| + final FunctionSet getters; |
|
ahe
2012/09/10 15:15:21
Could you add a method named something like "recor
kasperl
2012/09/11 07:39:11
Maybe change name to userDefinedGetters or nonTriv
ngeoffray
2012/09/11 08:51:08
Done.
ngeoffray
2012/09/11 08:51:08
Done.
|
| - World() : subtypes = new Map<ClassElement, Set<ClassElement>>(); |
| + World(Compiler compiler) |
| + : subtypes = new Map<ClassElement, Set<ClassElement>>(), |
| + getters = new FunctionSet(compiler), |
| + this.compiler = compiler; |
| - void populate(Compiler compiler) { |
| + void populate() { |
| void addSubtypes(ClassElement cls) { |
| if (cls.resolutionState != STATE_DONE) { |
| compiler.internalErrorOnElement( |
| @@ -22,10 +26,6 @@ |
| } |
| compiler.resolverWorld.instantiatedClasses.forEach(addSubtypes); |
| - |
| - // Mark the world as populated. |
| - assert(compiler !== null); |
| - this.compiler = compiler; |
| } |
| /** |