| 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 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 void enqueueAll(Element element) { | 961 void enqueueAll(Element element) { |
| 962 fullyEnqueueTopLevelElement(element, world); | 962 fullyEnqueueTopLevelElement(element, world); |
| 963 } | 963 } |
| 964 library.implementation.forEachLocalMember(enqueueAll); | 964 library.implementation.forEachLocalMember(enqueueAll); |
| 965 } | 965 } |
| 966 | 966 |
| 967 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { | 967 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { |
| 968 if (element.isClass()) { | 968 if (element.isClass()) { |
| 969 ClassElement cls = element; | 969 ClassElement cls = element; |
| 970 cls.ensureResolved(this); | 970 cls.ensureResolved(this); |
| 971 cls.forEachLocalMember((e) { | 971 cls.forEachLocalMember(enqueuer.resolution.addToWorkList); |
| 972 if (e.isSynthesized) { | |
| 973 // TODO(ahe): Work-around for http://dartbug.com/11205. | |
| 974 if (e.getLibrary().isPlatformLibrary) return; | |
| 975 } | |
| 976 world.addToWorkList(e); | |
| 977 }); | |
| 978 world.registerInstantiatedClass(element, globalDependencies); | 972 world.registerInstantiatedClass(element, globalDependencies); |
| 979 } else { | 973 } else { |
| 980 world.addToWorkList(element); | 974 world.addToWorkList(element); |
| 981 } | 975 } |
| 982 } | 976 } |
| 983 | 977 |
| 984 void processQueue(Enqueuer world, Element main) { | 978 void processQueue(Enqueuer world, Element main) { |
| 985 world.nativeEnqueuer.processNativeClasses(libraries.values); | 979 world.nativeEnqueuer.processNativeClasses(libraries.values); |
| 986 if (main != null) { | 980 if (main != null) { |
| 987 world.addToWorkList(main); | 981 world.addToWorkList(main); |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1455 | 1449 |
| 1456 void close() {} | 1450 void close() {} |
| 1457 | 1451 |
| 1458 toString() => name; | 1452 toString() => name; |
| 1459 | 1453 |
| 1460 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1454 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1461 static NullSink outputProvider(String name, String extension) { | 1455 static NullSink outputProvider(String name, String extension) { |
| 1462 return new NullSink('$name.$extension'); | 1456 return new NullSink('$name.$extension'); |
| 1463 } | 1457 } |
| 1464 } | 1458 } |
| OLD | NEW |