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

Unified Diff: lib/compiler/implementation/universe/partial_type_tree.dart

Issue 10964016: Change the type inference for fields in dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r12709 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/universe/partial_type_tree.dart
diff --git a/lib/compiler/implementation/universe/partial_type_tree.dart b/lib/compiler/implementation/universe/partial_type_tree.dart
index 1e8036172fdbfb51ecea8a7b15ba9fd1b0f61010..a8e7bf4497ca9e121f77eaf8144ae682a20448a7 100644
--- a/lib/compiler/implementation/universe/partial_type_tree.dart
+++ b/lib/compiler/implementation/universe/partial_type_tree.dart
@@ -2,8 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-class PartialTypeTree {
+class PartialTypeTree implements Hashable {
ngeoffray 2012/09/24 08:15:49 Do you need this change in this CL?
Søren Gjesse 2012/09/24 15:06:50 Not anymore. Thanks for noticing.
+ static int _HASH_COUNTER = 0;
+
+ final int _hashCode;
final Compiler compiler;
PartialTypeTreeNode root;
@@ -22,7 +25,9 @@ class PartialTypeTree {
Set<ClassElement> unseenInterfaceSubtypes =
new Set<ClassElement>();
- PartialTypeTree(this.compiler);
+ PartialTypeTree(this.compiler) : _hashCode = ++_HASH_COUNTER;
+
+ hashCode() => _hashCode;
abstract PartialTypeTreeNode newSpecializedNode(ClassElement type);

Powered by Google App Engine
This is Rietveld 408576698