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

Unified Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 1108913003: Use Map<FieldElement, ConstantValue> for fields in ConstructedConstantValue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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: pkg/compiler/lib/src/js_backend/namer.dart
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 85bdd5c04214bf527eced2da214f3e5216fc49c2..4e15e5d3e00dbf2521b3a692de151a9562a7e4f9 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -1508,8 +1508,8 @@ class ConstantNamingVisitor implements ConstantValueVisitor {
@override
void visitConstructed(ConstructedConstantValue constant, [_]) {
addRoot(constant.type.element.name);
- for (int i = 0; i < constant.fields.length; i++) {
- _visit(constant.fields[i]);
+ for (ConstantValue value in constant.fields.values) {
+ _visit(value);
if (failed) return;
}
}
@@ -1612,8 +1612,8 @@ class ConstantCanonicalHasher implements ConstantValueVisitor<int, Null> {
@override
int visitConstructed(ConstructedConstantValue constant, [_]) {
int hash = _hashString(3, constant.type.element.name);
- for (int i = 0; i < constant.fields.length; i++) {
- hash = _combine(hash, _visit(constant.fields[i]));
+ for (ConstantValue value in constant.fields.values) {
+ hash = _combine(hash, _visit(value));
}
return hash;
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/constant_emitter.dart ('k') | pkg/compiler/lib/src/mirrors/dart2js_instance_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698