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

Unified Diff: lib/compiler/implementation/world.dart

Issue 10911181: Collect getters in a FunctionSet while resolving. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
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;
}
/**

Powered by Google App Engine
This is Rietveld 408576698