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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 12974002: Convert a == to a builtin identity check if the receiver type can only hit Object==. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart » ('j') | 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 part of js_backend; 5 part of js_backend;
6 6
7 typedef void Recompile(Element element); 7 typedef void Recompile(Element element);
8 8
9 class ReturnInfo { 9 class ReturnInfo {
10 HType returnType; 10 HType returnType;
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 ClassElement jsFixedArrayClass; 648 ClassElement jsFixedArrayClass;
649 ClassElement jsExtendableArrayClass; 649 ClassElement jsExtendableArrayClass;
650 650
651 Element jsArrayLength; 651 Element jsArrayLength;
652 Element jsStringLength; 652 Element jsStringLength;
653 Element jsArrayRemoveLast; 653 Element jsArrayRemoveLast;
654 Element jsArrayAdd; 654 Element jsArrayAdd;
655 Element jsStringSplit; 655 Element jsStringSplit;
656 Element jsStringConcat; 656 Element jsStringConcat;
657 Element jsStringToString; 657 Element jsStringToString;
658 Element objectEquals;
658 659
659 ClassElement typeLiteralClass; 660 ClassElement typeLiteralClass;
660 ClassElement mapLiteralClass; 661 ClassElement mapLiteralClass;
661 ClassElement constMapLiteralClass; 662 ClassElement constMapLiteralClass;
662 663
663 Element getInterceptorMethod; 664 Element getInterceptorMethod;
664 Element interceptedNames; 665 Element interceptedNames;
665 666
666 bool seenAnyClass = false; 667 bool seenAnyClass = false;
667 668
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 for (ClassElement cls in classes) { 891 for (ClassElement cls in classes) {
891 if (cls != null) interceptedClasses.add(cls); 892 if (cls != null) interceptedClasses.add(cls);
892 } 893 }
893 894
894 typeLiteralClass = compiler.findHelper(const SourceString('TypeImpl')); 895 typeLiteralClass = compiler.findHelper(const SourceString('TypeImpl'));
895 mapLiteralClass = 896 mapLiteralClass =
896 compiler.coreLibrary.find(const SourceString('LinkedHashMap')); 897 compiler.coreLibrary.find(const SourceString('LinkedHashMap'));
897 constMapLiteralClass = 898 constMapLiteralClass =
898 compiler.findHelper(const SourceString('ConstantMap')); 899 compiler.findHelper(const SourceString('ConstantMap'));
899 900
901 objectEquals = compiler.lookupElementIn(
902 compiler.objectClass, const SourceString('=='));
903
900 specialOperatorEqClasses 904 specialOperatorEqClasses
901 ..add(jsNullClass) 905 ..add(jsNullClass)
902 ..add(jsNumberClass); 906 ..add(jsNumberClass);
903 } 907 }
904 908
905 void addInterceptorsForNativeClassMembers( 909 void addInterceptorsForNativeClassMembers(
906 ClassElement cls, Enqueuer enqueuer) { 910 ClassElement cls, Enqueuer enqueuer) {
907 if (enqueuer.isResolutionQueue) { 911 if (enqueuer.isResolutionQueue) {
908 cls.ensureResolved(compiler); 912 cls.ensureResolved(compiler);
909 cls.forEachMember((ClassElement classElement, Element member) { 913 cls.forEachMember((ClassElement classElement, Element member) {
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 ClassElement get constListImplementation => jsArrayClass; 1667 ClassElement get constListImplementation => jsArrayClass;
1664 ClassElement get fixedListImplementation => jsFixedArrayClass; 1668 ClassElement get fixedListImplementation => jsFixedArrayClass;
1665 ClassElement get growableListImplementation => jsExtendableArrayClass; 1669 ClassElement get growableListImplementation => jsExtendableArrayClass;
1666 ClassElement get mapImplementation => mapLiteralClass; 1670 ClassElement get mapImplementation => mapLiteralClass;
1667 ClassElement get constMapImplementation => constMapLiteralClass; 1671 ClassElement get constMapImplementation => constMapLiteralClass;
1668 ClassElement get functionImplementation => jsFunctionClass; 1672 ClassElement get functionImplementation => jsFunctionClass;
1669 ClassElement get typeImplementation => typeLiteralClass; 1673 ClassElement get typeImplementation => typeLiteralClass;
1670 ClassElement get boolImplementation => jsBoolClass; 1674 ClassElement get boolImplementation => jsBoolClass;
1671 ClassElement get nullImplementation => jsNullClass; 1675 ClassElement get nullImplementation => jsNullClass;
1672 } 1676 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698