OLD | NEW |
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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 compiler.enqueuer.resolution, | 761 compiler.enqueuer.resolution, |
762 compiler.globalDependencies); | 762 compiler.globalDependencies); |
763 backend.registerInstantiatedType( | 763 backend.registerInstantiatedType( |
764 patternImplClass.rawType, | 764 patternImplClass.rawType, |
765 compiler.enqueuer.resolution, | 765 compiler.enqueuer.resolution, |
766 compiler.globalDependencies); | 766 compiler.globalDependencies); |
767 compiler.world.populate(); | 767 compiler.world.populate(); |
768 | 768 |
769 // Grab hold of a supertype for String so we can produce potential | 769 // Grab hold of a supertype for String so we can produce potential |
770 // string types. | 770 // string types. |
771 patternClass = compiler.coreLibrary.find('Pattern'); | 771 patternClass = compiler.commonElements.coreLibrary.find('Pattern'); |
772 | 772 |
773 nonPrimitive1 = new TypeMask.nonNullSubtype( | 773 nonPrimitive1 = new TypeMask.nonNullSubtype( |
774 compiler.coreClasses.mapClass, world); | 774 compiler.coreClasses.mapClass, world); |
775 nonPrimitive2 = new TypeMask.nonNullSubtype( | 775 nonPrimitive2 = new TypeMask.nonNullSubtype( |
776 compiler.coreClasses.functionClass, world); | 776 compiler.coreClasses.functionClass, world); |
777 potentialArray = new TypeMask.subtype( | 777 potentialArray = new TypeMask.subtype( |
778 compiler.coreClasses.listClass, world); | 778 compiler.coreClasses.listClass, world); |
779 potentialString = new TypeMask.subtype(patternClass, world); | 779 potentialString = new TypeMask.subtype(patternClass, world); |
780 jsInterceptor = new TypeMask.nonNullSubclass(helpers.jsInterceptorClass, | 780 jsInterceptor = new TypeMask.nonNullSubclass(helpers.jsInterceptorClass, |
781 world); | 781 world); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 Expect.notEquals(jsStringOrNull, potentialString, | 822 Expect.notEquals(jsStringOrNull, potentialString, |
823 "potentialString expected not to be exact JSString"); | 823 "potentialString expected not to be exact JSString"); |
824 Expect.notEquals(jsArrayOrNull, potentialArray, | 824 Expect.notEquals(jsArrayOrNull, potentialArray, |
825 "potentialArray expected not to be JSArray subclass"); | 825 "potentialArray expected not to be JSArray subclass"); |
826 | 826 |
827 testUnion(compiler); | 827 testUnion(compiler); |
828 testIntersection(compiler); | 828 testIntersection(compiler); |
829 testRegressions(compiler); | 829 testRegressions(compiler); |
830 }); | 830 }); |
831 } | 831 } |
OLD | NEW |