| 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 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 for (MetadataAnnotation metadata in library.metadata) { | 1138 for (MetadataAnnotation metadata in library.metadata) { |
| 1139 metadata.ensureResolved(this); | 1139 metadata.ensureResolved(this); |
| 1140 } | 1140 } |
| 1141 } | 1141 } |
| 1142 } | 1142 } |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 void processQueue(Enqueuer world, Element main) { | 1145 void processQueue(Enqueuer world, Element main) { |
| 1146 world.nativeEnqueuer.processNativeClasses(libraries.values); | 1146 world.nativeEnqueuer.processNativeClasses(libraries.values); |
| 1147 if (main != null) { | 1147 if (main != null) { |
| 1148 if (main.computeSignature(this).parameterCount != 0) { | 1148 FunctionElement mainMethod = main; |
| 1149 if (mainMethod.computeSignature(this).parameterCount != 0) { |
| 1149 // TODO(ngeoffray, floitsch): we should also ensure that the | 1150 // TODO(ngeoffray, floitsch): we should also ensure that the |
| 1150 // class IsolateMessage is instantiated. Currently, just enabling | 1151 // class IsolateMessage is instantiated. Currently, just enabling |
| 1151 // isolate support works. | 1152 // isolate support works. |
| 1152 world.enableIsolateSupport(main.getLibrary()); | 1153 world.enableIsolateSupport(main.getLibrary()); |
| 1153 world.registerInstantiatedClass(listClass, globalDependencies); | 1154 world.registerInstantiatedClass(listClass, globalDependencies); |
| 1154 world.registerInstantiatedClass(stringClass, globalDependencies); | 1155 world.registerInstantiatedClass(stringClass, globalDependencies); |
| 1155 } | 1156 } |
| 1156 world.addToWorkList(main); | 1157 world.addToWorkList(main); |
| 1157 } | 1158 } |
| 1158 progress.reset(); | 1159 progress.reset(); |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 | 1626 |
| 1626 void close() {} | 1627 void close() {} |
| 1627 | 1628 |
| 1628 toString() => name; | 1629 toString() => name; |
| 1629 | 1630 |
| 1630 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1631 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1631 static NullSink outputProvider(String name, String extension) { | 1632 static NullSink outputProvider(String name, String extension) { |
| 1632 return new NullSink('$name.$extension'); | 1633 return new NullSink('$name.$extension'); |
| 1633 } | 1634 } |
| 1634 } | 1635 } |
| OLD | NEW |