| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 TreeValidatorTask validator; | 300 TreeValidatorTask validator; |
| 301 ResolverTask resolver; | 301 ResolverTask resolver; |
| 302 closureMapping.ClosureTask closureToClassMapper; | 302 closureMapping.ClosureTask closureToClassMapper; |
| 303 TypeCheckerTask checker; | 303 TypeCheckerTask checker; |
| 304 ti.TypesTask typesTask; | 304 ti.TypesTask typesTask; |
| 305 Backend backend; | 305 Backend backend; |
| 306 ConstantHandler constantHandler; | 306 ConstantHandler constantHandler; |
| 307 ConstantHandler metadataHandler; | 307 ConstantHandler metadataHandler; |
| 308 EnqueueTask enqueuer; | 308 EnqueueTask enqueuer; |
| 309 CompilerTask fileReadingTask; | 309 CompilerTask fileReadingTask; |
| 310 DeferredLoadTask deferredLoadTask; |
| 310 | 311 |
| 311 static const SourceString MAIN = const SourceString('main'); | 312 static const SourceString MAIN = const SourceString('main'); |
| 312 static const SourceString CALL_OPERATOR_NAME = const SourceString('call'); | 313 static const SourceString CALL_OPERATOR_NAME = const SourceString('call'); |
| 313 static const SourceString NO_SUCH_METHOD = const SourceString('noSuchMethod'); | 314 static const SourceString NO_SUCH_METHOD = const SourceString('noSuchMethod'); |
| 314 static const int NO_SUCH_METHOD_ARG_COUNT = 1; | 315 static const int NO_SUCH_METHOD_ARG_COUNT = 1; |
| 315 static const SourceString CREATE_INVOCATION_MIRROR = | 316 static const SourceString CREATE_INVOCATION_MIRROR = |
| 316 const SourceString('createInvocationMirror'); | 317 const SourceString('createInvocationMirror'); |
| 317 static const SourceString INVOKE_ON = const SourceString('invokeOn'); | 318 static const SourceString INVOKE_ON = const SourceString('invokeOn'); |
| 318 static const SourceString RUNTIME_TYPE = const SourceString('runtimeType'); | 319 static const SourceString RUNTIME_TYPE = const SourceString('runtimeType'); |
| 319 static const SourceString START_ROOT_ISOLATE = | 320 static const SourceString START_ROOT_ISOLATE = |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 libraryLoader = new LibraryLoaderTask(this), | 379 libraryLoader = new LibraryLoaderTask(this), |
| 379 scanner = new ScannerTask(this), | 380 scanner = new ScannerTask(this), |
| 380 dietParser = new DietParserTask(this), | 381 dietParser = new DietParserTask(this), |
| 381 parser = new ParserTask(this), | 382 parser = new ParserTask(this), |
| 382 patchParser = new PatchParserTask(this), | 383 patchParser = new PatchParserTask(this), |
| 383 resolver = new ResolverTask(this), | 384 resolver = new ResolverTask(this), |
| 384 closureToClassMapper = new closureMapping.ClosureTask(this, closureNamer), | 385 closureToClassMapper = new closureMapping.ClosureTask(this, closureNamer), |
| 385 checker = new TypeCheckerTask(this), | 386 checker = new TypeCheckerTask(this), |
| 386 typesTask = new ti.TypesTask(this), | 387 typesTask = new ti.TypesTask(this), |
| 387 constantHandler = new ConstantHandler(this, backend.constantSystem), | 388 constantHandler = new ConstantHandler(this, backend.constantSystem), |
| 389 deferredLoadTask = new DeferredLoadTask(this), |
| 388 enqueuer = new EnqueueTask(this)]; | 390 enqueuer = new EnqueueTask(this)]; |
| 389 | 391 |
| 390 tasks.addAll(backend.tasks); | 392 tasks.addAll(backend.tasks); |
| 391 metadataHandler = new ConstantHandler( | 393 metadataHandler = new ConstantHandler( |
| 392 this, backend.constantSystem, isMetadata: true); | 394 this, backend.constantSystem, isMetadata: true); |
| 393 } | 395 } |
| 394 | 396 |
| 395 Universe get resolverWorld => enqueuer.resolution.universe; | 397 Universe get resolverWorld => enqueuer.resolution.universe; |
| 396 Universe get codegenWorld => enqueuer.codegen.universe; | 398 Universe get codegenWorld => enqueuer.codegen.universe; |
| 397 | 399 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 reportFatalError('main is not a function', main); | 648 reportFatalError('main is not a function', main); |
| 647 } | 649 } |
| 648 FunctionElement mainMethod = main; | 650 FunctionElement mainMethod = main; |
| 649 FunctionSignature parameters = mainMethod.computeSignature(this); | 651 FunctionSignature parameters = mainMethod.computeSignature(this); |
| 650 parameters.forEachParameter((Element parameter) { | 652 parameters.forEachParameter((Element parameter) { |
| 651 reportFatalError('main cannot have parameters', parameter); | 653 reportFatalError('main cannot have parameters', parameter); |
| 652 }); | 654 }); |
| 653 } | 655 } |
| 654 } | 656 } |
| 655 | 657 |
| 658 deferredLoadTask.registerMainApp(mainApp); |
| 659 |
| 656 log('Resolving...'); | 660 log('Resolving...'); |
| 657 phase = PHASE_RESOLVING; | 661 phase = PHASE_RESOLVING; |
| 658 if (analyzeAll) { | 662 if (analyzeAll) { |
| 659 libraries.forEach((_, lib) => fullyEnqueueLibrary(lib)); | 663 libraries.forEach((_, lib) => fullyEnqueueLibrary(lib)); |
| 660 } | 664 } |
| 661 backend.enqueueHelpers(enqueuer.resolution); | 665 backend.enqueueHelpers(enqueuer.resolution); |
| 662 processQueue(enqueuer.resolution, main); | 666 processQueue(enqueuer.resolution, main); |
| 663 enqueuer.resolution.logSummary(log); | 667 enqueuer.resolution.logSummary(log); |
| 664 | 668 |
| 665 if (compilationFailed) return; | 669 if (compilationFailed) return; |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 | 1144 |
| 1141 void close() {} | 1145 void close() {} |
| 1142 | 1146 |
| 1143 toString() => name; | 1147 toString() => name; |
| 1144 | 1148 |
| 1145 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1149 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1146 static NullSink outputProvider(String name, String extension) { | 1150 static NullSink outputProvider(String name, String extension) { |
| 1147 return new NullSink('$name.$extension'); | 1151 return new NullSink('$name.$extension'); |
| 1148 } | 1152 } |
| 1149 } | 1153 } |
| OLD | NEW |