| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 pleaseReportCrash(); | 673 pleaseReportCrash(); |
| 674 } | 674 } |
| 675 } catch (doubleFault) { | 675 } catch (doubleFault) { |
| 676 // Ignoring exceptions in exception handling. | 676 // Ignoring exceptions in exception handling. |
| 677 } | 677 } |
| 678 rethrow; | 678 rethrow; |
| 679 } finally { | 679 } finally { |
| 680 tracer.close(); | 680 tracer.close(); |
| 681 totalCompileTime.stop(); | 681 totalCompileTime.stop(); |
| 682 } | 682 } |
| 683 return true; | 683 return !compilationFailed; |
| 684 } | 684 } |
| 685 | 685 |
| 686 bool hasIsolateSupport() => isolateLibrary != null; | 686 bool hasIsolateSupport() => isolateLibrary != null; |
| 687 | 687 |
| 688 /** | 688 /** |
| 689 * This method is called before [library] import and export scopes have been | 689 * This method is called before [library] import and export scopes have been |
| 690 * set up. | 690 * set up. |
| 691 */ | 691 */ |
| 692 void onLibraryScanned(LibraryElement library, Uri uri) { | 692 void onLibraryScanned(LibraryElement library, Uri uri) { |
| 693 if (dynamicClass != null) { | 693 if (dynamicClass != null) { |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 libraries.forEach((_, lib) => fullyEnqueueLibrary(lib, enqueuer.codegen)); | 948 libraries.forEach((_, lib) => fullyEnqueueLibrary(lib, enqueuer.codegen)); |
| 949 } | 949 } |
| 950 processQueue(enqueuer.codegen, main); | 950 processQueue(enqueuer.codegen, main); |
| 951 enqueuer.codegen.logSummary(log); | 951 enqueuer.codegen.logSummary(log); |
| 952 | 952 |
| 953 if (compilationFailed) return; | 953 if (compilationFailed) return; |
| 954 | 954 |
| 955 backend.assembleProgram(); | 955 backend.assembleProgram(); |
| 956 | 956 |
| 957 checkQueues(); | 957 checkQueues(); |
| 958 |
| 959 if (compilationFailed) { |
| 960 assembledCode = null; // Signals failure. |
| 961 } |
| 958 } | 962 } |
| 959 | 963 |
| 960 void fullyEnqueueLibrary(LibraryElement library, Enqueuer world) { | 964 void fullyEnqueueLibrary(LibraryElement library, Enqueuer world) { |
| 961 void enqueueAll(Element element) { | 965 void enqueueAll(Element element) { |
| 962 fullyEnqueueTopLevelElement(element, world); | 966 fullyEnqueueTopLevelElement(element, world); |
| 963 } | 967 } |
| 964 library.implementation.forEachLocalMember(enqueueAll); | 968 library.implementation.forEachLocalMember(enqueueAll); |
| 965 } | 969 } |
| 966 | 970 |
| 967 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { | 971 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1449 | 1453 |
| 1450 void close() {} | 1454 void close() {} |
| 1451 | 1455 |
| 1452 toString() => name; | 1456 toString() => name; |
| 1453 | 1457 |
| 1454 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1458 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1455 static NullSink outputProvider(String name, String extension) { | 1459 static NullSink outputProvider(String name, String extension) { |
| 1456 return new NullSink('$name.$extension'); | 1460 return new NullSink('$name.$extension'); |
| 1457 } | 1461 } |
| 1458 } | 1462 } |
| OLD | NEW |