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

Unified Diff: tests/compiler/dart2js/serialization/model_test_helper.dart

Issue 2961563003: Hopefully the last bit of restructuring between closture classes and loop boxing, etc. (Closed)
Patch Set: . Created 3 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/ssa/loop_handler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/serialization/model_test_helper.dart
diff --git a/tests/compiler/dart2js/serialization/model_test_helper.dart b/tests/compiler/dart2js/serialization/model_test_helper.dart
index ec6f85e14b7cc9146fed26a245c74286a704412b..3ea5f8a355f25891af16226a26da52f5e5873ec8 100644
--- a/tests/compiler/dart2js/serialization/model_test_helper.dart
+++ b/tests/compiler/dart2js/serialization/model_test_helper.dart
@@ -255,17 +255,18 @@ bool areCapturedVariablesEquivalent(FieldEntity a, FieldEntity b) {
bool areClosureScopesEquivalent(ClosureScope a, ClosureScope b) {
if (a == b) return true;
if (a == null || b == null) return false;
- if (!areLocalsEquivalent(a.boxElement, b.boxElement)) {
+ if (!areLocalsEquivalent(a.context, b.context)) {
return false;
}
- checkMaps(
- a.capturedVariables,
- b.capturedVariables,
- 'ClosureScope.capturedVariables',
- areLocalsEquivalent,
+ if (!areLocalsEquivalent(a.thisLocal, b.thisLocal)) {
+ return false;
+ }
+ var aBoxed = {};
+ a.forEachBoxedVariable((k, v) => aBoxed[k] = v);
+ var bBoxed = {};
+ b.forEachBoxedVariable((k, v) => bBoxed[k] = v);
+ checkMaps(aBoxed, bBoxed, 'ClosureScope.boxedVariables', areLocalsEquivalent,
areElementsEquivalent);
- checkSets(a.boxedLoopVariables, b.boxedLoopVariables,
- 'ClosureScope.boxedLoopVariables', areElementsEquivalent);
return true;
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/loop_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698