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

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

Issue 2080183002: Revert "Enforce use of the forEachInstanceField ordering for constructed constants." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dd5309b73d55a672d419652c269156aa1652c13d..9d86752a40b6e076b2500118701ebfc43a4ff986 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -1735,10 +1735,10 @@ class ConstantNamingVisitor implements ConstantValueVisitor {
@override
void visitConstructed(ConstructedConstantValue constant, [_]) {
addRoot(constant.type.element.name);
- constant.type.element.forEachInstanceField((_, FieldElement field) {
+ for (ConstantValue value in constant.fields.values) {
+ _visit(value);
if (failed) return;
- _visit(constant.fields[field]);
- });
+ }
}
@override
@@ -1862,9 +1862,9 @@ class ConstantCanonicalHasher implements ConstantValueVisitor<int, Null> {
@override
int visitConstructed(ConstructedConstantValue constant, [_]) {
int hash = _hashString(3, constant.type.element.name);
- constant.type.element.forEachInstanceField((_, FieldElement field) {
- hash = _combine(hash, _visit(constant.fields[field]));
- });
+ 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_handler_javascript.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698