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

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

Issue 2558763003: Move hasRuntimeTypeSupport, hasIsolateSupport, and hasFunctionApplySupport to JavaScriptBackend. (Closed)
Patch Set: Updated cf. comment Created 4 years 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/kernel/closed_world_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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 typeEquivalence, 139 typeEquivalence,
140 verbose: verbose); 140 verbose: verbose);
141 141
142 checkSets(enqueuer1.universe.isChecks, enqueuer2.universe.isChecks, 142 checkSets(enqueuer1.universe.isChecks, enqueuer2.universe.isChecks,
143 "Is-check mismatch", typeEquivalence, 143 "Is-check mismatch", typeEquivalence,
144 verbose: verbose); 144 verbose: verbose);
145 145
146 JavaScriptBackend backend1 = enqueuer1.backend; 146 JavaScriptBackend backend1 = enqueuer1.backend;
147 JavaScriptBackend backend2 = enqueuer2.backend; 147 JavaScriptBackend backend2 = enqueuer2.backend;
148 Expect.equals(backend1.hasInvokeOnSupport, backend2.hasInvokeOnSupport, 148 Expect.equals(backend1.hasInvokeOnSupport, backend2.hasInvokeOnSupport,
149 "Compiler.enabledInvokeOn mismatch"); 149 "JavaScriptBackend.hasInvokeOnSupport mismatch");
150 Expect.equals( 150 Expect.equals(
151 enqueuer1.universe.hasFunctionApplySupport, 151 backend1.hasFunctionApplySupport,
152 enqueuer2.universe.hasFunctionApplySupport, 152 backend2.hasFunctionApplySupport,
153 "ResolutionEnqueuer.universe.hasFunctionApplySupport mismatch"); 153 "JavaScriptBackend.hasFunctionApplySupport mismatch");
154 Expect.equals( 154 Expect.equals(backend1.hasRuntimeTypeSupport, backend2.hasRuntimeTypeSupport,
155 enqueuer1.universe.hasRuntimeTypeSupport, 155 "JavaScriptBackend.hasRuntimeTypeSupport mismatch");
156 enqueuer2.universe.hasRuntimeTypeSupport, 156 Expect.equals(backend1.hasIsolateSupport, backend2.hasIsolateSupport,
157 "ResolutionEnqueuer.universe.hasRuntimeTypeSupport mismatch"); 157 "JavaScriptBackend.hasIsolateSupport mismatch");
158 Expect.equals(
159 enqueuer1.universe.hasIsolateSupport,
160 enqueuer2.universe.hasIsolateSupport,
161 "ResolutionEnqueuer.universe.hasIsolateSupport mismatch");
162 } 158 }
163 159
164 void checkClosedWorlds(ClosedWorld closedWorld1, ClosedWorld closedWorld2, 160 void checkClosedWorlds(ClosedWorld closedWorld1, ClosedWorld closedWorld2,
165 {bool verbose: false}) { 161 {bool verbose: false}) {
166 checkClassHierarchyNodes( 162 checkClassHierarchyNodes(
167 closedWorld1, 163 closedWorld1,
168 closedWorld2, 164 closedWorld2,
169 closedWorld1.getClassHierarchyNode(closedWorld1.coreClasses.objectClass), 165 closedWorld1.getClassHierarchyNode(closedWorld1.coreClasses.objectClass),
170 closedWorld2.getClassHierarchyNode(closedWorld2.coreClasses.objectClass), 166 closedWorld2.getClassHierarchyNode(closedWorld2.coreClasses.objectClass),
171 verbose: verbose); 167 verbose: verbose);
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 a, b, (a, b) => areInstancesEquivalent(a, b, typeEquivalence))); 434 a, b, (a, b) => areInstancesEquivalent(a, b, typeEquivalence)));
439 return true; 435 return true;
440 } 436 }
441 437
442 bool areInstancesEquivalent(Instance instance1, Instance instance2, 438 bool areInstancesEquivalent(Instance instance1, Instance instance2,
443 bool typeEquivalence(DartType a, DartType b)) { 439 bool typeEquivalence(DartType a, DartType b)) {
444 return typeEquivalence(instance1.type, instance2.type) && 440 return typeEquivalence(instance1.type, instance2.type) &&
445 instance1.kind == instance2.kind && 441 instance1.kind == instance2.kind &&
446 instance1.isRedirection == instance2.isRedirection; 442 instance1.isRedirection == instance2.isRedirection;
447 } 443 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/kernel/closed_world_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698