OLD | NEW |
---|---|
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.js_backend.helpers; | 5 library dart2js.js_backend.helpers; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/names.dart' show Identifiers, Uris; | 8 import '../common/names.dart' show Identifiers, Uris; |
9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
10 import '../core_types.dart' show CommonElements, ElementEnvironment; | 10 import '../core_types.dart' show CommonElements, ElementEnvironment; |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
605 _findHelperFunction('runtimeTypeToString'); | 605 _findHelperFunction('runtimeTypeToString'); |
606 | 606 |
607 FunctionEntity get assertIsSubtype => _findHelperFunction('assertIsSubtype'); | 607 FunctionEntity get assertIsSubtype => _findHelperFunction('assertIsSubtype'); |
608 | 608 |
609 FunctionEntity get checkSubtype => _findHelperFunction('checkSubtype'); | 609 FunctionEntity get checkSubtype => _findHelperFunction('checkSubtype'); |
610 | 610 |
611 FunctionEntity get assertSubtype => _findHelperFunction('assertSubtype'); | 611 FunctionEntity get assertSubtype => _findHelperFunction('assertSubtype'); |
612 | 612 |
613 FunctionEntity get subtypeCast => _findHelperFunction('subtypeCast'); | 613 FunctionEntity get subtypeCast => _findHelperFunction('subtypeCast'); |
614 | 614 |
615 FunctionEntity get functionTypeTest => | |
floitsch
2017/03/02 13:43:38
It feels fishy that the helper is in no impact.
It
| |
616 _findHelperFunction('functionTypeTest'); | |
617 | |
615 FunctionEntity get checkSubtypeOfRuntimeType => | 618 FunctionEntity get checkSubtypeOfRuntimeType => |
616 _findHelperFunction('checkSubtypeOfRuntimeType'); | 619 _findHelperFunction('checkSubtypeOfRuntimeType'); |
617 | 620 |
618 FunctionEntity get assertSubtypeOfRuntimeType => | 621 FunctionEntity get assertSubtypeOfRuntimeType => |
619 _findHelperFunction('assertSubtypeOfRuntimeType'); | 622 _findHelperFunction('assertSubtypeOfRuntimeType'); |
620 | 623 |
621 FunctionEntity get subtypeOfRuntimeTypeCast => | 624 FunctionEntity get subtypeOfRuntimeTypeCast => |
622 _findHelperFunction('subtypeOfRuntimeTypeCast'); | 625 _findHelperFunction('subtypeOfRuntimeTypeCast'); |
623 | 626 |
624 FunctionEntity get checkDeferredIsLoaded => | 627 FunctionEntity get checkDeferredIsLoaded => |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
703 _findAsyncHelperClass("_AsyncStarStreamController"); | 706 _findAsyncHelperClass("_AsyncStarStreamController"); |
704 | 707 |
705 ConstructorEntity get asyncStarControllerConstructor => | 708 ConstructorEntity get asyncStarControllerConstructor => |
706 _env.lookupConstructor(asyncStarController, "", required: true); | 709 _env.lookupConstructor(asyncStarController, "", required: true); |
707 | 710 |
708 ConstructorEntity get streamIteratorConstructor => | 711 ConstructorEntity get streamIteratorConstructor => |
709 _env.lookupConstructor(_findAsyncHelperClass("StreamIterator"), ""); | 712 _env.lookupConstructor(_findAsyncHelperClass("StreamIterator"), ""); |
710 | 713 |
711 ClassEntity get VoidRuntimeType => _findHelperClass('VoidRuntimeType'); | 714 ClassEntity get VoidRuntimeType => _findHelperClass('VoidRuntimeType'); |
712 | 715 |
713 ClassEntity get RuntimeType => _findHelperClass('RuntimeType'); | |
714 | |
715 ClassEntity get RuntimeFunctionType => | |
716 _findHelperClass('RuntimeFunctionType'); | |
717 | |
718 ClassEntity get RuntimeTypePlain => _findHelperClass('RuntimeTypePlain'); | |
719 | |
720 ClassEntity get RuntimeTypeGeneric => _findHelperClass('RuntimeTypeGeneric'); | |
721 | |
722 ClassEntity get DynamicRuntimeType => _findHelperClass('DynamicRuntimeType'); | |
723 | |
724 FunctionEntity get getDynamicRuntimeType { | |
725 // TODO(johnniwinther): Support this in mocks. | |
726 return _env.lookupLibraryMember(jsHelperLibrary, 'getDynamicRuntimeType'); | |
727 } | |
728 | |
729 FunctionEntity get getVoidRuntimeType { | |
730 // TODO(johnniwinther): Support this in mocks. | |
731 return _env.lookupLibraryMember(jsHelperLibrary, 'getVoidRuntimeType'); | |
732 } | |
733 | |
734 FunctionEntity get buildInterfaceType { | |
735 // TODO(johnniwinther): Support this in mocks. | |
736 return _env.lookupLibraryMember(jsHelperLibrary, 'buildInterfaceType'); | |
737 } | |
738 | |
739 FunctionEntity get buildFunctionType { | |
740 // TODO(johnniwinther): Support this in mocks. | |
741 return _env.lookupLibraryMember(jsHelperLibrary, 'buildFunctionType'); | |
742 } | |
743 | |
744 FunctionEntity get buildNamedFunctionType { | |
745 // TODO(johnniwinther): Support this in mocks. | |
746 return _env.lookupLibraryMember(jsHelperLibrary, 'buildNamedFunctionType'); | |
747 } | |
748 | |
749 FunctionEntity get functionTypeTestMetaHelper => | |
750 _findHelperFunction('functionTypeTestMetaHelper'); | |
751 | |
752 FunctionEntity get defineProperty => _findHelperFunction('defineProperty'); | 716 FunctionEntity get defineProperty => _findHelperFunction('defineProperty'); |
753 | 717 |
754 FunctionEntity get startRootIsolate => | 718 FunctionEntity get startRootIsolate => |
755 _findLibraryMember(isolateHelperLibrary, START_ROOT_ISOLATE); | 719 _findLibraryMember(isolateHelperLibrary, START_ROOT_ISOLATE); |
756 | 720 |
757 FunctionEntity get currentIsolate => | 721 FunctionEntity get currentIsolate => |
758 _findLibraryMember(isolateHelperLibrary, '_currentIsolate'); | 722 _findLibraryMember(isolateHelperLibrary, '_currentIsolate'); |
759 | 723 |
760 FunctionEntity get callInIsolate => | 724 FunctionEntity get callInIsolate => |
761 _findLibraryMember(isolateHelperLibrary, '_callInIsolate'); | 725 _findLibraryMember(isolateHelperLibrary, '_callInIsolate'); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
800 /// The class for patch annotations defined in dart:_js_helper. | 764 /// The class for patch annotations defined in dart:_js_helper. |
801 ClassEntity get patchAnnotationClass => | 765 ClassEntity get patchAnnotationClass => |
802 _patchAnnotationClass ??= _findHelperClass('_Patch'); | 766 _patchAnnotationClass ??= _findHelperClass('_Patch'); |
803 | 767 |
804 ClassEntity _nativeAnnotationClass; | 768 ClassEntity _nativeAnnotationClass; |
805 | 769 |
806 /// The class for native annotations defined in dart:_js_helper. | 770 /// The class for native annotations defined in dart:_js_helper. |
807 ClassEntity get nativeAnnotationClass => | 771 ClassEntity get nativeAnnotationClass => |
808 _nativeAnnotationClass ??= _findHelperClass('Native'); | 772 _nativeAnnotationClass ??= _findHelperClass('Native'); |
809 } | 773 } |
OLD | NEW |