| 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 dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 typedef ItemCompilationContext ItemCompilationContextCreator(); | 7 typedef ItemCompilationContext ItemCompilationContextCreator(); |
| 8 | 8 |
| 9 class EnqueueTask extends CompilerTask { | 9 class EnqueueTask extends CompilerTask { |
| 10 final ResolutionEnqueuer resolution; | 10 final ResolutionEnqueuer resolution; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 name = library.getLibraryOrScriptName(); | 29 name = library.getLibraryOrScriptName(); |
| 30 } else if (element.isClass) { | 30 } else if (element.isClass) { |
| 31 ClassElement cls = element; | 31 ClassElement cls = element; |
| 32 cls.ensureResolved(compiler); | 32 cls.ensureResolved(compiler); |
| 33 container = cls; | 33 container = cls; |
| 34 for (var link = cls.computeTypeParameters(compiler); | 34 for (var link = cls.computeTypeParameters(compiler); |
| 35 !link.isEmpty; | 35 !link.isEmpty; |
| 36 link = link.tail) { | 36 link = link.tail) { |
| 37 addMemberByName(link.head.element); | 37 addMemberByName(link.head.element); |
| 38 } | 38 } |
| 39 } else if (element.isTypedef) { | |
| 40 TypedefElement typedef = element; | |
| 41 typedef.ensureResolved(compiler); | |
| 42 } | 39 } |
| 43 allElementsByName[name] = allElementsByName.putIfAbsent( | 40 allElementsByName[name] = allElementsByName.putIfAbsent( |
| 44 name, () => const Link<Element>()).prepend(element); | 41 name, () => const Link<Element>()).prepend(element); |
| 45 if (container != null) { | 42 if (container != null) { |
| 46 container.forEachLocalMember(addMemberByName); | 43 container.forEachLocalMember(addMemberByName); |
| 47 } | 44 } |
| 48 } | 45 } |
| 49 | 46 |
| 50 compiler.libraryLoader.libraries.forEach(addMemberByName); | 47 compiler.libraryLoader.libraries.forEach(addMemberByName); |
| 51 } | 48 } |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 } | 730 } |
| 734 CodegenWorkItem workItem = new CodegenWorkItem( | 731 CodegenWorkItem workItem = new CodegenWorkItem( |
| 735 element, itemCompilationContextCreator()); | 732 element, itemCompilationContextCreator()); |
| 736 queue.add(workItem); | 733 queue.add(workItem); |
| 737 } | 734 } |
| 738 | 735 |
| 739 void _logSpecificSummary(log(message)) { | 736 void _logSpecificSummary(log(message)) { |
| 740 log('Compiled ${generatedCode.length} methods.'); | 737 log('Compiled ${generatedCode.length} methods.'); |
| 741 } | 738 } |
| 742 } | 739 } |
| OLD | NEW |