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

Side by Side Diff: tests/compiler/dart2js/serialization/model_test_helper.dart

Issue 2875313002: Access BackendUsage through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/no_such_method_enabled_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.serialization_model_test; 5 library dart2js.serialization_model_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 resolutionInputs: resolutionInputs, 93 resolutionInputs: resolutionInputs,
94 options: [Flags.analyzeOnly]); 94 options: [Flags.analyzeOnly]);
95 compilerDeserialized.resolution.retainCachesForTesting = true; 95 compilerDeserialized.resolution.retainCachesForTesting = true;
96 await compilerDeserialized.run(entryPoint); 96 await compilerDeserialized.run(entryPoint);
97 compilerDeserialized.closeResolution(); 97 compilerDeserialized.closeResolution();
98 return compilerDeserialized; 98 return compilerDeserialized;
99 }); 99 });
100 100
101 return measure(title, 'check models', () async { 101 return measure(title, 'check models', () async {
102 checkAllImpacts(compilerNormal, compilerDeserialized, verbose: verbose); 102 checkAllImpacts(compilerNormal, compilerDeserialized, verbose: verbose);
103 ClosedWorld closedWorld1 =
104 compilerNormal.resolutionWorldBuilder.closedWorldForTesting;
105 ClosedWorld closedWorld2 =
106 compilerNormal.resolutionWorldBuilder.closedWorldForTesting;
103 checkResolutionEnqueuers( 107 checkResolutionEnqueuers(
104 compilerNormal.backend.backendUsage, 108 closedWorld1.backendUsage,
105 compilerDeserialized.backend.backendUsage, 109 closedWorld2.backendUsage,
106 compilerNormal.enqueuer.resolution, 110 compilerNormal.enqueuer.resolution,
107 compilerDeserialized.enqueuer.resolution, 111 compilerDeserialized.enqueuer.resolution,
108 verbose: verbose); 112 verbose: verbose);
109 checkClosedWorlds( 113 checkClosedWorlds(closedWorld1, closedWorld2,
110 compilerNormal.resolutionWorldBuilder.closedWorldForTesting,
111 compilerDeserialized.resolutionWorldBuilder.closedWorldForTesting,
112 // Serialized native data include non-live members. 114 // Serialized native data include non-live members.
113 allowExtra: true, 115 allowExtra: true,
114 verbose: verbose); 116 verbose: verbose);
115 checkBackendInfo(compilerNormal, compilerDeserialized, verbose: verbose); 117 checkBackendInfo(compilerNormal, compilerDeserialized, verbose: verbose);
116 }); 118 });
117 } 119 }
118 120
119 void checkResolutionEnqueuers( 121 void checkResolutionEnqueuers(
120 BackendUsage backendUsage1, 122 BackendUsage backendUsage1,
121 BackendUsage backendUsage2, 123 BackendUsage backendUsage2,
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 } 584 }
583 585
584 bool areInstancesEquivalent(Instance instance1, Instance instance2, 586 bool areInstancesEquivalent(Instance instance1, Instance instance2,
585 bool typeEquivalence(DartType a, DartType b)) { 587 bool typeEquivalence(DartType a, DartType b)) {
586 InterfaceType type1 = instance1.type; 588 InterfaceType type1 = instance1.type;
587 InterfaceType type2 = instance2.type; 589 InterfaceType type2 = instance2.type;
588 return typeEquivalence(type1, type2) && 590 return typeEquivalence(type1, type2) &&
589 instance1.kind == instance2.kind && 591 instance1.kind == instance2.kind &&
590 instance1.isRedirection == instance2.isRedirection; 592 instance1.isRedirection == instance2.isRedirection;
591 } 593 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/no_such_method_enabled_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698