| 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 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 // emitter relies on this list for the order of type checks. | 774 // emitter relies on this list for the order of type checks. |
| 775 jsIntClass = compiler.findInterceptor(const SourceString('JSInt')), | 775 jsIntClass = compiler.findInterceptor(const SourceString('JSInt')), |
| 776 jsDoubleClass = compiler.findInterceptor(const SourceString('JSDouble')), | 776 jsDoubleClass = compiler.findInterceptor(const SourceString('JSDouble')), |
| 777 jsNumberClass = compiler.findInterceptor(const SourceString('JSNumber')), | 777 jsNumberClass = compiler.findInterceptor(const SourceString('JSNumber')), |
| 778 jsNullClass = compiler.findInterceptor(const SourceString('JSNull')), | 778 jsNullClass = compiler.findInterceptor(const SourceString('JSNull')), |
| 779 jsFunctionClass = | 779 jsFunctionClass = |
| 780 compiler.findInterceptor(const SourceString('JSFunction')), | 780 compiler.findInterceptor(const SourceString('JSFunction')), |
| 781 jsBoolClass = compiler.findInterceptor(const SourceString('JSBool'))]; | 781 jsBoolClass = compiler.findInterceptor(const SourceString('JSBool'))]; |
| 782 | 782 |
| 783 jsArrayClass.ensureResolved(compiler); | 783 jsArrayClass.ensureResolved(compiler); |
| 784 jsArrayLength = | 784 jsArrayLength = compiler.lookupElementIn( |
| 785 jsArrayClass.lookupLocalMember(const SourceString('length')); | 785 jsArrayClass, const SourceString('length')); |
| 786 jsArrayRemoveLast = | 786 jsArrayRemoveLast = compiler.lookupElementIn( |
| 787 jsArrayClass.lookupLocalMember(const SourceString('removeLast')); | 787 jsArrayClass, const SourceString('removeLast')); |
| 788 jsArrayAdd = | 788 jsArrayAdd = compiler.lookupElementIn( |
| 789 jsArrayClass.lookupLocalMember(const SourceString('add')); | 789 jsArrayClass, const SourceString('add')); |
| 790 | 790 |
| 791 jsStringClass.ensureResolved(compiler); | 791 jsStringClass.ensureResolved(compiler); |
| 792 jsStringLength = | 792 jsStringLength = compiler.lookupElementIn( |
| 793 jsStringClass.lookupLocalMember(const SourceString('length')); | 793 jsStringClass, const SourceString('length')); |
| 794 jsStringSplit = | 794 jsStringSplit = compiler.lookupElementIn( |
| 795 jsStringClass.lookupLocalMember(const SourceString('split')); | 795 jsStringClass, const SourceString('split')); |
| 796 jsStringConcat = | 796 jsStringConcat = compiler.lookupElementIn( |
| 797 jsStringClass.lookupLocalMember(const SourceString('concat')); | 797 jsStringClass, const SourceString('concat')); |
| 798 | 798 |
| 799 for (ClassElement cls in classes) { | 799 for (ClassElement cls in classes) { |
| 800 if (cls != null) interceptedClasses[cls] = null; | 800 if (cls != null) interceptedClasses[cls] = null; |
| 801 } | 801 } |
| 802 } | 802 } |
| 803 | 803 |
| 804 void addInterceptors(ClassElement cls, Enqueuer enqueuer) { | 804 void addInterceptors(ClassElement cls, Enqueuer enqueuer) { |
| 805 if (enqueuer.isResolutionQueue) { | 805 if (enqueuer.isResolutionQueue) { |
| 806 cls.ensureResolved(compiler); | 806 cls.ensureResolved(compiler); |
| 807 cls.forEachMember((ClassElement classElement, Element member) { | 807 cls.forEachMember((ClassElement classElement, Element member) { |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 print("Inferred return types:"); | 1139 print("Inferred return types:"); |
| 1140 print("----------------------"); | 1140 print("----------------------"); |
| 1141 dumpReturnTypes(); | 1141 dumpReturnTypes(); |
| 1142 print(""); | 1142 print(""); |
| 1143 print("Inferred field types:"); | 1143 print("Inferred field types:"); |
| 1144 print("------------------------"); | 1144 print("------------------------"); |
| 1145 fieldTypes.dump(); | 1145 fieldTypes.dump(); |
| 1146 print(""); | 1146 print(""); |
| 1147 } | 1147 } |
| 1148 } | 1148 } |
| OLD | NEW |