| 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 ClassElement jsFunctionClass; | 629 ClassElement jsFunctionClass; |
| 630 ClassElement jsNullClass; | 630 ClassElement jsNullClass; |
| 631 ClassElement jsBoolClass; | 631 ClassElement jsBoolClass; |
| 632 ClassElement objectInterceptorClass; | 632 ClassElement objectInterceptorClass; |
| 633 Element jsArrayLength; | 633 Element jsArrayLength; |
| 634 Element jsStringLength; | 634 Element jsStringLength; |
| 635 Element jsArrayRemoveLast; | 635 Element jsArrayRemoveLast; |
| 636 Element jsArrayAdd; | 636 Element jsArrayAdd; |
| 637 Element jsStringSplit; | 637 Element jsStringSplit; |
| 638 Element jsStringConcat; | 638 Element jsStringConcat; |
| 639 Element jsStringToString; |
| 639 Element getInterceptorMethod; | 640 Element getInterceptorMethod; |
| 640 Element fixedLengthListConstructor; | 641 Element fixedLengthListConstructor; |
| 641 bool seenAnyClass = false; | 642 bool seenAnyClass = false; |
| 642 | 643 |
| 643 final Namer namer; | 644 final Namer namer; |
| 644 | 645 |
| 645 /** | 646 /** |
| 646 * Interface used to determine if an object has the JavaScript | 647 * Interface used to determine if an object has the JavaScript |
| 647 * indexing behavior. The interface is only visible to specific | 648 * indexing behavior. The interface is only visible to specific |
| 648 * libraries. | 649 * libraries. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 jsArrayAdd = compiler.lookupElementIn( | 795 jsArrayAdd = compiler.lookupElementIn( |
| 795 jsArrayClass, const SourceString('add')); | 796 jsArrayClass, const SourceString('add')); |
| 796 | 797 |
| 797 jsStringClass.ensureResolved(compiler); | 798 jsStringClass.ensureResolved(compiler); |
| 798 jsStringLength = compiler.lookupElementIn( | 799 jsStringLength = compiler.lookupElementIn( |
| 799 jsStringClass, const SourceString('length')); | 800 jsStringClass, const SourceString('length')); |
| 800 jsStringSplit = compiler.lookupElementIn( | 801 jsStringSplit = compiler.lookupElementIn( |
| 801 jsStringClass, const SourceString('split')); | 802 jsStringClass, const SourceString('split')); |
| 802 jsStringConcat = compiler.lookupElementIn( | 803 jsStringConcat = compiler.lookupElementIn( |
| 803 jsStringClass, const SourceString('concat')); | 804 jsStringClass, const SourceString('concat')); |
| 805 jsStringToString = compiler.lookupElementIn( |
| 806 jsStringClass, const SourceString('toString')); |
| 804 | 807 |
| 805 for (ClassElement cls in classes) { | 808 for (ClassElement cls in classes) { |
| 806 if (cls != null) interceptedClasses[cls] = null; | 809 if (cls != null) interceptedClasses[cls] = null; |
| 807 } | 810 } |
| 808 } | 811 } |
| 809 | 812 |
| 810 void addInterceptors(ClassElement cls, Enqueuer enqueuer) { | 813 void addInterceptors(ClassElement cls, Enqueuer enqueuer) { |
| 811 if (enqueuer.isResolutionQueue) { | 814 if (enqueuer.isResolutionQueue) { |
| 812 cls.ensureResolved(compiler); | 815 cls.ensureResolved(compiler); |
| 813 cls.forEachMember((ClassElement classElement, Element member) { | 816 cls.forEachMember((ClassElement classElement, Element member) { |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 } | 1200 } |
| 1198 | 1201 |
| 1199 Element getSetRuntimeTypeInfo() { | 1202 Element getSetRuntimeTypeInfo() { |
| 1200 return compiler.findHelper(const SourceString('setRuntimeTypeInfo')); | 1203 return compiler.findHelper(const SourceString('setRuntimeTypeInfo')); |
| 1201 } | 1204 } |
| 1202 | 1205 |
| 1203 Element getGetRuntimeTypeInfo() { | 1206 Element getGetRuntimeTypeInfo() { |
| 1204 return compiler.findHelper(const SourceString('getRuntimeTypeInfo')); | 1207 return compiler.findHelper(const SourceString('getRuntimeTypeInfo')); |
| 1205 } | 1208 } |
| 1206 } | 1209 } |
| OLD | NEW |