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

Side by Side Diff: tests/compiler/dart2js/type_combination_test.dart

Issue 2494093002: Refactor enqueuers (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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/mirror_tree_shaking_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import 'package:async_helper/async_helper.dart'; 5 import 'package:async_helper/async_helper.dart';
6 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 import 'package:compiler/src/js_backend/backend_helpers.dart'; 7 import 'package:compiler/src/js_backend/backend_helpers.dart';
8 import 'package:compiler/src/js_backend/js_backend.dart'; 8 import 'package:compiler/src/js_backend/js_backend.dart';
9 import 'package:compiler/src/types/types.dart'; 9 import 'package:compiler/src/types/types.dart';
10 import 'package:compiler/src/world.dart'; 10 import 'package:compiler/src/world.dart';
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 MockCompiler compiler = new MockCompiler.internal(); 733 MockCompiler compiler = new MockCompiler.internal();
734 await compiler.init(""" 734 await compiler.init("""
735 class PatternImpl implements Pattern {} 735 class PatternImpl implements Pattern {}
736 """); 736 """);
737 JavaScriptBackend backend = compiler.backend; 737 JavaScriptBackend backend = compiler.backend;
738 BackendHelpers helpers = backend.helpers; 738 BackendHelpers helpers = backend.helpers;
739 ClosedWorld world = compiler.openWorld.closeWorld(); 739 ClosedWorld world = compiler.openWorld.closeWorld();
740 helpers.interceptorsLibrary.forEachLocalMember((element) { 740 helpers.interceptorsLibrary.forEachLocalMember((element) {
741 if (element.isClass) { 741 if (element.isClass) {
742 element.ensureResolved(compiler.resolution); 742 element.ensureResolved(compiler.resolution);
743 backend.registerInstantiatedType(element.rawType, 743 compiler.enqueuer.resolution.registerInstantiatedType(element.rawType);
744 compiler.enqueuer.resolution, compiler.globalDependencies);
745 } 744 }
746 }); 745 });
747 ClassElement patternImplClass = compiler.mainApp.find('PatternImpl'); 746 ClassElement patternImplClass = compiler.mainApp.find('PatternImpl');
748 patternImplClass.ensureResolved(compiler.resolution); 747 patternImplClass.ensureResolved(compiler.resolution);
749 748
750 backend.registerInstantiatedType(compiler.coreTypes.mapType(), 749 compiler.enqueuer.resolution
751 compiler.enqueuer.resolution, compiler.globalDependencies); 750 .registerInstantiatedType(compiler.coreTypes.mapType());
752 backend.registerInstantiatedType(compiler.coreTypes.functionType, 751 compiler.enqueuer.resolution
753 compiler.enqueuer.resolution, compiler.globalDependencies); 752 .registerInstantiatedType(compiler.coreTypes.functionType);
754 backend.registerInstantiatedType(patternImplClass.rawType, 753 compiler.enqueuer.resolution
755 compiler.enqueuer.resolution, compiler.globalDependencies); 754 .registerInstantiatedType(patternImplClass.rawType);
756 compiler.openWorld.closeWorld(); 755 compiler.openWorld.closeWorld();
757 756
758 // Grab hold of a supertype for String so we can produce potential 757 // Grab hold of a supertype for String so we can produce potential
759 // string types. 758 // string types.
760 patternClass = compiler.commonElements.coreLibrary.find('Pattern'); 759 patternClass = compiler.commonElements.coreLibrary.find('Pattern');
761 760
762 nonPrimitive1 = 761 nonPrimitive1 =
763 new TypeMask.nonNullSubtype(compiler.coreClasses.mapClass, world); 762 new TypeMask.nonNullSubtype(compiler.coreClasses.mapClass, world);
764 nonPrimitive2 = 763 nonPrimitive2 =
765 new TypeMask.nonNullSubtype(compiler.coreClasses.functionClass, world); 764 new TypeMask.nonNullSubtype(compiler.coreClasses.functionClass, world);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 Expect.notEquals(jsStringOrNull, potentialString, 809 Expect.notEquals(jsStringOrNull, potentialString,
811 "potentialString expected not to be exact JSString"); 810 "potentialString expected not to be exact JSString");
812 Expect.notEquals(jsArrayOrNull, potentialArray, 811 Expect.notEquals(jsArrayOrNull, potentialArray,
813 "potentialArray expected not to be JSArray subclass"); 812 "potentialArray expected not to be JSArray subclass");
814 813
815 testUnion(compiler); 814 testUnion(compiler);
816 testIntersection(compiler); 815 testIntersection(compiler);
817 testRegressions(compiler); 816 testRegressions(compiler);
818 }); 817 });
819 } 818 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mirror_tree_shaking_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698