Chromium Code Reviews| 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 775 | 775 |
| 776 jsArrayClass.ensureResolved(compiler); | 776 jsArrayClass.ensureResolved(compiler); |
| 777 jsArrayLength = | 777 jsArrayLength = |
| 778 jsArrayClass.lookupLocalMember(const SourceString('length')); | 778 jsArrayClass.lookupLocalMember(const SourceString('length')); |
| 779 | 779 |
| 780 jsStringClass.ensureResolved(compiler); | 780 jsStringClass.ensureResolved(compiler); |
| 781 jsStringLength = | 781 jsStringLength = |
| 782 jsStringClass.lookupLocalMember(const SourceString('length')); | 782 jsStringClass.lookupLocalMember(const SourceString('length')); |
| 783 | 783 |
| 784 for (ClassElement cls in classes) { | 784 for (ClassElement cls in classes) { |
| 785 interceptedClasses[cls] = null; | 785 if (cls != null) interceptedClasses[cls] = null; |
|
ahe
2012/11/28 11:17:36
Shouldn't we make this an internal error instead?
| |
| 786 } | 786 } |
| 787 } | 787 } |
| 788 | 788 |
| 789 void addInterceptors(ClassElement cls) { | 789 void addInterceptors(ClassElement cls) { |
| 790 cls.ensureResolved(compiler); | 790 cls.ensureResolved(compiler); |
| 791 cls.forEachMember((ClassElement classElement, Element member) { | 791 cls.forEachMember((ClassElement classElement, Element member) { |
| 792 Set<Element> set = interceptedElements.putIfAbsent( | 792 Set<Element> set = interceptedElements.putIfAbsent( |
| 793 member.name, () => new Set<Element>()); | 793 member.name, () => new Set<Element>()); |
| 794 set.add(member); | 794 set.add(member); |
| 795 }, | 795 }, |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1108 print("Inferred return types:"); | 1108 print("Inferred return types:"); |
| 1109 print("----------------------"); | 1109 print("----------------------"); |
| 1110 dumpReturnTypes(); | 1110 dumpReturnTypes(); |
| 1111 print(""); | 1111 print(""); |
| 1112 print("Inferred field types:"); | 1112 print("Inferred field types:"); |
| 1113 print("------------------------"); | 1113 print("------------------------"); |
| 1114 fieldTypes.dump(); | 1114 fieldTypes.dump(); |
| 1115 print(""); | 1115 print(""); |
| 1116 } | 1116 } |
| 1117 } | 1117 } |
| OLD | NEW |