Chromium Code Reviews| Index: pkg/compiler/lib/src/compiler.dart |
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
| index ef0e7510beedbbe0846c0e4b637aa4821284da4b..755b893a01eadd4bff2bddd4976114512c80ba7b 100644 |
| --- a/pkg/compiler/lib/src/compiler.dart |
| +++ b/pkg/compiler/lib/src/compiler.dart |
| @@ -683,6 +683,13 @@ abstract class Compiler implements LibraryLoaderListener { |
| backend.enqueueHelpers(enqueuer.resolution); |
| resolveLibraryMetadata(); |
| reporter.log('Resolving...'); |
| + if (mainFunction != null && !mainFunction.isMalformed) { |
| + mainFunction.computeType(resolution); |
| + backend.backendClasses.listImplementation.ensureResolved(resolution); |
|
Harry Terkelsen
2016/11/18 17:40:21
don't we only need to resolve List and String if m
Johnni Winther
2016/11/21 12:45:09
Moved these into the backend.
|
| + backend.backendClasses.stringImplementation |
| + .ensureResolved(resolution); |
| + } |
| + |
| processQueue(enqueuer.resolution, mainFunction); |
| enqueuer.resolution.logSummary(reporter.log); |
| @@ -847,28 +854,15 @@ abstract class Compiler implements LibraryLoaderListener { |
| }); |
| } |
| - void processQueue(Enqueuer enqueuer, Element main) { |
| + void processQueue(Enqueuer enqueuer, MethodElement mainMethod) { |
| selfTask.measureSubtask("Compiler.processQueue", () { |
| enqueuer.applyImpact( |
| impactStrategy, |
| enqueuer.nativeEnqueuer |
| .processNativeClasses(libraryLoader.libraries)); |
| - if (main != null && !main.isMalformed) { |
| - FunctionElement mainMethod = main; |
| - mainMethod.computeType(resolution); |
| - if (mainMethod.functionSignature.parameterCount != 0) { |
| - // The first argument could be a list of strings. |
| - backend.backendClasses.listImplementation.ensureResolved(resolution); |
| - enqueuer.registerInstantiatedType( |
| - backend.backendClasses.listImplementation.rawType); |
| - backend.backendClasses.stringImplementation |
| - .ensureResolved(resolution); |
| - enqueuer.registerInstantiatedType( |
| - backend.backendClasses.stringImplementation.rawType); |
| - |
| - backend.registerMainHasArguments(enqueuer); |
| - } |
| - enqueuer.addToWorkList(main); |
| + if (mainMethod != null && !mainMethod.isMalformed) { |
| + enqueuer.applyImpact( |
| + impactStrategy, backend.computeMainImpact(enqueuer, mainMethod)); |
| } |
| if (options.verbose) { |
| progress.reset(); |